@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.
Files changed (276) hide show
  1. package/CHANGELOG.md +23 -2
  2. package/dist/cli/core.js +9 -22
  3. package/dist/cli/core.js.map +1 -1
  4. package/package.json +1 -1
  5. package/src/cli/core.ts +13 -22
  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
  271. package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +65 -42
  272. package/workflows/workflows/agent-environment-setup/platforms/claude/rules/CLAUDE.md +8 -6
  273. package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +65 -41
  274. package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md +8 -6
  275. package/workflows/workflows/agent-environment-setup/shared/rules/STEERING.md +9 -8
  276. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/codex.md +1 -1
@@ -0,0 +1,198 @@
1
+ ---
2
+ name: agent-design
3
+ description: "Use when designing, building, or improving a CBX agent, skill, or workflow: clarification strategy, progressive disclosure structure, workflow pattern selection (sequential, parallel, evaluator-optimizer), skill type taxonomy, description tuning, and eval-first testing."
4
+ license: MIT
5
+ metadata:
6
+ author: cubis-foundry
7
+ version: "1.0"
8
+ compatibility: Claude Code, Codex, GitHub Copilot, Gemini CLI
9
+ ---
10
+
11
+ # Agent Design
12
+
13
+ ## Purpose
14
+
15
+ You are the specialist for designing CBX agents and skills that behave intelligently — asking the right questions, knowing when to pause, executing in the right workflow pattern, and testing their own output.
16
+
17
+ Your job is to close the gap between "it kinda works" and "it works reliably under any input."
18
+
19
+ ## When to Use
20
+
21
+ - Designing or refactoring a SKILL.md or POWER.md
22
+ - Choosing between sequential, parallel, or evaluator-optimizer workflow
23
+ - Writing clarification logic for an agent that handles ambiguous requests
24
+ - Deciding whether a task needs a skill or just a prompt
25
+ - Testing whether a skill actually works as intended
26
+ - Writing descriptions that trigger the right skill at the right time
27
+
28
+ ## Core Principles
29
+
30
+ These come directly from Anthropic's agent engineering research (["Equipping agents for the real world"](https://claude.com/blog/equipping-agents-for-the-real-world-with-agent-skills), March 2026):
31
+
32
+ 1. **Progressive disclosure** — A skill's SKILL.md provides just enough context to know when to load it. Full instructions, references, and scripts are loaded lazily, only when needed. More context in a single file does not equal better behavior — it usually hurts it.
33
+
34
+ 2. **Eval before optimizing** — Define what "good looks like" (test cases + success criteria) before editing the skill. This prevents regression and tells you when improvement actually happened.
35
+
36
+ 3. **Description precision** — The `description` field in YAML frontmatter controls triggering. Too broad = false positives. Too narrow = the skill never fires. Tune it like a search query.
37
+
38
+ 4. **Two skill types** — See [Skill Type Taxonomy](#skill-type-taxonomy). These need different testing strategies and have different shelf lives.
39
+
40
+ 5. **Start with a single agent** — Before adding workflow complexity, first try a single agent with a rich prompt. Only add orchestration when it measurably improves results.
41
+
42
+ ## Skill Type Taxonomy
43
+
44
+ | Type | What it does | Testing goal | Shelf life |
45
+ | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- | ------------------------------------------------------- |
46
+ | **Capability uplift** | Teaches Claude to do something it can't do alone (e.g. manipulate PDFs, fill forms, use a domain-specific API) | Verify the output is correct and consistent | Medium — may become obsolete as models improve |
47
+ | **Encoded preference** | Sequences steps Claude could do individually, but in your team's specific order and style (e.g. NDA review checklist, weekly update format) | Verify fidelity to the actual workflow | High — these stay useful because they're uniquely yours |
48
+
49
+ Design question: "Is this skill teaching Claude something new, or encoding how we do things?"
50
+
51
+ ## Clarification Strategy
52
+
53
+ An agent that starts wrong wastes everyone's time. Smart agents pause at the right moments.
54
+
55
+ Load `references/clarification-patterns.md` when:
56
+
57
+ - Designing how a skill should handle ambiguous or underspecified inputs
58
+ - Writing the early steps of a workflow where user intent matters
59
+ - Deciding what questions to ask vs. what to infer
60
+
61
+ ## Workflow Pattern Selection
62
+
63
+ Three patterns cover 95% of production agent workflows:
64
+
65
+ | Pattern | Use when | Cost | Benefit |
66
+ | ----------------------- | --------------------------------------------------------------- | ----------------------- | ----------------------------------------- |
67
+ | **Sequential** | Steps have dependencies (B needs A's output) | Latency (linear) | Focus: each step does one thing well |
68
+ | **Parallel** | Steps are independent and concurrency helps | Tokens (multiplicative) | Speed + separation of concerns |
69
+ | **Evaluator-optimizer** | First-draft quality isn't good enough and quality is measurable | Tokens × iterations | Better output through structured feedback |
70
+
71
+ Default to sequential. Add parallel when latency is the bottleneck and tasks are genuinely independent. Add evaluator-optimizer only when you can measure the improvement.
72
+
73
+ Load `references/workflow-patterns.md` for the full decision tree, examples, and anti-patterns.
74
+
75
+ ## Progressive Disclosure Structure
76
+
77
+ A well-structured CBX skill looks like:
78
+
79
+ ```
80
+ skill-name/
81
+ SKILL.md ← lean entry: name, description, purpose, when-to-use, load-table
82
+ references/ ← detailed guides loaded lazily when step requires it
83
+ topic-a.md
84
+ topic-b.md
85
+ commands/ ← slash commands (optional)
86
+ command.md
87
+ scripts/ ← executable code (optional)
88
+ helper.py
89
+ ```
90
+
91
+ **SKILL.md should be loadable in <2000 tokens.** Everything else lives in references.
92
+
93
+ The metadata table pattern that works:
94
+
95
+ ```markdown
96
+ ## References
97
+
98
+ | File | Load when |
99
+ | ----------------------- | ------------------------------------------ |
100
+ | `references/topic-a.md` | Task involves [specific trigger condition] |
101
+ | `references/topic-b.md` | Task involves [specific trigger condition] |
102
+ ```
103
+
104
+ This lets the agent make intelligent decisions about what context to load rather than ingesting everything upfront.
105
+
106
+ ## Description Writing
107
+
108
+ The `description` field is a trigger — write it like a search query, not marketing copy.
109
+
110
+ **Good description:**
111
+
112
+ ```yaml
113
+ description: "Use when evaluating an agent, skill, workflow, or MCP server: rubric design, evaluator-optimizer loops, LLM-as-judge patterns, regression suites, or prototype-vs-production quality gaps."
114
+ ```
115
+
116
+ **Bad description:**
117
+
118
+ ```yaml
119
+ description: "A comprehensive skill for evaluating things and making sure they work well."
120
+ ```
121
+
122
+ Rules:
123
+
124
+ - Lead with the specific trigger verb: "Use when [user does X]"
125
+ - List the specific task types with commas — these act like search keywords
126
+ - Include domain-specific nouns the user would actually type
127
+ - Avoid generic adjectives ("comprehensive", "powerful", "advanced")
128
+
129
+ Test your description: would a user's natural-language request match the intent of these words?
130
+
131
+ ## Testing a Skill
132
+
133
+ Before shipping, verify with this checklist:
134
+
135
+ 1. **Positive trigger** — Does the skill load when it should? Test 5 natural phrasings of the target task.
136
+ 2. **Negative trigger** — Does it stay quiet when it shouldn't load? Test 5 near-miss phrasings.
137
+ 3. **Happy path** — Does the skill complete the standard task correctly?
138
+ 4. **Edge cases** — What happens with missing input, ambiguous phrasing, or edge-case content?
139
+ 5. **Reader test** — Run the delivery (e.g., a generated doc, a plan) through a fresh sub-agent with no context. Can it answer questions about the output correctly?
140
+
141
+ For formal regression suites, load `references/skill-testing.md`.
142
+
143
+ ## Instructions
144
+
145
+ ### Step 1 — Understand the design task
146
+
147
+ Before touching any file, clarify:
148
+
149
+ - Is this a new skill or improving an existing one?
150
+ - Is it capability uplift or encoded preference?
151
+ - What's the specific failure mode being fixed?
152
+ - What would passing look like?
153
+
154
+ If any of these are unclear, apply the clarification pattern from `references/clarification-patterns.md`.
155
+
156
+ ### Step 2 — Choose the structure
157
+
158
+ - If the skill is simple (single task, single purpose): lean SKILL.md with no references
159
+ - If the skill is complex (multiple phases, conditional logic): SKILL.md + references loaded lazily
160
+ - If the skill has reusable commands: add `commands/` directory
161
+
162
+ ### Step 3 — Design the workflow
163
+
164
+ Use the pattern selection table above. Start with sequential. Prove you need complexity before adding it.
165
+
166
+ ### Step 4 — Write the description
167
+
168
+ Write it last. Once you know what the skill does and how it differs from adjacent skills, the right description is usually obvious.
169
+
170
+ ### Step 5 — Define a test
171
+
172
+ Write at least 3 test cases (input → expected output or behavior) before considering the skill done. These become the regression suite.
173
+
174
+ ## Output Format
175
+
176
+ Deliver:
177
+
178
+ 1. **Skill structure** — directory layout, file list
179
+ 2. **SKILL.md** — production-ready with lean body and reference table
180
+ 3. **Reference files** — if needed, each scoped to a specific phase or topic
181
+ 4. **Test cases** — 3-5 natural language inputs with expected behaviors
182
+ 5. **Description** — the final `description` field, tuned for triggering
183
+
184
+ ## References
185
+
186
+ | File | Load when |
187
+ | -------------------------------------- | ------------------------------------------------------------------------------ |
188
+ | `references/clarification-patterns.md` | Designing how the agent handles ambiguous or underspecified input |
189
+ | `references/workflow-patterns.md` | Choosing or implementing sequential, parallel, or evaluator-optimizer workflow |
190
+ | `references/skill-testing.md` | Writing evals, regression sets, or triggering tests for a skill |
191
+
192
+ ## Examples
193
+
194
+ - "Design a skill for our NDA review process — it should follow our checklist exactly."
195
+ - "The feature-forge skill triggers on the wrong prompts. Help me fix the description."
196
+ - "How do I test whether my skill still works after a model update?"
197
+ - "I need a workflow where 3 agents review code in parallel then one synthesizes findings."
198
+ - "This skill's SKILL.md is 4000 tokens. Help me split it into lean structure with references."
@@ -0,0 +1,153 @@
1
+ # Clarification Patterns Reference
2
+
3
+ Load this when designing how an agent handles ambiguous, underspecified, or multi-interpretation input.
4
+
5
+ Source: Anthropic doc-coauthoring skill pattern + CBX ask-questions-if-underspecified research (2026).
6
+
7
+ ---
8
+
9
+ ## When to Clarify vs. When to Infer
10
+
11
+ The wrong default is to ask everything. The right default is to ask what genuinely branches the work.
12
+
13
+ **Clarify** when:
14
+
15
+ - Multiple plausible interpretations produce significantly different implementations
16
+ - The wrong interpretation wastes significant time or produces the wrong output
17
+ - A key parameter (scope, audience, constraint) changes the entire approach
18
+
19
+ **Infer and state assumptions** when:
20
+
21
+ - A quick read (repo structure, config file, existing code) can answer the question
22
+ - The request is clear for 90%+ of the obvious interpretations
23
+ - The user explicitly asked you to proceed
24
+
25
+ **Proceed without asking** when:
26
+
27
+ - The task is clear and unambiguous
28
+ - Discovery is faster than asking
29
+ - The cost of being slightly wrong is low and reversible
30
+
31
+ ---
32
+
33
+ ## The 1-5 Question Rule
34
+
35
+ Ask at most **5 questions** in the first pass. Prefer questions that eliminate entire branches of work.
36
+
37
+ If more than 5 things are unclear, rank by impact and ask the highest-impact ones first. More questions surface after the user's first answers.
38
+
39
+ ---
40
+
41
+ ## Fast-Path Design
42
+
43
+ Every clarification block should have a fast path. Users who know what they want shouldn't wade through 5 questions.
44
+
45
+ **Include always:**
46
+
47
+ - A compact reply format: `"Reply 1b 2a 3c to accept these options"`
48
+ - Default options explicitly labeled: `(default)` or _bolded_
49
+ - A fast-path shortcut: `"Reply 'defaults' to accept all recommended choices"`
50
+
51
+ **Example block:**
52
+
53
+ ```
54
+ Before I start, a few quick questions:
55
+
56
+ 1. **Scope?**
57
+ a) Only the requested function **(default)**
58
+ b) Refactor any touched code
59
+ c) Not sure — use default
60
+
61
+ 2. **Framework target?**
62
+ a) Match existing project **(default)**
63
+ b) Specify: ___
64
+
65
+ 3. **Test coverage?**
66
+ a) None needed **(default)**
67
+ b) Unit tests alongside
68
+ c) Full integration test
69
+
70
+ Reply with numbers and letters (e.g., `1a 2a 3b`) or `defaults` to proceed with all defaults.
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Three-Stage Context Gathering (for complex tasks)
76
+
77
+ Use this when a task is substantial enough that getting it wrong = significant wasted work. Borrowed from Anthropic's doc-coauthoring skill.
78
+
79
+ ### Stage 1: Initial Questions (meta-context)
80
+
81
+ Ask 3-5 questions about the big-picture framing before touching the content:
82
+
83
+ - What type of deliverable is this? (spec, code, doc, design, plan)
84
+ - Who's the audience / consumer of this output?
85
+ - What's the definition of done — what would make this clearly successful?
86
+ - Are there constraints (framework, format, performance bar, audience knowledge level)?
87
+ - Is there an existing template or precedent to follow?
88
+
89
+ Tell the user they can answer in shorthand. Offer: "Or just dump your context and I'll ask follow-ups."
90
+
91
+ ### Stage 2: Info Dump + Follow-up
92
+
93
+ After initial answers, invite a full brain dump:
94
+
95
+ > "Dump everything you know about this — background, prior decisions, constraints, blockers, opinions. Don't organize it, just get it out."
96
+
97
+ Then ask targeted follow-up questions based on gaps in what they provided. Aim for 5-10 numbered follow-ups. Users can use shorthand (e.g., "1: yes, 2: see previous context, 3: no").
98
+
99
+ **Exit condition for Stage 2:** You understand the objective, the constraints, and at least one clear definition of success.
100
+
101
+ ### Stage 3: Confirm Interpretation, Then Proceed
102
+
103
+ Restate the requirements in 1-3 sentences before starting work:
104
+
105
+ > "Here's my understanding: [objective in one sentence]. [Key constraint]. [What done looks like]. Starting now — let me know if anything's off."
106
+
107
+ ---
108
+
109
+ ## Reader Test (for deliverables)
110
+
111
+ When the deliverable is substantial (a plan, a document, a design decision), test it with a fresh context before handing it to the user.
112
+
113
+ **How:** Invoke a sub-agent or fresh prompt with only the deliverable (no conversation history) and ask:
114
+
115
+ - "What is this about?"
116
+ - "What are the key decisions made here?"
117
+ - "What's missing or unclear?"
118
+
119
+ If the fresh read surfaces gaps the user would have found, fix them first.
120
+
121
+ **When to use:** After generating complex plans, multi-section documents, architecture decisions, or any output that will be read by someone without conversation context.
122
+
123
+ ---
124
+
125
+ ## Clarification Anti-Patterns
126
+
127
+ Avoid these:
128
+
129
+ | Anti-pattern | Problem |
130
+ | ------------------------------------ | ------------------------------------------------------------ |
131
+ | Asking everything upfront | Overwhelms users; many questions are answerable by inference |
132
+ | Asking about things you can discover | Read the file/repo before asking about it |
133
+ | No default options | Forces users to reason through every option |
134
+ | Open-ended questions without choices | High friction; users don't know the option space |
135
+ | Not restating interpretation | User doesn't know what you understood |
136
+ | Asking the same question twice | Signals you didn't read the answer |
137
+ | Asking about reversible decisions | Just pick one and move; it can be changed |
138
+
139
+ ---
140
+
141
+ ## Decision: Which Pattern to Use
142
+
143
+ ```
144
+ Is the task clear and unambiguous?
145
+ → YES: Proceed. State assumptions inline if any.
146
+ → NO: Is missing info discoverable by reading files/code?
147
+ → YES: Read first, then proceed or ask a single targeted question.
148
+ → NO: Is this a quick task where wrong interpretation is cheap?
149
+ → YES: Proceed with stated assumptions, invite correction.
150
+ → NO: Use the 1-5 Question Rule or Three-Stage Context Gathering.
151
+ ```
152
+
153
+ Use Three-Stage context gathering only for substantial deliverables (docs, plans, architecture, complex features). For code tasks, the 1-5 question rule is usually sufficient.
@@ -0,0 +1,164 @@
1
+ # Skill Testing Reference
2
+
3
+ Load this when writing evals, regression sets, or description-triggering tests for a CBX skill.
4
+
5
+ Source: Anthropic skill-creator research — [Improving skill-creator: Test, measure, and refine Agent Skills](https://claude.com/blog/improving-skill-creator-test-measure-and-refine-agent-skills) (March 2026).
6
+
7
+ ---
8
+
9
+ ## Two Reasons to Test
10
+
11
+ 1. **Catch regressions** — As models and infrastructure evolve, skills that worked last month may behave differently. Evals give you an early signal before it impacts your team.
12
+ 2. **Know when the skill is obsolete** — For _capability uplift_ skills: if the base model starts passing your evals without the skill loaded, the skill has been incorporated into model behavior and can be retired.
13
+
14
+ ---
15
+
16
+ ## Five Test Categories
17
+
18
+ Every skill should pass all five before shipping.
19
+
20
+ ### 1. Trigger tests (description precision)
21
+
22
+ Does the skill load when it should — and stay quiet when it shouldn't?
23
+
24
+ **Method:**
25
+
26
+ - Write 5 natural-language prompts that _should_ trigger the skill
27
+ - Write 5 near-miss prompts that _should not_ trigger
28
+ - Load the skill and observe whether it activates
29
+
30
+ **Example for a frontend-design skill:**
31
+
32
+ ```
33
+ Should trigger:
34
+ - "Build me a landing page for my SaaS product"
35
+ - "Make this dashboard look less generic"
36
+ - "I need a color system for a health app"
37
+
38
+ Should NOT trigger:
39
+ - "Fix this TypeScript error"
40
+ - "Review my API endpoint design"
41
+ - "Help me write tests"
42
+ ```
43
+
44
+ **Fix:** If false positives occur, make the description more specific. If false negatives, broaden or add domain keywords.
45
+
46
+ ### 2. Happy path test
47
+
48
+ Does the skill complete its standard task correctly?
49
+
50
+ **Method:**
51
+
52
+ - Write the most common, straightforward version of the task the skill handles
53
+ - Run it and verify the output meets the expected criteria
54
+
55
+ ### 3. Edge case tests
56
+
57
+ What happens under abnormal or missing input?
58
+
59
+ Examples:
60
+
61
+ - Missing required information (no brand color, no framework specified)
62
+ - Ambiguous phrasing
63
+ - Conflicting requirements
64
+ - Very large or very small input
65
+ - The user ignored the clarification questions and just said "do it"
66
+
67
+ ### 4. Comparison test (A/B)
68
+
69
+ Does the skill actually improve output vs. no skill?
70
+
71
+ **Method:** Run the same prompt with and without the skill loaded. Judge which output is better — ideally with a fresh evaluator agent that doesn't know which is which.
72
+
73
+ If the no-skill output is equivalent, the skill adds no value (or the model has caught up to it).
74
+
75
+ ### 5. Reader test
76
+
77
+ Can someone with no conversation context understand the skill's output?
78
+
79
+ **Method:**
80
+
81
+ - Take the skill's final output (plan, document, code, design)
82
+ - Open a fresh conversation or use a sub-agent with only the output, no history
83
+ - Ask: "What is this?", "What are the key decisions?", "What's unclear?"
84
+
85
+ If the fresh reader struggles, the output has context bleed issues. Fix them before shipping.
86
+
87
+ ---
88
+
89
+ ## Writing Eval Cases
90
+
91
+ Each eval case = one input + expected behavior description.
92
+
93
+ **Format:**
94
+
95
+ ```
96
+ Input: [natural language prompt or file +prompt]
97
+ Expected:
98
+ - [Observable behavior 1]
99
+ - [Observable behavior 2]
100
+ - [Observable behavior 3 — what NOT to happen]
101
+ ```
102
+
103
+ **Example for `ask-questions-if-underspecified`:**
104
+
105
+ ```
106
+ Input: "Build me a feature."
107
+ Expected:
108
+ - Asks at least 1 clarifying question (scope, purpose, or constraints)
109
+ - Provides default options to choose from
110
+ - Does NOT immediately generate code
111
+ - Does NOT ask more than 5 questions
112
+ ```
113
+
114
+ **Rules:**
115
+
116
+ - Evals should be independent (not dependent on previous evals)
117
+ - Expected behavior should be observable and binary (pass/fail, not subjective)
118
+ - Aim for 5-10 evals per skill before shipping; 15+ for critical skills
119
+
120
+ ---
121
+
122
+ ## Benchmark Mode
123
+
124
+ Run all evals after a model update or after editing the skill:
125
+
126
+ 1. Run all evals sequentially (or in parallel to avoid context bleed)
127
+ 2. Record: pass rate, elapsed time per eval, token usage
128
+ 3. Compare to baseline before the change
129
+
130
+ **Pass rate thresholds:**
131
+
132
+ - < 60%: Skill has serious issues. Do not ship.
133
+ - 60-80%: Acceptable for early versions. Target improvement.
134
+ - > 80%: Production-ready.
135
+ - > 90%: Reliable enough for critical workflows.
136
+
137
+ ---
138
+
139
+ ## Description Tuning Process
140
+
141
+ If triggering is unreliable:
142
+
143
+ 1. List 10 prompts that should trigger the skill (write them as a user would)
144
+ 2. List 5 prompts of similar tasks that should _not_ trigger
145
+ 3. Find the distinguishing words/phrases between the two lists
146
+ 4. Rewrite the description to include the distinguishing words and exclude the overlap
147
+
148
+ **Pattern:**
149
+
150
+ ```yaml
151
+ description: "Use when [specific verb] [specific noun/domain]: [comma-separated task keywords]. NOT for [adjacent tasks that should not trigger]."
152
+ ```
153
+
154
+ ---
155
+
156
+ ## When to Retire a Skill
157
+
158
+ A skill is ready to retire when:
159
+
160
+ - 90%+ of its evals pass without the skill loaded (for capability uplift skills)
161
+ - The skill's instructions are now standard model behavior
162
+ - Maintenance cost exceeds value
163
+
164
+ Retiring isn't failure — it means the skill did its job and the model caught up.