@cubis/foundry 0.3.71 → 0.3.73
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.
- package/CHANGELOG.md +23 -2
- package/dist/cli/core.js +9 -22
- package/dist/cli/core.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/core.ts +13 -22
- package/workflows/powers/accessibility/POWER.md +83 -94
- package/workflows/powers/accessibility/SKILL.md +82 -94
- package/workflows/powers/agent-design/POWER.md +201 -0
- package/workflows/powers/agent-design/SKILL.md +198 -0
- package/workflows/powers/agent-design/references/clarification-patterns.md +153 -0
- package/workflows/powers/agent-design/references/skill-testing.md +164 -0
- package/workflows/powers/agent-design/references/workflow-patterns.md +226 -0
- package/workflows/powers/agentic-eval/POWER.md +62 -0
- package/workflows/powers/agentic-eval/SKILL.md +59 -0
- package/workflows/powers/agentic-eval/references/rubric-and-regression-checklist.md +11 -0
- package/workflows/powers/api-designer/POWER.md +43 -71
- package/workflows/powers/api-designer/SKILL.md +43 -71
- package/workflows/powers/api-patterns/POWER.md +42 -56
- package/workflows/powers/api-patterns/SKILL.md +42 -57
- package/workflows/powers/architecture-designer/POWER.md +43 -60
- package/workflows/powers/architecture-designer/SKILL.md +43 -60
- package/workflows/powers/ask-questions-if-underspecified/POWER.md +51 -3
- package/workflows/powers/auth-architect/POWER.md +69 -0
- package/workflows/powers/auth-architect/SKILL.md +66 -0
- package/workflows/powers/auth-architect/references/session-token-policy-checklist.md +45 -0
- package/workflows/powers/behavioral-modes/POWER.md +100 -9
- package/workflows/powers/c-pro/POWER.md +105 -0
- package/workflows/powers/c-pro/SKILL.md +102 -0
- package/workflows/powers/c-pro/references/build-systems-and-toolchains.md +148 -0
- package/workflows/powers/c-pro/references/common-ub-and-portability.md +166 -0
- package/workflows/powers/c-pro/references/debugging-with-sanitizers.md +205 -0
- package/workflows/powers/c-pro/references/memory-safety-and-build-checklist.md +60 -0
- package/workflows/powers/c-pro/references/posix-and-platform-apis.md +244 -0
- package/workflows/powers/changelog-generator/POWER.md +127 -63
- package/workflows/powers/changelog-generator/SKILL.md +126 -63
- package/workflows/powers/ci-cd-pipelines/POWER.md +156 -0
- package/workflows/powers/ci-cd-pipelines/SKILL.md +153 -0
- package/workflows/powers/ci-cd-pipelines/references/github-actions-patterns.md +160 -0
- package/workflows/powers/ci-cd-pipelines/references/pipeline-security-checklist.md +57 -0
- package/workflows/powers/cli-developer/POWER.md +152 -95
- package/workflows/powers/cli-developer/SKILL.md +152 -95
- package/workflows/powers/cpp-pro/POWER.md +111 -0
- package/workflows/powers/cpp-pro/SKILL.md +108 -0
- package/workflows/powers/cpp-pro/references/concurrency-primitives.md +266 -0
- package/workflows/powers/cpp-pro/references/move-semantics-and-value-types.md +149 -0
- package/workflows/powers/cpp-pro/references/performance-and-profiling.md +191 -0
- package/workflows/powers/cpp-pro/references/raii-and-modern-cpp-checklist.md +87 -0
- package/workflows/powers/cpp-pro/references/template-and-concepts-patterns.md +205 -0
- package/workflows/powers/csharp-pro/POWER.md +47 -22
- package/workflows/powers/csharp-pro/SKILL.md +47 -22
- package/workflows/powers/dart-pro/POWER.md +68 -0
- package/workflows/powers/dart-pro/SKILL.md +65 -0
- package/workflows/powers/dart-pro/references/isolate-and-concurrency.md +180 -0
- package/workflows/powers/dart-pro/references/null-safety-and-async-patterns.md +133 -0
- package/workflows/powers/dart-pro/references/package-structure-and-linting.md +193 -0
- package/workflows/powers/dart-pro/references/sealed-records-patterns.md +173 -0
- package/workflows/powers/dart-pro/references/testing-and-mocking.md +235 -0
- package/workflows/powers/database-design/POWER.md +47 -33
- package/workflows/powers/database-design/SKILL.md +47 -33
- package/workflows/powers/database-optimizer/POWER.md +43 -64
- package/workflows/powers/database-optimizer/SKILL.md +43 -64
- package/workflows/powers/database-skills/POWER.md +59 -93
- package/workflows/powers/database-skills/SKILL.md +59 -93
- package/workflows/powers/debugging-strategies/POWER.md +69 -0
- package/workflows/powers/debugging-strategies/SKILL.md +66 -0
- package/workflows/powers/debugging-strategies/references/reproduce-isolate-verify-checklist.md +42 -0
- package/workflows/powers/deep-research/POWER.md +67 -0
- package/workflows/powers/deep-research/SKILL.md +64 -0
- package/workflows/powers/deep-research/references/multi-round-research-loop.md +80 -0
- package/workflows/powers/design-system-builder/POWER.md +130 -116
- package/workflows/powers/design-system-builder/SKILL.md +130 -116
- package/workflows/powers/devops-engineer/POWER.md +120 -57
- package/workflows/powers/devops-engineer/SKILL.md +120 -57
- package/workflows/powers/docker-kubernetes/POWER.md +94 -0
- package/workflows/powers/docker-kubernetes/SKILL.md +91 -0
- package/workflows/powers/docker-kubernetes/references/dockerfile-optimization-checklist.md +35 -0
- package/workflows/powers/docker-kubernetes/references/kubernetes-deployment-patterns.md +59 -0
- package/workflows/powers/documentation-templates/POWER.md +158 -127
- package/workflows/powers/documentation-templates/SKILL.md +158 -127
- package/workflows/powers/drizzle-expert/POWER.md +66 -0
- package/workflows/powers/drizzle-expert/SKILL.md +63 -0
- package/workflows/powers/drizzle-expert/references/runtime-pairing-matrix.md +16 -0
- package/workflows/powers/drizzle-expert/references/schema-and-migration-playbook.md +18 -0
- package/workflows/powers/error-ux-observability/POWER.md +144 -131
- package/workflows/powers/error-ux-observability/SKILL.md +143 -131
- package/workflows/powers/fastapi-expert/POWER.md +46 -60
- package/workflows/powers/fastapi-expert/SKILL.md +46 -60
- package/workflows/powers/firebase/POWER.md +65 -0
- package/workflows/powers/firebase/SKILL.md +62 -0
- package/workflows/powers/firebase/references/platform-routing.md +16 -0
- package/workflows/powers/firebase/references/rules-and-indexes-checklist.md +11 -0
- package/workflows/powers/flutter-design-system/POWER.md +63 -0
- package/workflows/powers/flutter-design-system/SKILL.md +60 -0
- package/workflows/powers/flutter-design-system/references/shared-widgets.md +29 -0
- package/workflows/powers/flutter-design-system/references/tokens-and-theme.md +34 -0
- package/workflows/powers/flutter-drift/POWER.md +65 -0
- package/workflows/powers/flutter-drift/SKILL.md +62 -0
- package/workflows/powers/flutter-drift/references/migrations.md +22 -0
- package/workflows/powers/flutter-drift/references/query-patterns.md +26 -0
- package/workflows/powers/flutter-feature/POWER.md +65 -0
- package/workflows/powers/flutter-feature/SKILL.md +62 -0
- package/workflows/powers/flutter-feature/references/architecture-rules.md +85 -0
- package/workflows/powers/flutter-feature/references/composite-provider.md +58 -0
- package/workflows/powers/flutter-feature/references/outbox-pattern.md +87 -0
- package/workflows/powers/flutter-feature/references/testing-patterns.md +218 -0
- package/workflows/powers/flutter-go-router/POWER.md +64 -0
- package/workflows/powers/flutter-go-router/SKILL.md +61 -0
- package/workflows/powers/flutter-go-router/references/guards-and-deeplinks.md +20 -0
- package/workflows/powers/flutter-go-router/references/typed-routes.md +27 -0
- package/workflows/powers/flutter-offline-sync/POWER.md +62 -0
- package/workflows/powers/flutter-offline-sync/SKILL.md +59 -0
- package/workflows/powers/flutter-offline-sync/references/outbox-full.md +44 -0
- package/workflows/powers/flutter-repository/POWER.md +64 -0
- package/workflows/powers/flutter-repository/SKILL.md +61 -0
- package/workflows/powers/flutter-repository/references/drift-patterns.md +21 -0
- package/workflows/powers/flutter-repository/references/retrofit-patterns.md +20 -0
- package/workflows/powers/flutter-riverpod/POWER.md +70 -0
- package/workflows/powers/flutter-riverpod/SKILL.md +67 -0
- package/workflows/powers/flutter-riverpod/references/async-and-mutations.md +19 -0
- package/workflows/powers/flutter-riverpod/references/async-lifecycle.md +19 -0
- package/workflows/powers/flutter-riverpod/references/provider-selection.md +20 -0
- package/workflows/powers/flutter-riverpod/references/testing.md +21 -0
- package/workflows/powers/flutter-riverpod/references/version-matrix.md +24 -0
- package/workflows/powers/flutter-state-machine/POWER.md +62 -0
- package/workflows/powers/flutter-state-machine/SKILL.md +59 -0
- package/workflows/powers/flutter-state-machine/references/app-state-contract.md +23 -0
- package/workflows/powers/flutter-state-machine/references/ui-rendering.md +14 -0
- package/workflows/powers/flutter-testing/POWER.md +64 -0
- package/workflows/powers/flutter-testing/SKILL.md +61 -0
- package/workflows/powers/flutter-testing/references/offline-sync-tests.md +16 -0
- package/workflows/powers/flutter-testing/references/test-layers.md +33 -0
- package/workflows/powers/frontend-code-review/POWER.md +137 -0
- package/workflows/powers/frontend-code-review/SKILL.md +134 -0
- package/workflows/powers/frontend-code-review/references/common-antipatterns.md +86 -0
- package/workflows/powers/frontend-code-review/references/performance-budgets.md +56 -0
- package/workflows/powers/frontend-code-review/references/review-checklists.md +47 -0
- package/workflows/powers/frontend-design/POWER.md +163 -362
- package/workflows/powers/frontend-design/SKILL.md +163 -362
- package/workflows/powers/game-development/POWER.md +57 -140
- package/workflows/powers/game-development/SKILL.md +57 -140
- package/workflows/powers/geo-fundamentals/POWER.md +64 -126
- package/workflows/powers/geo-fundamentals/SKILL.md +64 -127
- package/workflows/powers/git-workflow/POWER.md +135 -0
- package/workflows/powers/git-workflow/SKILL.md +132 -0
- package/workflows/powers/git-workflow/references/pr-review-checklist.md +63 -0
- package/workflows/powers/golang-pro/POWER.md +46 -35
- package/workflows/powers/golang-pro/SKILL.md +46 -35
- package/workflows/powers/graphql-architect/POWER.md +44 -62
- package/workflows/powers/graphql-architect/SKILL.md +44 -62
- package/workflows/powers/i18n-localization/POWER.md +118 -103
- package/workflows/powers/i18n-localization/SKILL.md +118 -103
- package/workflows/powers/java-pro/POWER.md +47 -22
- package/workflows/powers/java-pro/SKILL.md +47 -22
- package/workflows/powers/javascript-pro/POWER.md +47 -34
- package/workflows/powers/javascript-pro/SKILL.md +47 -34
- package/workflows/powers/kotlin-pro/POWER.md +46 -23
- package/workflows/powers/kotlin-pro/SKILL.md +46 -23
- package/workflows/powers/legacy-modernizer/POWER.md +43 -60
- package/workflows/powers/legacy-modernizer/SKILL.md +43 -60
- package/workflows/powers/mcp-builder/POWER.md +65 -0
- package/workflows/powers/mcp-builder/SKILL.md +62 -0
- package/workflows/powers/mcp-builder/references/testing-and-evals.md +17 -0
- package/workflows/powers/mcp-builder/references/transport-and-tool-design.md +17 -0
- package/workflows/powers/microservices-architect/POWER.md +43 -70
- package/workflows/powers/microservices-architect/SKILL.md +43 -70
- package/workflows/powers/mobile-design/POWER.md +110 -345
- package/workflows/powers/mobile-design/SKILL.md +110 -345
- package/workflows/powers/mongodb/POWER.md +67 -0
- package/workflows/powers/mongodb/SKILL.md +64 -0
- package/workflows/powers/mongodb/references/mongodb-checklist.md +20 -0
- package/workflows/powers/mysql/POWER.md +67 -0
- package/workflows/powers/mysql/SKILL.md +64 -0
- package/workflows/powers/mysql/references/mysql-checklist.md +20 -0
- package/workflows/powers/neki/POWER.md +67 -0
- package/workflows/powers/neki/SKILL.md +64 -0
- package/workflows/powers/neki/references/neki-checklist.md +18 -0
- package/workflows/powers/nestjs-expert/POWER.md +45 -91
- package/workflows/powers/nestjs-expert/SKILL.md +45 -91
- package/workflows/powers/nextjs-developer/POWER.md +51 -44
- package/workflows/powers/nextjs-developer/SKILL.md +51 -44
- package/workflows/powers/nodejs-best-practices/POWER.md +48 -29
- package/workflows/powers/nodejs-best-practices/SKILL.md +48 -29
- package/workflows/powers/observability/POWER.md +109 -0
- package/workflows/powers/observability/SKILL.md +106 -0
- package/workflows/powers/observability/references/alerting-and-slo-checklist.md +87 -0
- package/workflows/powers/observability/references/opentelemetry-setup-guide.md +121 -0
- package/workflows/powers/openai-docs/POWER.md +61 -0
- package/workflows/powers/openai-docs/SKILL.md +58 -0
- package/workflows/powers/openai-docs/references/official-source-playbook.md +10 -0
- package/workflows/powers/performance-profiling/POWER.md +61 -114
- package/workflows/powers/performance-profiling/SKILL.md +61 -114
- package/workflows/powers/php-pro/POWER.md +116 -0
- package/workflows/powers/php-pro/SKILL.md +113 -0
- package/workflows/powers/php-pro/references/architecture-and-di.md +239 -0
- package/workflows/powers/php-pro/references/modern-php-features.md +189 -0
- package/workflows/powers/php-pro/references/performance-and-deployment.md +197 -0
- package/workflows/powers/php-pro/references/php84-strict-typing-checklist.md +161 -0
- package/workflows/powers/php-pro/references/testing-and-static-analysis.md +235 -0
- package/workflows/powers/playwright-e2e/POWER.md +85 -0
- package/workflows/powers/playwright-e2e/SKILL.md +82 -0
- package/workflows/powers/playwright-e2e/references/locator-trace-flake-checklist.md +80 -0
- package/workflows/powers/postgres/POWER.md +67 -0
- package/workflows/powers/postgres/SKILL.md +64 -0
- package/workflows/powers/postgres/references/postgres-checklist.md +20 -0
- package/workflows/powers/prompt-engineer/POWER.md +47 -30
- package/workflows/powers/prompt-engineer/SKILL.md +47 -30
- package/workflows/powers/python-pro/POWER.md +47 -36
- package/workflows/powers/python-pro/SKILL.md +47 -36
- package/workflows/powers/react-best-practices/POWER.md +56 -33
- package/workflows/powers/react-best-practices/SKILL.md +56 -33
- package/workflows/powers/react-expert/POWER.md +47 -37
- package/workflows/powers/react-expert/SKILL.md +47 -37
- package/workflows/powers/redis/POWER.md +67 -0
- package/workflows/powers/redis/SKILL.md +64 -0
- package/workflows/powers/redis/references/redis-checklist.md +19 -0
- package/workflows/powers/ruby-pro/POWER.md +118 -0
- package/workflows/powers/ruby-pro/SKILL.md +115 -0
- package/workflows/powers/ruby-pro/references/modern-ruby-features.md +189 -0
- package/workflows/powers/ruby-pro/references/object-design-patterns.md +220 -0
- package/workflows/powers/ruby-pro/references/performance-and-profiling.md +224 -0
- package/workflows/powers/ruby-pro/references/ruby-concurrency-and-testing.md +190 -0
- package/workflows/powers/ruby-pro/references/testing-and-rspec.md +236 -0
- package/workflows/powers/rust-pro/POWER.md +45 -31
- package/workflows/powers/rust-pro/SKILL.md +45 -31
- package/workflows/powers/security-engineer/POWER.md +129 -0
- package/workflows/powers/security-engineer/SKILL.md +126 -0
- package/workflows/powers/seo-fundamentals/POWER.md +59 -102
- package/workflows/powers/seo-fundamentals/SKILL.md +59 -102
- package/workflows/powers/serverless-patterns/POWER.md +171 -0
- package/workflows/powers/serverless-patterns/SKILL.md +168 -0
- package/workflows/powers/skill-creator/POWER.md +90 -0
- package/workflows/powers/skill-creator/SKILL.md +87 -0
- package/workflows/powers/skill-creator/references/platform-formats.md +181 -0
- package/workflows/powers/skill-creator/references/schemas.md +430 -0
- package/workflows/powers/spec-miner/POWER.md +49 -57
- package/workflows/powers/spec-miner/SKILL.md +49 -57
- package/workflows/powers/sqlite/POWER.md +67 -0
- package/workflows/powers/sqlite/SKILL.md +64 -0
- package/workflows/powers/sqlite/references/sqlite-checklist.md +19 -0
- package/workflows/powers/sre-engineer/POWER.md +123 -64
- package/workflows/powers/sre-engineer/SKILL.md +123 -64
- package/workflows/powers/static-analysis/POWER.md +121 -77
- package/workflows/powers/static-analysis/SKILL.md +121 -77
- package/workflows/powers/stripe-best-practices/POWER.md +140 -17
- package/workflows/powers/stripe-best-practices/SKILL.md +139 -17
- package/workflows/powers/supabase/POWER.md +67 -0
- package/workflows/powers/supabase/SKILL.md +64 -0
- package/workflows/powers/supabase/references/supabase-checklist.md +19 -0
- package/workflows/powers/swift-pro/POWER.md +118 -0
- package/workflows/powers/swift-pro/SKILL.md +115 -0
- package/workflows/powers/swift-pro/references/concurrency-patterns.md +165 -0
- package/workflows/powers/swift-pro/references/protocol-and-generics.md +172 -0
- package/workflows/powers/swift-pro/references/sendable-and-isolation.md +116 -0
- package/workflows/powers/swift-pro/references/swift-concurrency-and-protocols.md +260 -0
- package/workflows/powers/swift-pro/references/testing-and-packages.md +192 -0
- package/workflows/powers/tailwind-patterns/POWER.md +71 -240
- package/workflows/powers/tailwind-patterns/SKILL.md +71 -240
- package/workflows/powers/testing-patterns/POWER.md +155 -10
- package/workflows/powers/testing-patterns/SKILL.md +155 -10
- package/workflows/powers/typescript-pro/POWER.md +47 -38
- package/workflows/powers/typescript-pro/SKILL.md +47 -38
- package/workflows/powers/vitess/POWER.md +67 -0
- package/workflows/powers/vitess/SKILL.md +64 -0
- package/workflows/powers/vitess/references/vitess-checklist.md +19 -0
- package/workflows/powers/vulnerability-scanner/POWER.md +146 -10
- package/workflows/powers/vulnerability-scanner/SKILL.md +146 -10
- package/workflows/powers/web-perf/POWER.md +43 -170
- package/workflows/powers/web-perf/SKILL.md +43 -170
- package/workflows/powers/webapp-testing/POWER.md +43 -164
- package/workflows/powers/webapp-testing/SKILL.md +43 -164
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +65 -42
- package/workflows/workflows/agent-environment-setup/platforms/claude/rules/CLAUDE.md +8 -6
- package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +65 -41
- package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md +8 -6
- package/workflows/workflows/agent-environment-setup/shared/rules/STEERING.md +9 -8
- package/workflows/workflows/agent-environment-setup/shared/rules/overrides/codex.md +1 -1
|
@@ -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
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
##
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
46
|
+
## Output Format
|
|
29
47
|
|
|
30
|
-
|
|
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
|
-
##
|
|
50
|
+
## References
|
|
37
51
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
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
|
-
##
|
|
60
|
+
## Scripts
|
|
44
61
|
|
|
45
|
-
|
|
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
|
-
##
|
|
64
|
+
## Examples
|
|
50
65
|
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
##
|
|
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
|
|
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
|
-
##
|
|
47
|
+
## References
|
|
24
48
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
##
|
|
57
|
+
## Scripts
|
|
31
58
|
|
|
32
|
-
|
|
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
|
-
##
|
|
61
|
+
## Examples
|
|
39
62
|
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
##
|
|
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
|
|
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
|
-
##
|
|
45
|
+
## References
|
|
22
46
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
##
|
|
55
|
+
## Scripts
|
|
29
56
|
|
|
30
|
-
|
|
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
|
-
##
|
|
59
|
+
## Examples
|
|
37
60
|
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
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
|
|
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:
|
|
9
|
-
version: "1.0
|
|
10
|
-
|
|
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
|
-
|
|
15
|
+
## Purpose
|
|
21
16
|
|
|
22
|
-
|
|
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
|
-
|
|
19
|
+
## When to Use
|
|
25
20
|
|
|
26
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
45
|
+
### Constraints
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
##
|
|
53
|
+
## Output Format
|
|
56
54
|
|
|
57
|
-
|
|
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
|
-
|
|
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
|
-
|
|
59
|
+
No additional reference files.
|
|
76
60
|
|
|
77
|
-
|
|
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
|
-
|
|
63
|
+
No helper scripts are required for this skill right now.
|
|
85
64
|
|
|
86
|
-
|
|
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
|
|
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:
|
|
7
|
-
version: "1.0
|
|
8
|
-
|
|
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
|
-
|
|
13
|
+
## Purpose
|
|
19
14
|
|
|
20
|
-
|
|
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
|
-
|
|
17
|
+
## When to Use
|
|
23
18
|
|
|
24
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
43
|
+
### Constraints
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
##
|
|
51
|
+
## Output Format
|
|
54
52
|
|
|
55
|
-
|
|
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
|
-
|
|
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
|
-
|
|
57
|
+
No additional reference files.
|
|
74
58
|
|
|
75
|
-
|
|
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
|
-
|
|
61
|
+
No helper scripts are required for this skill right now.
|
|
83
62
|
|
|
84
|
-
|
|
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
|
+
````
|