@cubis/foundry 0.3.71 → 0.3.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cli/core.js +4 -18
  3. package/dist/cli/core.js.map +1 -1
  4. package/package.json +1 -1
  5. package/src/cli/core.ts +4 -18
  6. package/workflows/powers/accessibility/POWER.md +83 -94
  7. package/workflows/powers/accessibility/SKILL.md +82 -94
  8. package/workflows/powers/agent-design/POWER.md +201 -0
  9. package/workflows/powers/agent-design/SKILL.md +198 -0
  10. package/workflows/powers/agent-design/references/clarification-patterns.md +153 -0
  11. package/workflows/powers/agent-design/references/skill-testing.md +164 -0
  12. package/workflows/powers/agent-design/references/workflow-patterns.md +226 -0
  13. package/workflows/powers/agentic-eval/POWER.md +62 -0
  14. package/workflows/powers/agentic-eval/SKILL.md +59 -0
  15. package/workflows/powers/agentic-eval/references/rubric-and-regression-checklist.md +11 -0
  16. package/workflows/powers/api-designer/POWER.md +43 -71
  17. package/workflows/powers/api-designer/SKILL.md +43 -71
  18. package/workflows/powers/api-patterns/POWER.md +42 -56
  19. package/workflows/powers/api-patterns/SKILL.md +42 -57
  20. package/workflows/powers/architecture-designer/POWER.md +43 -60
  21. package/workflows/powers/architecture-designer/SKILL.md +43 -60
  22. package/workflows/powers/ask-questions-if-underspecified/POWER.md +51 -3
  23. package/workflows/powers/auth-architect/POWER.md +69 -0
  24. package/workflows/powers/auth-architect/SKILL.md +66 -0
  25. package/workflows/powers/auth-architect/references/session-token-policy-checklist.md +45 -0
  26. package/workflows/powers/behavioral-modes/POWER.md +100 -9
  27. package/workflows/powers/c-pro/POWER.md +105 -0
  28. package/workflows/powers/c-pro/SKILL.md +102 -0
  29. package/workflows/powers/c-pro/references/build-systems-and-toolchains.md +148 -0
  30. package/workflows/powers/c-pro/references/common-ub-and-portability.md +166 -0
  31. package/workflows/powers/c-pro/references/debugging-with-sanitizers.md +205 -0
  32. package/workflows/powers/c-pro/references/memory-safety-and-build-checklist.md +60 -0
  33. package/workflows/powers/c-pro/references/posix-and-platform-apis.md +244 -0
  34. package/workflows/powers/changelog-generator/POWER.md +127 -63
  35. package/workflows/powers/changelog-generator/SKILL.md +126 -63
  36. package/workflows/powers/ci-cd-pipelines/POWER.md +156 -0
  37. package/workflows/powers/ci-cd-pipelines/SKILL.md +153 -0
  38. package/workflows/powers/ci-cd-pipelines/references/github-actions-patterns.md +160 -0
  39. package/workflows/powers/ci-cd-pipelines/references/pipeline-security-checklist.md +57 -0
  40. package/workflows/powers/cli-developer/POWER.md +152 -95
  41. package/workflows/powers/cli-developer/SKILL.md +152 -95
  42. package/workflows/powers/cpp-pro/POWER.md +111 -0
  43. package/workflows/powers/cpp-pro/SKILL.md +108 -0
  44. package/workflows/powers/cpp-pro/references/concurrency-primitives.md +266 -0
  45. package/workflows/powers/cpp-pro/references/move-semantics-and-value-types.md +149 -0
  46. package/workflows/powers/cpp-pro/references/performance-and-profiling.md +191 -0
  47. package/workflows/powers/cpp-pro/references/raii-and-modern-cpp-checklist.md +87 -0
  48. package/workflows/powers/cpp-pro/references/template-and-concepts-patterns.md +205 -0
  49. package/workflows/powers/csharp-pro/POWER.md +47 -22
  50. package/workflows/powers/csharp-pro/SKILL.md +47 -22
  51. package/workflows/powers/dart-pro/POWER.md +68 -0
  52. package/workflows/powers/dart-pro/SKILL.md +65 -0
  53. package/workflows/powers/dart-pro/references/isolate-and-concurrency.md +180 -0
  54. package/workflows/powers/dart-pro/references/null-safety-and-async-patterns.md +133 -0
  55. package/workflows/powers/dart-pro/references/package-structure-and-linting.md +193 -0
  56. package/workflows/powers/dart-pro/references/sealed-records-patterns.md +173 -0
  57. package/workflows/powers/dart-pro/references/testing-and-mocking.md +235 -0
  58. package/workflows/powers/database-design/POWER.md +47 -33
  59. package/workflows/powers/database-design/SKILL.md +47 -33
  60. package/workflows/powers/database-optimizer/POWER.md +43 -64
  61. package/workflows/powers/database-optimizer/SKILL.md +43 -64
  62. package/workflows/powers/database-skills/POWER.md +59 -93
  63. package/workflows/powers/database-skills/SKILL.md +59 -93
  64. package/workflows/powers/debugging-strategies/POWER.md +69 -0
  65. package/workflows/powers/debugging-strategies/SKILL.md +66 -0
  66. package/workflows/powers/debugging-strategies/references/reproduce-isolate-verify-checklist.md +42 -0
  67. package/workflows/powers/deep-research/POWER.md +67 -0
  68. package/workflows/powers/deep-research/SKILL.md +64 -0
  69. package/workflows/powers/deep-research/references/multi-round-research-loop.md +80 -0
  70. package/workflows/powers/design-system-builder/POWER.md +130 -116
  71. package/workflows/powers/design-system-builder/SKILL.md +130 -116
  72. package/workflows/powers/devops-engineer/POWER.md +120 -57
  73. package/workflows/powers/devops-engineer/SKILL.md +120 -57
  74. package/workflows/powers/docker-kubernetes/POWER.md +94 -0
  75. package/workflows/powers/docker-kubernetes/SKILL.md +91 -0
  76. package/workflows/powers/docker-kubernetes/references/dockerfile-optimization-checklist.md +35 -0
  77. package/workflows/powers/docker-kubernetes/references/kubernetes-deployment-patterns.md +59 -0
  78. package/workflows/powers/documentation-templates/POWER.md +158 -127
  79. package/workflows/powers/documentation-templates/SKILL.md +158 -127
  80. package/workflows/powers/drizzle-expert/POWER.md +66 -0
  81. package/workflows/powers/drizzle-expert/SKILL.md +63 -0
  82. package/workflows/powers/drizzle-expert/references/runtime-pairing-matrix.md +16 -0
  83. package/workflows/powers/drizzle-expert/references/schema-and-migration-playbook.md +18 -0
  84. package/workflows/powers/error-ux-observability/POWER.md +144 -131
  85. package/workflows/powers/error-ux-observability/SKILL.md +143 -131
  86. package/workflows/powers/fastapi-expert/POWER.md +46 -60
  87. package/workflows/powers/fastapi-expert/SKILL.md +46 -60
  88. package/workflows/powers/firebase/POWER.md +65 -0
  89. package/workflows/powers/firebase/SKILL.md +62 -0
  90. package/workflows/powers/firebase/references/platform-routing.md +16 -0
  91. package/workflows/powers/firebase/references/rules-and-indexes-checklist.md +11 -0
  92. package/workflows/powers/flutter-design-system/POWER.md +63 -0
  93. package/workflows/powers/flutter-design-system/SKILL.md +60 -0
  94. package/workflows/powers/flutter-design-system/references/shared-widgets.md +29 -0
  95. package/workflows/powers/flutter-design-system/references/tokens-and-theme.md +34 -0
  96. package/workflows/powers/flutter-drift/POWER.md +65 -0
  97. package/workflows/powers/flutter-drift/SKILL.md +62 -0
  98. package/workflows/powers/flutter-drift/references/migrations.md +22 -0
  99. package/workflows/powers/flutter-drift/references/query-patterns.md +26 -0
  100. package/workflows/powers/flutter-feature/POWER.md +65 -0
  101. package/workflows/powers/flutter-feature/SKILL.md +62 -0
  102. package/workflows/powers/flutter-feature/references/architecture-rules.md +85 -0
  103. package/workflows/powers/flutter-feature/references/composite-provider.md +58 -0
  104. package/workflows/powers/flutter-feature/references/outbox-pattern.md +87 -0
  105. package/workflows/powers/flutter-feature/references/testing-patterns.md +218 -0
  106. package/workflows/powers/flutter-go-router/POWER.md +64 -0
  107. package/workflows/powers/flutter-go-router/SKILL.md +61 -0
  108. package/workflows/powers/flutter-go-router/references/guards-and-deeplinks.md +20 -0
  109. package/workflows/powers/flutter-go-router/references/typed-routes.md +27 -0
  110. package/workflows/powers/flutter-offline-sync/POWER.md +62 -0
  111. package/workflows/powers/flutter-offline-sync/SKILL.md +59 -0
  112. package/workflows/powers/flutter-offline-sync/references/outbox-full.md +44 -0
  113. package/workflows/powers/flutter-repository/POWER.md +64 -0
  114. package/workflows/powers/flutter-repository/SKILL.md +61 -0
  115. package/workflows/powers/flutter-repository/references/drift-patterns.md +21 -0
  116. package/workflows/powers/flutter-repository/references/retrofit-patterns.md +20 -0
  117. package/workflows/powers/flutter-riverpod/POWER.md +70 -0
  118. package/workflows/powers/flutter-riverpod/SKILL.md +67 -0
  119. package/workflows/powers/flutter-riverpod/references/async-and-mutations.md +19 -0
  120. package/workflows/powers/flutter-riverpod/references/async-lifecycle.md +19 -0
  121. package/workflows/powers/flutter-riverpod/references/provider-selection.md +20 -0
  122. package/workflows/powers/flutter-riverpod/references/testing.md +21 -0
  123. package/workflows/powers/flutter-riverpod/references/version-matrix.md +24 -0
  124. package/workflows/powers/flutter-state-machine/POWER.md +62 -0
  125. package/workflows/powers/flutter-state-machine/SKILL.md +59 -0
  126. package/workflows/powers/flutter-state-machine/references/app-state-contract.md +23 -0
  127. package/workflows/powers/flutter-state-machine/references/ui-rendering.md +14 -0
  128. package/workflows/powers/flutter-testing/POWER.md +64 -0
  129. package/workflows/powers/flutter-testing/SKILL.md +61 -0
  130. package/workflows/powers/flutter-testing/references/offline-sync-tests.md +16 -0
  131. package/workflows/powers/flutter-testing/references/test-layers.md +33 -0
  132. package/workflows/powers/frontend-code-review/POWER.md +137 -0
  133. package/workflows/powers/frontend-code-review/SKILL.md +134 -0
  134. package/workflows/powers/frontend-code-review/references/common-antipatterns.md +86 -0
  135. package/workflows/powers/frontend-code-review/references/performance-budgets.md +56 -0
  136. package/workflows/powers/frontend-code-review/references/review-checklists.md +47 -0
  137. package/workflows/powers/frontend-design/POWER.md +163 -362
  138. package/workflows/powers/frontend-design/SKILL.md +163 -362
  139. package/workflows/powers/game-development/POWER.md +57 -140
  140. package/workflows/powers/game-development/SKILL.md +57 -140
  141. package/workflows/powers/geo-fundamentals/POWER.md +64 -126
  142. package/workflows/powers/geo-fundamentals/SKILL.md +64 -127
  143. package/workflows/powers/git-workflow/POWER.md +135 -0
  144. package/workflows/powers/git-workflow/SKILL.md +132 -0
  145. package/workflows/powers/git-workflow/references/pr-review-checklist.md +63 -0
  146. package/workflows/powers/golang-pro/POWER.md +46 -35
  147. package/workflows/powers/golang-pro/SKILL.md +46 -35
  148. package/workflows/powers/graphql-architect/POWER.md +44 -62
  149. package/workflows/powers/graphql-architect/SKILL.md +44 -62
  150. package/workflows/powers/i18n-localization/POWER.md +118 -103
  151. package/workflows/powers/i18n-localization/SKILL.md +118 -103
  152. package/workflows/powers/java-pro/POWER.md +47 -22
  153. package/workflows/powers/java-pro/SKILL.md +47 -22
  154. package/workflows/powers/javascript-pro/POWER.md +47 -34
  155. package/workflows/powers/javascript-pro/SKILL.md +47 -34
  156. package/workflows/powers/kotlin-pro/POWER.md +46 -23
  157. package/workflows/powers/kotlin-pro/SKILL.md +46 -23
  158. package/workflows/powers/legacy-modernizer/POWER.md +43 -60
  159. package/workflows/powers/legacy-modernizer/SKILL.md +43 -60
  160. package/workflows/powers/mcp-builder/POWER.md +65 -0
  161. package/workflows/powers/mcp-builder/SKILL.md +62 -0
  162. package/workflows/powers/mcp-builder/references/testing-and-evals.md +17 -0
  163. package/workflows/powers/mcp-builder/references/transport-and-tool-design.md +17 -0
  164. package/workflows/powers/microservices-architect/POWER.md +43 -70
  165. package/workflows/powers/microservices-architect/SKILL.md +43 -70
  166. package/workflows/powers/mobile-design/POWER.md +110 -345
  167. package/workflows/powers/mobile-design/SKILL.md +110 -345
  168. package/workflows/powers/mongodb/POWER.md +67 -0
  169. package/workflows/powers/mongodb/SKILL.md +64 -0
  170. package/workflows/powers/mongodb/references/mongodb-checklist.md +20 -0
  171. package/workflows/powers/mysql/POWER.md +67 -0
  172. package/workflows/powers/mysql/SKILL.md +64 -0
  173. package/workflows/powers/mysql/references/mysql-checklist.md +20 -0
  174. package/workflows/powers/neki/POWER.md +67 -0
  175. package/workflows/powers/neki/SKILL.md +64 -0
  176. package/workflows/powers/neki/references/neki-checklist.md +18 -0
  177. package/workflows/powers/nestjs-expert/POWER.md +45 -91
  178. package/workflows/powers/nestjs-expert/SKILL.md +45 -91
  179. package/workflows/powers/nextjs-developer/POWER.md +51 -44
  180. package/workflows/powers/nextjs-developer/SKILL.md +51 -44
  181. package/workflows/powers/nodejs-best-practices/POWER.md +48 -29
  182. package/workflows/powers/nodejs-best-practices/SKILL.md +48 -29
  183. package/workflows/powers/observability/POWER.md +109 -0
  184. package/workflows/powers/observability/SKILL.md +106 -0
  185. package/workflows/powers/observability/references/alerting-and-slo-checklist.md +87 -0
  186. package/workflows/powers/observability/references/opentelemetry-setup-guide.md +121 -0
  187. package/workflows/powers/openai-docs/POWER.md +61 -0
  188. package/workflows/powers/openai-docs/SKILL.md +58 -0
  189. package/workflows/powers/openai-docs/references/official-source-playbook.md +10 -0
  190. package/workflows/powers/performance-profiling/POWER.md +61 -114
  191. package/workflows/powers/performance-profiling/SKILL.md +61 -114
  192. package/workflows/powers/php-pro/POWER.md +116 -0
  193. package/workflows/powers/php-pro/SKILL.md +113 -0
  194. package/workflows/powers/php-pro/references/architecture-and-di.md +239 -0
  195. package/workflows/powers/php-pro/references/modern-php-features.md +189 -0
  196. package/workflows/powers/php-pro/references/performance-and-deployment.md +197 -0
  197. package/workflows/powers/php-pro/references/php84-strict-typing-checklist.md +161 -0
  198. package/workflows/powers/php-pro/references/testing-and-static-analysis.md +235 -0
  199. package/workflows/powers/playwright-e2e/POWER.md +85 -0
  200. package/workflows/powers/playwright-e2e/SKILL.md +82 -0
  201. package/workflows/powers/playwright-e2e/references/locator-trace-flake-checklist.md +80 -0
  202. package/workflows/powers/postgres/POWER.md +67 -0
  203. package/workflows/powers/postgres/SKILL.md +64 -0
  204. package/workflows/powers/postgres/references/postgres-checklist.md +20 -0
  205. package/workflows/powers/prompt-engineer/POWER.md +47 -30
  206. package/workflows/powers/prompt-engineer/SKILL.md +47 -30
  207. package/workflows/powers/python-pro/POWER.md +47 -36
  208. package/workflows/powers/python-pro/SKILL.md +47 -36
  209. package/workflows/powers/react-best-practices/POWER.md +56 -33
  210. package/workflows/powers/react-best-practices/SKILL.md +56 -33
  211. package/workflows/powers/react-expert/POWER.md +47 -37
  212. package/workflows/powers/react-expert/SKILL.md +47 -37
  213. package/workflows/powers/redis/POWER.md +67 -0
  214. package/workflows/powers/redis/SKILL.md +64 -0
  215. package/workflows/powers/redis/references/redis-checklist.md +19 -0
  216. package/workflows/powers/ruby-pro/POWER.md +118 -0
  217. package/workflows/powers/ruby-pro/SKILL.md +115 -0
  218. package/workflows/powers/ruby-pro/references/modern-ruby-features.md +189 -0
  219. package/workflows/powers/ruby-pro/references/object-design-patterns.md +220 -0
  220. package/workflows/powers/ruby-pro/references/performance-and-profiling.md +224 -0
  221. package/workflows/powers/ruby-pro/references/ruby-concurrency-and-testing.md +190 -0
  222. package/workflows/powers/ruby-pro/references/testing-and-rspec.md +236 -0
  223. package/workflows/powers/rust-pro/POWER.md +45 -31
  224. package/workflows/powers/rust-pro/SKILL.md +45 -31
  225. package/workflows/powers/security-engineer/POWER.md +129 -0
  226. package/workflows/powers/security-engineer/SKILL.md +126 -0
  227. package/workflows/powers/seo-fundamentals/POWER.md +59 -102
  228. package/workflows/powers/seo-fundamentals/SKILL.md +59 -102
  229. package/workflows/powers/serverless-patterns/POWER.md +171 -0
  230. package/workflows/powers/serverless-patterns/SKILL.md +168 -0
  231. package/workflows/powers/skill-creator/POWER.md +90 -0
  232. package/workflows/powers/skill-creator/SKILL.md +87 -0
  233. package/workflows/powers/skill-creator/references/platform-formats.md +181 -0
  234. package/workflows/powers/skill-creator/references/schemas.md +430 -0
  235. package/workflows/powers/spec-miner/POWER.md +49 -57
  236. package/workflows/powers/spec-miner/SKILL.md +49 -57
  237. package/workflows/powers/sqlite/POWER.md +67 -0
  238. package/workflows/powers/sqlite/SKILL.md +64 -0
  239. package/workflows/powers/sqlite/references/sqlite-checklist.md +19 -0
  240. package/workflows/powers/sre-engineer/POWER.md +123 -64
  241. package/workflows/powers/sre-engineer/SKILL.md +123 -64
  242. package/workflows/powers/static-analysis/POWER.md +121 -77
  243. package/workflows/powers/static-analysis/SKILL.md +121 -77
  244. package/workflows/powers/stripe-best-practices/POWER.md +140 -17
  245. package/workflows/powers/stripe-best-practices/SKILL.md +139 -17
  246. package/workflows/powers/supabase/POWER.md +67 -0
  247. package/workflows/powers/supabase/SKILL.md +64 -0
  248. package/workflows/powers/supabase/references/supabase-checklist.md +19 -0
  249. package/workflows/powers/swift-pro/POWER.md +118 -0
  250. package/workflows/powers/swift-pro/SKILL.md +115 -0
  251. package/workflows/powers/swift-pro/references/concurrency-patterns.md +165 -0
  252. package/workflows/powers/swift-pro/references/protocol-and-generics.md +172 -0
  253. package/workflows/powers/swift-pro/references/sendable-and-isolation.md +116 -0
  254. package/workflows/powers/swift-pro/references/swift-concurrency-and-protocols.md +260 -0
  255. package/workflows/powers/swift-pro/references/testing-and-packages.md +192 -0
  256. package/workflows/powers/tailwind-patterns/POWER.md +71 -240
  257. package/workflows/powers/tailwind-patterns/SKILL.md +71 -240
  258. package/workflows/powers/testing-patterns/POWER.md +155 -10
  259. package/workflows/powers/testing-patterns/SKILL.md +155 -10
  260. package/workflows/powers/typescript-pro/POWER.md +47 -38
  261. package/workflows/powers/typescript-pro/SKILL.md +47 -38
  262. package/workflows/powers/vitess/POWER.md +67 -0
  263. package/workflows/powers/vitess/SKILL.md +64 -0
  264. package/workflows/powers/vitess/references/vitess-checklist.md +19 -0
  265. package/workflows/powers/vulnerability-scanner/POWER.md +146 -10
  266. package/workflows/powers/vulnerability-scanner/SKILL.md +146 -10
  267. package/workflows/powers/web-perf/POWER.md +43 -170
  268. package/workflows/powers/web-perf/SKILL.md +43 -170
  269. package/workflows/powers/webapp-testing/POWER.md +43 -164
  270. package/workflows/powers/webapp-testing/SKILL.md +43 -164
@@ -1,55 +1,68 @@
1
1
  ---
2
2
  name: "javascript-pro"
3
- description: "Use for modern JavaScript architecture and implementation across browser, Node, and edge runtimes with ES2025+ practices."
3
+ description: "Use for modern JavaScript architecture and implementation across browser, Node, and edge runtimes with runtime-aware production practices."
4
4
  license: MIT
5
5
  metadata:
6
- version: "2.0.0"
7
- domain: "language"
8
- role: "specialist"
9
- stack: "javascript"
10
- baseline: "ES2025+"
6
+ author: cubis-foundry
7
+ version: "3.0"
8
+ compatibility: Claude Code, Codex, GitHub Copilot
11
9
  ---
12
10
 
13
11
  # JavaScript Pro
14
12
 
15
- ## When to use
13
+ ## Purpose
14
+
15
+ Expert-level guidance for modern JavaScript development across browser, Node.js, and edge runtimes. Covers module design, async orchestration, runtime-specific patterns, and production-grade error handling with a focus on runtime-aware code that respects platform boundaries.
16
+
17
+ ## When to Use
16
18
 
17
19
  - Implementing feature work in plain JavaScript.
18
20
  - Refactoring legacy JS toward modern modules and async flows.
19
- - Improving performance and reliability in browser/Node runtimes.
21
+ - Improving performance and reliability in browser, Node, or edge runtimes.
22
+ - Serving as the language baseline before framework-specific skills are loaded.
23
+
24
+ ## Instructions
25
+
26
+ 1. **Confirm runtime constraints** — identify browser targets, Node version, or edge runtime before choosing APIs or module formats. Runtime determines available features and performance characteristics.
27
+
28
+ 2. **Choose module boundaries and format** — prefer ESM (`import`/`export`) for new code. Configure `"type": "module"` in `package.json`. Keep modules focused to one responsibility. Use barrel exports (`index.js`) only for the public API to preserve tree-shaking.
29
+
30
+ 3. **Design async strategy** — use `AbortSignal` and `AbortController` for cancellable operations. Use `Promise.allSettled()` when all results matter regardless of individual failures. Limit concurrent operations with semaphore patterns to prevent resource exhaustion.
31
+
32
+ 4. **Implement with explicit error and cancellation handling** — always attach `.catch()` or use `try/catch` in async flows. Do not leave promise rejections unhandled because they terminate Node.js processes and cause silent failures in browsers.
33
+
34
+ 5. **Keep side effects at module edges** — pure logic belongs in reusable modules. Side-effectful initialization at module top-level prevents tree-shaking and complicates testing.
35
+
36
+ 6. **Validate untrusted input at boundaries** — sanitize at system entry points such as API handlers and form inputs. Keep dependency surface intentionally small.
37
+
38
+ 7. **Use runtime-appropriate tooling** — Vitest or `node --test` for testing, Biome or ESLint for linting, Vite or esbuild for bundling. Use lockfile-based installs (`npm ci`, `pnpm install --frozen-lockfile`) in CI. Enable `corepack` for consistent package manager versions.
39
+
40
+ 8. **Debug in the target environment** — reproduce runtime-specific failures in the exact target (browser, Node, or edge). Use structured logging with consistent error shapes. Profile with Chrome DevTools or `node --prof` before redesigning hot paths.
20
41
 
21
- ## Core workflow
42
+ 9. **Optimize deliberately** — use streams for large payloads to avoid memory spikes. Use `Promise.all` for independent parallel operations. Use dynamic `import()` for code-splitting heavy modules. Do not use UA sniffing in browser code because feature detection is more reliable and maintainable.
22
43
 
23
- 1. Confirm runtime constraints (browser targets, Node/edge version).
24
- 2. Choose module boundaries and async strategy.
25
- 3. Implement with explicit error and cancellation handling.
26
- 4. Verify behavior with tests and runtime checks.
44
+ 10. **Do not use heavy framework coupling in low-level modules** because it prevents reuse. Do not allow copy-paste utility proliferation without consolidation because it causes drift and duplication.
27
45
 
28
- ## Baseline standards
46
+ ## Output Format
29
47
 
30
- - Prefer ESM for new code unless compatibility blocks it.
31
- - Use `AbortSignal` for cancellable async operations.
32
- - Keep side effects at edges; pure logic in reusable modules.
33
- - Validate untrusted input at boundaries.
34
- - Keep dependency surface intentionally small.
48
+ Produces JavaScript code following ESM module conventions with explicit async error handling, runtime-appropriate API usage, and clear module boundaries. Includes structured error objects and cancellation support where applicable.
35
49
 
36
- ## Implementation guidance
50
+ ## References
37
51
 
38
- - Use `Promise.all` for independent parallel operations.
39
- - Use structured logging and consistent error shapes.
40
- - Use streams for large payloads to avoid memory spikes.
41
- - Use feature detection, not UA sniffing, in browser code.
52
+ | File | Load when |
53
+ | ------------------------------- | --------------------------------------------------------------------------- |
54
+ | `references/modern-syntax.md` | Choosing modern syntax/features for current runtime targets. |
55
+ | `references/async-patterns.md` | Cancellation, retries, concurrency, or promise orchestration needs detail. |
56
+ | `references/modules.md` | ESM/CJS/module-boundary tradeoffs are in scope. |
57
+ | `references/browser-apis.md` | Browser-specific APIs, capability checks, or UX/runtime constraints matter. |
58
+ | `references/node-essentials.md` | Node runtime behavior, streams, files, or process concerns matter. |
42
59
 
43
- ## Avoid
60
+ ## Scripts
44
61
 
45
- - Silent promise rejections.
46
- - Heavy framework coupling in low-level modules.
47
- - Copy-paste utility proliferation without consolidation.
62
+ No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
48
63
 
49
- ## Reference files
64
+ ## Examples
50
65
 
51
- - `references/modern-syntax.md`
52
- - `references/async-patterns.md`
53
- - `references/modules.md`
54
- - `references/browser-apis.md`
55
- - `references/node-essentials.md`
66
+ - "Refactor this callback-heavy Express handler to use async/await with proper error handling and AbortController for timeout."
67
+ - "Design the module structure for a shared utility library that needs to support both ESM and CJS consumers."
68
+ - "Optimize this Node.js data pipeline to use streams instead of loading the full dataset into memory."
@@ -5,39 +5,62 @@ name: "kotlin-pro"
5
5
  description: "Use for modern Kotlin backend/mobile/shared code with Kotlin 2.3-era language tooling and production patterns."
6
6
  license: MIT
7
7
  metadata:
8
- version: "1.0.0"
9
- domain: "language"
10
- role: "specialist"
11
- stack: "kotlin"
12
- baseline: "Kotlin 2.3 line (2.2.20+ compatible)"
8
+ author: cubis-foundry
9
+ version: "1.0"
10
+ compatibility: Claude Code, Codex, GitHub Copilot
13
11
  ---
14
12
 
15
13
  # Kotlin Pro
16
14
 
17
- ## When to use
15
+ ## Purpose
16
+
17
+ Expert-level guidance for modern Kotlin development across JVM, Android, and multiplatform targets. Covers null safety, coroutine-based concurrency, Flow patterns, sealed type hierarchies, and Kotlin Multiplatform architecture with production testing discipline.
18
+
19
+ ## When to Use
18
20
 
19
21
  - Building Kotlin services or Android/shared modules.
20
- - Designing coroutine-based async flows.
21
- - Improving null-safety and domain model clarity.
22
+ - Designing coroutine-based async flows and reactive patterns.
23
+ - Improving null-safety, domain model clarity, and testability.
24
+
25
+ ## Instructions
26
+
27
+ 1. **Establish target platform** — confirm JVM, Android, or Kotlin Multiplatform before choosing runtime-specific APIs. Put shared logic in `commonMain`; platform-specific implementations in `androidMain`/`iosMain`/`jvmMain`.
28
+
29
+ 2. **Design types with null safety** — keep nullability explicit. Prefer non-null types by default; use `?` only when null is valid domain state. Use `sealed class`/`sealed interface` for closed type hierarchies with exhaustive `when`. Use `data class` for value objects. Use `value class` for type-safe wrappers with zero runtime overhead. Do not use `!!` (forced non-null) in production code because it crashes at runtime — use `requireNotNull` with a message or safe alternatives (`?.`, `?:`, `let`).
30
+
31
+ 3. **Model concurrency with structured coroutines** — always launch coroutines in a scope with clear ownership (`viewModelScope`, `lifecycleScope`, custom `CoroutineScope`). Use `supervisorScope` when child failures should not cancel siblings. Use `withContext(Dispatchers.IO)` for blocking I/O. Use `withTimeout` for time-bounded operations. Respect cancellation by checking `isActive` in loops and letting `CancellationException` propagate. Do not use `GlobalScope` because it breaks structured concurrency and hides lifecycle bugs. Do not use `runBlocking` on the main thread because it deadlocks on Android and blocks server threads.
32
+
33
+ 4. **Use Flow for reactive streams** — use `StateFlow` for observable state; `SharedFlow` for events. Use `stateIn`/`shareIn` to share upstream flows. Prefer `flow {}` for cold streams; `channelFlow` when coroutine interleaving is needed. Use `flowOn(Dispatchers.IO)` for upstream context shifting. Handle backpressure with `conflate()`, `buffer()`, or `collectLatest`.
34
+
35
+ 5. **Keep serialization and transport separate from domain** — use `kotlinx.serialization` for cross-platform serialization (not Gson or Moshi in multiplatform code). Keep platform boundary interfaces thin; heavy logic belongs in common code. Use `expect`/`actual` declarations for platform abstractions.
36
+
37
+ 6. **Use extensions and DSLs judiciously** — prefer member functions for core type behavior; extensions for cross-cutting concerns. Scope extensions to the narrowest visibility. Use receiver-based DSLs for configuration blocks. Do not overuse extension properties because functions are more discoverable in IDE completion.
38
+
39
+ 7. **Validate with tests, detekt, and ktlint** — keep coroutine context, dispatcher use, and cancellation visible in logs and traces. Use `-Dkotlinx.coroutines.debug` for coroutine creation stack traces in development. Use `CoroutineExceptionHandler` at scope boundaries. Bound coroutine fan-out with `limitedParallelism` or `Semaphore`. Do not launch coroutines without lifecycle ownership because it causes leaks on Android and servers.
40
+
41
+ 8. **Optimize with measurement** — use `Sequence` for lazy evaluation of large collections; `List` for small, eager operations. Prefer `buildList`, `buildMap`, `buildSet` for efficient construction. Use `value class` for primitive wrappers in hot paths. Do not allow platform-specific leakage into shared/core modules because it breaks multiplatform portability. Measure with profiling tools before micro-optimizing.
42
+
43
+ ## Output Format
44
+
45
+ Produces Kotlin code using data classes, sealed hierarchies, structured coroutines, and Flow patterns with explicit null safety and platform-appropriate architecture. Includes multiplatform separation where applicable.
22
46
 
23
- ## Core workflow
47
+ ## References
24
48
 
25
- 1. Establish target platform (JVM/Android/multiplatform).
26
- 2. Define domain types and boundary contracts first.
27
- 3. Implement with coroutine/flow patterns where appropriate.
28
- 4. Validate with tests and static analysis.
49
+ | File | Load when |
50
+ | ----------------------------------------- | ------------------------------------------------------------------------------------------------------- |
51
+ | `references/operational-baseline.md` | You need Kotlin coroutine, modularity, testing, and production guardrails. |
52
+ | `references/coroutine-patterns.md` | You need structured concurrency, scope management, dispatcher selection, or cancellation design. |
53
+ | `references/flow-and-channels.md` | You need StateFlow/SharedFlow patterns, reactive streams, backpressure, or channel-based communication. |
54
+ | `references/sealed-types-and-dsl.md` | You need sealed class hierarchies, value classes, pattern matching, or DSL builder patterns. |
55
+ | `references/multiplatform-and-testing.md` | You need KMP architecture, expect/actual patterns, or coroutine test strategies. |
29
56
 
30
- ## Baseline standards
57
+ ## Scripts
31
58
 
32
- - Keep nullability explicit; avoid forced non-null assertions.
33
- - Prefer immutable data models and pure transforms.
34
- - Use structured concurrency and clear scope ownership.
35
- - Keep serialization and transport models separate from domain.
36
- - Use dependency boundaries that support modular testing.
59
+ No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
37
60
 
38
- ## Avoid
61
+ ## Examples
39
62
 
40
- - Coroutine launches without lifecycle ownership.
41
- - Platform-specific leakage into shared/core modules.
42
- - Overusing extension magic that hurts readability.
63
+ - "Design a coroutine-based repository layer with StateFlow for UI state and proper cancellation handling."
64
+ - "Refactor this Java-style service to use sealed classes, when expressions, and value classes for type safety."
65
+ - "Set up the Kotlin Multiplatform module structure with shared business logic and platform-specific implementations."
43
66
  ````
@@ -3,38 +3,61 @@ name: "kotlin-pro"
3
3
  description: "Use for modern Kotlin backend/mobile/shared code with Kotlin 2.3-era language tooling and production patterns."
4
4
  license: MIT
5
5
  metadata:
6
- version: "1.0.0"
7
- domain: "language"
8
- role: "specialist"
9
- stack: "kotlin"
10
- baseline: "Kotlin 2.3 line (2.2.20+ compatible)"
6
+ author: cubis-foundry
7
+ version: "1.0"
8
+ compatibility: Claude Code, Codex, GitHub Copilot
11
9
  ---
12
10
 
13
11
  # Kotlin Pro
14
12
 
15
- ## When to use
13
+ ## Purpose
14
+
15
+ Expert-level guidance for modern Kotlin development across JVM, Android, and multiplatform targets. Covers null safety, coroutine-based concurrency, Flow patterns, sealed type hierarchies, and Kotlin Multiplatform architecture with production testing discipline.
16
+
17
+ ## When to Use
16
18
 
17
19
  - Building Kotlin services or Android/shared modules.
18
- - Designing coroutine-based async flows.
19
- - Improving null-safety and domain model clarity.
20
+ - Designing coroutine-based async flows and reactive patterns.
21
+ - Improving null-safety, domain model clarity, and testability.
22
+
23
+ ## Instructions
24
+
25
+ 1. **Establish target platform** — confirm JVM, Android, or Kotlin Multiplatform before choosing runtime-specific APIs. Put shared logic in `commonMain`; platform-specific implementations in `androidMain`/`iosMain`/`jvmMain`.
26
+
27
+ 2. **Design types with null safety** — keep nullability explicit. Prefer non-null types by default; use `?` only when null is valid domain state. Use `sealed class`/`sealed interface` for closed type hierarchies with exhaustive `when`. Use `data class` for value objects. Use `value class` for type-safe wrappers with zero runtime overhead. Do not use `!!` (forced non-null) in production code because it crashes at runtime — use `requireNotNull` with a message or safe alternatives (`?.`, `?:`, `let`).
28
+
29
+ 3. **Model concurrency with structured coroutines** — always launch coroutines in a scope with clear ownership (`viewModelScope`, `lifecycleScope`, custom `CoroutineScope`). Use `supervisorScope` when child failures should not cancel siblings. Use `withContext(Dispatchers.IO)` for blocking I/O. Use `withTimeout` for time-bounded operations. Respect cancellation by checking `isActive` in loops and letting `CancellationException` propagate. Do not use `GlobalScope` because it breaks structured concurrency and hides lifecycle bugs. Do not use `runBlocking` on the main thread because it deadlocks on Android and blocks server threads.
30
+
31
+ 4. **Use Flow for reactive streams** — use `StateFlow` for observable state; `SharedFlow` for events. Use `stateIn`/`shareIn` to share upstream flows. Prefer `flow {}` for cold streams; `channelFlow` when coroutine interleaving is needed. Use `flowOn(Dispatchers.IO)` for upstream context shifting. Handle backpressure with `conflate()`, `buffer()`, or `collectLatest`.
32
+
33
+ 5. **Keep serialization and transport separate from domain** — use `kotlinx.serialization` for cross-platform serialization (not Gson or Moshi in multiplatform code). Keep platform boundary interfaces thin; heavy logic belongs in common code. Use `expect`/`actual` declarations for platform abstractions.
34
+
35
+ 6. **Use extensions and DSLs judiciously** — prefer member functions for core type behavior; extensions for cross-cutting concerns. Scope extensions to the narrowest visibility. Use receiver-based DSLs for configuration blocks. Do not overuse extension properties because functions are more discoverable in IDE completion.
36
+
37
+ 7. **Validate with tests, detekt, and ktlint** — keep coroutine context, dispatcher use, and cancellation visible in logs and traces. Use `-Dkotlinx.coroutines.debug` for coroutine creation stack traces in development. Use `CoroutineExceptionHandler` at scope boundaries. Bound coroutine fan-out with `limitedParallelism` or `Semaphore`. Do not launch coroutines without lifecycle ownership because it causes leaks on Android and servers.
38
+
39
+ 8. **Optimize with measurement** — use `Sequence` for lazy evaluation of large collections; `List` for small, eager operations. Prefer `buildList`, `buildMap`, `buildSet` for efficient construction. Use `value class` for primitive wrappers in hot paths. Do not allow platform-specific leakage into shared/core modules because it breaks multiplatform portability. Measure with profiling tools before micro-optimizing.
40
+
41
+ ## Output Format
42
+
43
+ Produces Kotlin code using data classes, sealed hierarchies, structured coroutines, and Flow patterns with explicit null safety and platform-appropriate architecture. Includes multiplatform separation where applicable.
20
44
 
21
- ## Core workflow
45
+ ## References
22
46
 
23
- 1. Establish target platform (JVM/Android/multiplatform).
24
- 2. Define domain types and boundary contracts first.
25
- 3. Implement with coroutine/flow patterns where appropriate.
26
- 4. Validate with tests and static analysis.
47
+ | File | Load when |
48
+ | ----------------------------------------- | ------------------------------------------------------------------------------------------------------- |
49
+ | `references/operational-baseline.md` | You need Kotlin coroutine, modularity, testing, and production guardrails. |
50
+ | `references/coroutine-patterns.md` | You need structured concurrency, scope management, dispatcher selection, or cancellation design. |
51
+ | `references/flow-and-channels.md` | You need StateFlow/SharedFlow patterns, reactive streams, backpressure, or channel-based communication. |
52
+ | `references/sealed-types-and-dsl.md` | You need sealed class hierarchies, value classes, pattern matching, or DSL builder patterns. |
53
+ | `references/multiplatform-and-testing.md` | You need KMP architecture, expect/actual patterns, or coroutine test strategies. |
27
54
 
28
- ## Baseline standards
55
+ ## Scripts
29
56
 
30
- - Keep nullability explicit; avoid forced non-null assertions.
31
- - Prefer immutable data models and pure transforms.
32
- - Use structured concurrency and clear scope ownership.
33
- - Keep serialization and transport models separate from domain.
34
- - Use dependency boundaries that support modular testing.
57
+ No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
35
58
 
36
- ## Avoid
59
+ ## Examples
37
60
 
38
- - Coroutine launches without lifecycle ownership.
39
- - Platform-specific leakage into shared/core modules.
40
- - Overusing extension magic that hurts readability.
61
+ - "Design a coroutine-based repository layer with StateFlow for UI state and proper cancellation handling."
62
+ - "Refactor this Java-style service to use sealed classes, when expressions, and value classes for type safety."
63
+ - "Set up the Kotlin Multiplatform module structure with shared business logic and platform-specific implementations."
@@ -2,86 +2,69 @@
2
2
  ---
3
3
  inclusion: manual
4
4
  name: legacy-modernizer
5
- description: Use when modernizing legacy systems, implementing incremental migration strategies, or reducing technical debt. Invoke for strangler fig pattern, monolith decomposition, framework upgrades.
5
+ description: "Use when planning and executing incremental migration of legacy systems using strangler fig, branch by abstraction, and feature-flag-controlled rollouts."
6
6
  license: MIT
7
7
  metadata:
8
- author: https://github.com/Jeffallan
9
- version: "1.0.0"
10
- domain: specialized
11
- triggers: legacy modernization, strangler fig, incremental migration, technical debt, legacy refactoring, system migration, legacy system, modernize codebase
12
- role: specialist
13
- scope: architecture
14
- output-format: code+analysis
15
- related-skills: test-master, devops-engineer
8
+ author: cubis-foundry
9
+ version: "1.0"
10
+ compatibility: Claude Code, Codex, GitHub Copilot
16
11
  ---
17
12
 
18
13
  # Legacy Modernizer
19
14
 
20
- Senior legacy modernization specialist with expertise in transforming aging systems into modern architectures without disrupting business operations.
15
+ ## Purpose
21
16
 
22
- ## Role Definition
17
+ Use when planning and executing incremental migration of legacy systems using strangler fig, branch by abstraction, and feature-flag-controlled rollouts.
23
18
 
24
- You are a senior legacy modernization expert with 15+ years of experience in incremental migration strategies. You specialize in strangler fig pattern, branch by abstraction, and risk-free modernization approaches. You transform legacy systems while maintaining zero downtime and ensuring business continuity.
19
+ ## When to Use
25
20
 
26
- ## When to Use This Skill
21
+ - Migrating legacy systems to modern architectures without big-bang rewrites.
22
+ - Designing strangler fig patterns for gradual service extraction.
23
+ - Planning incremental migrations with feature flags and canary rollouts.
24
+ - Building safety nets (characterization tests) before changing legacy behavior.
25
+ - Modernizing databases, APIs, or UI layers incrementally.
27
26
 
28
- - Modernizing legacy codebases and outdated technology stacks
29
- - Implementing strangler fig or branch by abstraction patterns
30
- - Migrating from monoliths to microservices incrementally
31
- - Refactoring legacy code with comprehensive safety nets
32
- - Upgrading frameworks, languages, or infrastructure safely
33
- - Reducing technical debt while maintaining business continuity
27
+ ## Instructions
34
28
 
35
- ## Core Workflow
29
+ 1. Assess the system — map dependencies, identify high-risk areas, and document current behavior.
30
+ 2. Plan the migration — choose strategy (strangler fig, branch by abstraction, parallel run) and define phases.
31
+ 3. Build a safety net — write characterization tests that capture current behavior before any changes.
32
+ 4. Migrate incrementally — extract one bounded context at a time behind feature flags.
33
+ 5. Validate and iterate — verify behavior parity, monitor for regressions, roll back if needed.
34
+ 6. Decommission legacy — remove old code paths only after migration is verified and stable.
36
35
 
37
- 1. **Assess system** - Analyze codebase, dependencies, risks, and business constraints
38
- 2. **Plan migration** - Design incremental roadmap with rollback strategies
39
- 3. **Build safety net** - Create characterization tests and monitoring
40
- 4. **Migrate incrementally** - Apply strangler fig pattern with feature flags
41
- 5. **Validate & iterate** - Test thoroughly, monitor metrics, adjust approach
36
+ ### Baseline standards
42
37
 
43
- ## Reference Guide
38
+ - Zero production disruption is the primary constraint.
39
+ - Maintain 80%+ test coverage on migrated paths.
40
+ - Use feature flags for all migration switches.
41
+ - Include monitoring and rollback capability for every migration step.
42
+ - Document every decision and its rationale.
43
+ - Preserve existing business logic exactly unless explicitly changing it.
44
44
 
45
- Load detailed guidance based on context:
45
+ ### Constraints
46
46
 
47
- | Topic | Reference | Load When |
48
- |-------|-----------|-----------|
49
- | Strangler Fig | `references/strangler-fig-pattern.md` | Incremental replacement, facade layer, routing |
50
- | Refactoring | `references/refactoring-patterns.md` | Extract service, branch by abstraction, adapters |
51
- | Migration | `references/migration-strategies.md` | Database, UI, API, framework migrations |
52
- | Testing | `references/legacy-testing.md` | Characterization tests, golden master, approval |
53
- | Assessment | `references/system-assessment.md` | Code analysis, dependency mapping, risk evaluation |
47
+ - Never attempt big-bang rewrites always migrate incrementally.
48
+ - Never skip characterization testing before modifying legacy behavior.
49
+ - Never deploy migration steps without rollback capability.
50
+ - Never remove legacy code until the replacement is verified in production.
51
+ - Always maintain the ability to revert to the previous system state.
54
52
 
55
- ## Constraints
53
+ ## Output Format
56
54
 
57
- ### MUST DO
58
- - Maintain zero production disruption during all migrations
59
- - Create comprehensive test coverage before refactoring (target 80%+)
60
- - Use feature flags for all incremental rollouts
61
- - Implement monitoring and rollback procedures
62
- - Document all migration decisions and rationale
63
- - Preserve existing business logic and behavior
64
- - Communicate progress and risks transparently
55
+ Provide a migration plan with phases, risk assessment, rollback strategy, and verification checkpoints.
65
56
 
66
- ### MUST NOT DO
67
- - Big bang rewrites or replacements
68
- - Skip testing legacy behavior before changes
69
- - Deploy without rollback capability
70
- - Break existing integrations or APIs
71
- - Ignore technical debt in new code
72
- - Rush migrations without proper validation
73
- - Remove legacy code before new code is proven
57
+ ## References
74
58
 
75
- ## Output Templates
59
+ No additional reference files.
76
60
 
77
- When implementing modernization, provide:
78
- 1. Assessment summary (risks, dependencies, approach)
79
- 2. Migration plan (phases, rollback strategy, metrics)
80
- 3. Implementation code (facades, adapters, new services)
81
- 4. Test coverage (characterization, integration, e2e)
82
- 5. Monitoring setup (metrics, alerts, dashboards)
61
+ ## Scripts
83
62
 
84
- ## Knowledge Reference
63
+ No helper scripts are required for this skill right now.
85
64
 
86
- Strangler fig pattern, branch by abstraction, characterization testing, incremental migration, feature flags, canary deployments, API versioning, database refactoring, microservices extraction, technical debt reduction, zero-downtime deployment
65
+ ## Examples
66
+
67
+ - "Plan a strangler fig migration for this monolithic API"
68
+ - "Design characterization tests for this legacy payment module"
69
+ - "Create a phased migration plan with feature flags and rollback"
87
70
  ````
@@ -1,84 +1,67 @@
1
1
  ---
2
2
  name: legacy-modernizer
3
- description: Use when modernizing legacy systems, implementing incremental migration strategies, or reducing technical debt. Invoke for strangler fig pattern, monolith decomposition, framework upgrades.
3
+ description: "Use when planning and executing incremental migration of legacy systems using strangler fig, branch by abstraction, and feature-flag-controlled rollouts."
4
4
  license: MIT
5
5
  metadata:
6
- author: https://github.com/Jeffallan
7
- version: "1.0.0"
8
- domain: specialized
9
- triggers: legacy modernization, strangler fig, incremental migration, technical debt, legacy refactoring, system migration, legacy system, modernize codebase
10
- role: specialist
11
- scope: architecture
12
- output-format: code+analysis
13
- related-skills: test-master, devops-engineer
6
+ author: cubis-foundry
7
+ version: "1.0"
8
+ compatibility: Claude Code, Codex, GitHub Copilot
14
9
  ---
15
10
 
16
11
  # Legacy Modernizer
17
12
 
18
- Senior legacy modernization specialist with expertise in transforming aging systems into modern architectures without disrupting business operations.
13
+ ## Purpose
19
14
 
20
- ## Role Definition
15
+ Use when planning and executing incremental migration of legacy systems using strangler fig, branch by abstraction, and feature-flag-controlled rollouts.
21
16
 
22
- You are a senior legacy modernization expert with 15+ years of experience in incremental migration strategies. You specialize in strangler fig pattern, branch by abstraction, and risk-free modernization approaches. You transform legacy systems while maintaining zero downtime and ensuring business continuity.
17
+ ## When to Use
23
18
 
24
- ## When to Use This Skill
19
+ - Migrating legacy systems to modern architectures without big-bang rewrites.
20
+ - Designing strangler fig patterns for gradual service extraction.
21
+ - Planning incremental migrations with feature flags and canary rollouts.
22
+ - Building safety nets (characterization tests) before changing legacy behavior.
23
+ - Modernizing databases, APIs, or UI layers incrementally.
25
24
 
26
- - Modernizing legacy codebases and outdated technology stacks
27
- - Implementing strangler fig or branch by abstraction patterns
28
- - Migrating from monoliths to microservices incrementally
29
- - Refactoring legacy code with comprehensive safety nets
30
- - Upgrading frameworks, languages, or infrastructure safely
31
- - Reducing technical debt while maintaining business continuity
25
+ ## Instructions
32
26
 
33
- ## Core Workflow
27
+ 1. Assess the system — map dependencies, identify high-risk areas, and document current behavior.
28
+ 2. Plan the migration — choose strategy (strangler fig, branch by abstraction, parallel run) and define phases.
29
+ 3. Build a safety net — write characterization tests that capture current behavior before any changes.
30
+ 4. Migrate incrementally — extract one bounded context at a time behind feature flags.
31
+ 5. Validate and iterate — verify behavior parity, monitor for regressions, roll back if needed.
32
+ 6. Decommission legacy — remove old code paths only after migration is verified and stable.
34
33
 
35
- 1. **Assess system** - Analyze codebase, dependencies, risks, and business constraints
36
- 2. **Plan migration** - Design incremental roadmap with rollback strategies
37
- 3. **Build safety net** - Create characterization tests and monitoring
38
- 4. **Migrate incrementally** - Apply strangler fig pattern with feature flags
39
- 5. **Validate & iterate** - Test thoroughly, monitor metrics, adjust approach
34
+ ### Baseline standards
40
35
 
41
- ## Reference Guide
36
+ - Zero production disruption is the primary constraint.
37
+ - Maintain 80%+ test coverage on migrated paths.
38
+ - Use feature flags for all migration switches.
39
+ - Include monitoring and rollback capability for every migration step.
40
+ - Document every decision and its rationale.
41
+ - Preserve existing business logic exactly unless explicitly changing it.
42
42
 
43
- Load detailed guidance based on context:
43
+ ### Constraints
44
44
 
45
- | Topic | Reference | Load When |
46
- |-------|-----------|-----------|
47
- | Strangler Fig | `references/strangler-fig-pattern.md` | Incremental replacement, facade layer, routing |
48
- | Refactoring | `references/refactoring-patterns.md` | Extract service, branch by abstraction, adapters |
49
- | Migration | `references/migration-strategies.md` | Database, UI, API, framework migrations |
50
- | Testing | `references/legacy-testing.md` | Characterization tests, golden master, approval |
51
- | Assessment | `references/system-assessment.md` | Code analysis, dependency mapping, risk evaluation |
45
+ - Never attempt big-bang rewrites always migrate incrementally.
46
+ - Never skip characterization testing before modifying legacy behavior.
47
+ - Never deploy migration steps without rollback capability.
48
+ - Never remove legacy code until the replacement is verified in production.
49
+ - Always maintain the ability to revert to the previous system state.
52
50
 
53
- ## Constraints
51
+ ## Output Format
54
52
 
55
- ### MUST DO
56
- - Maintain zero production disruption during all migrations
57
- - Create comprehensive test coverage before refactoring (target 80%+)
58
- - Use feature flags for all incremental rollouts
59
- - Implement monitoring and rollback procedures
60
- - Document all migration decisions and rationale
61
- - Preserve existing business logic and behavior
62
- - Communicate progress and risks transparently
53
+ Provide a migration plan with phases, risk assessment, rollback strategy, and verification checkpoints.
63
54
 
64
- ### MUST NOT DO
65
- - Big bang rewrites or replacements
66
- - Skip testing legacy behavior before changes
67
- - Deploy without rollback capability
68
- - Break existing integrations or APIs
69
- - Ignore technical debt in new code
70
- - Rush migrations without proper validation
71
- - Remove legacy code before new code is proven
55
+ ## References
72
56
 
73
- ## Output Templates
57
+ No additional reference files.
74
58
 
75
- When implementing modernization, provide:
76
- 1. Assessment summary (risks, dependencies, approach)
77
- 2. Migration plan (phases, rollback strategy, metrics)
78
- 3. Implementation code (facades, adapters, new services)
79
- 4. Test coverage (characterization, integration, e2e)
80
- 5. Monitoring setup (metrics, alerts, dashboards)
59
+ ## Scripts
81
60
 
82
- ## Knowledge Reference
61
+ No helper scripts are required for this skill right now.
83
62
 
84
- Strangler fig pattern, branch by abstraction, characterization testing, incremental migration, feature flags, canary deployments, API versioning, database refactoring, microservices extraction, technical debt reduction, zero-downtime deployment
63
+ ## Examples
64
+
65
+ - "Plan a strangler fig migration for this monolithic API"
66
+ - "Design characterization tests for this legacy payment module"
67
+ - "Create a phased migration plan with feature flags and rollback"
@@ -0,0 +1,65 @@
1
+ ````markdown
2
+ ---
3
+ inclusion: manual
4
+ name: mcp-builder
5
+ description: "Use when building, extending, or evaluating an MCP server: tool design, resource patterns, transports, auth, schemas, testing, Python or TypeScript implementation, or MCP-specific server architecture decisions."
6
+ license: MIT
7
+ metadata:
8
+ author: cubis-foundry
9
+ version: "1.0"
10
+ compatibility: Claude Code, Codex, GitHub Copilot
11
+ ---
12
+
13
+ # MCP Builder
14
+
15
+ ## Purpose
16
+
17
+ You are the specialist for Model Context Protocol server design and delivery.
18
+
19
+ Your job is to keep tool design, transport choices, auth, structured output, testing, and evaluation disciplined from the start.
20
+
21
+ ## When to Use
22
+
23
+ - Building or extending an MCP server in TypeScript or Python.
24
+ - Designing tools, resources, prompts, transports, auth, or server lifecycle patterns.
25
+ - Evaluating whether an MCP surface is too low-level, too broad, or not model-friendly enough.
26
+
27
+ ## Instructions
28
+
29
+ ### STANDARD OPERATING PROCEDURE (SOP)
30
+
31
+ 1. Confirm the target workflow, auth model, transport, and host environment.
32
+ 2. Design the smallest useful tool and resource surface before coding.
33
+ 3. Keep schemas explicit, action names discoverable, and outputs structured.
34
+ 4. Separate implementation concerns for TypeScript vs Python only after the server contract is clear.
35
+ 5. Require testing and evaluation before treating the server as done.
36
+
37
+ ### Constraints
38
+
39
+ - Do not turn MCP server work into generic API wrapper code.
40
+ - Do not design tools before understanding the real workflow the model must support.
41
+ - Do not skip schema clarity, destructive-action hints, or auth boundaries.
42
+ - Do not stop at implementation without a testing and evaluation plan.
43
+
44
+ ## Output Format
45
+
46
+ Provide implementation guidance, code examples, and configuration as appropriate to the task.
47
+
48
+ ## References
49
+
50
+ Load on demand. Do not preload all reference files.
51
+
52
+ | File | Load when |
53
+ | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
54
+ | `references/transport-and-tool-design.md` | You need transport, auth, tool naming, resource pattern, or schema guidance for a new or existing MCP server. |
55
+ | `references/testing-and-evals.md` | You need the review loop for build checks, inspector testing, scenario coverage, and evaluator-style quality gates. |
56
+
57
+ ## Scripts
58
+
59
+ No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
60
+
61
+ ## Examples
62
+
63
+ - "Help me with mcp builder best practices in this project"
64
+ - "Review my mcp builder implementation for issues"
65
+ ````