claude-all-config 2.0.0

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 (167) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSE.md +70 -0
  3. package/README.md +133 -0
  4. package/VERSION +1 -0
  5. package/agents/accessibility-reviewer.md +96 -0
  6. package/agents/ai-prompt-optimizer.md +94 -0
  7. package/agents/api-tester.md +102 -0
  8. package/agents/code-generator.md +94 -0
  9. package/agents/code-reviewer.md +47 -0
  10. package/agents/component-generator.md +102 -0
  11. package/agents/doc-generator.md +91 -0
  12. package/agents/migration-generator.md +94 -0
  13. package/agents/performance-analyzer.md +90 -0
  14. package/agents/proactive-mode.md +91 -0
  15. package/agents/readme-generator.md +101 -0
  16. package/agents/security-auditor.md +86 -0
  17. package/agents/terraform-generator.md +94 -0
  18. package/agents/test-generator.md +76 -0
  19. package/bin/agentrouter.json +36 -0
  20. package/bin/ai-chat +20 -0
  21. package/bin/antigravity.json +76 -0
  22. package/bin/api-manager +340 -0
  23. package/bin/claude-launcher +19 -0
  24. package/bin/claude-master +15 -0
  25. package/bin/claude_master.py +295 -0
  26. package/bin/cohere.json +7 -0
  27. package/bin/deepseek.json +44 -0
  28. package/bin/gemini.json +56 -0
  29. package/bin/glm.json +21 -0
  30. package/bin/groq.json +41 -0
  31. package/bin/minimax.json +26 -0
  32. package/bin/mistral.json +7 -0
  33. package/bin/moonshot.json +7 -0
  34. package/bin/ollama.json +36 -0
  35. package/bin/openai.json +46 -0
  36. package/bin/openrouter.json +38 -0
  37. package/bin/perplexity.json +12 -0
  38. package/bin/qwen.json +7 -0
  39. package/bin/switch-provider +73 -0
  40. package/bin/test.json +7 -0
  41. package/bin/xai.json +41 -0
  42. package/claude-all +2707 -0
  43. package/claude-config.json +340 -0
  44. package/claude-suite/REFACTORING_SUMMARY.md +88 -0
  45. package/claude-suite/auth/.antigravity_proxy.py +78 -0
  46. package/claude-suite/auth/__pycache__/openai_auth.cpython-312.pyc +0 -0
  47. package/claude-suite/auth/gemini_auth.py +80 -0
  48. package/claude-suite/auth/openai_auth.py +138 -0
  49. package/claude-suite/backups/claude-all-before-refactor +1075 -0
  50. package/claude-suite/backups/claude-all.backup +840 -0
  51. package/claude-suite/backups/claude-all.original +840 -0
  52. package/claude-suite/models/add-model-manual.sh +588 -0
  53. package/claude-suite/models/add-model.sh +114 -0
  54. package/claude-suite/models/model-switcher.sh +69 -0
  55. package/claude-suite/providers/claude-glm +89 -0
  56. package/claude-suite/providers/claude-glm-wrapper.sh +55 -0
  57. package/claude-suite/providers/claude-minimax +12 -0
  58. package/claude-suite/providers/claude-smart +132 -0
  59. package/claude-suite/providers/xai_chat.sh +56 -0
  60. package/claude-suite/utils/__pycache__/claude_master.cpython-312.pyc +0 -0
  61. package/claude-suite/utils/antigravity_proxy_server.py +168 -0
  62. package/claude-suite/utils/claude-all-help.txt +83 -0
  63. package/claude-suite/utils/claude_master.py +408 -0
  64. package/commands/brainstorm.md +5 -0
  65. package/commands/execute-plan.md +5 -0
  66. package/commands/write-plan.md +5 -0
  67. package/docs/ANTIGRAVITY-SETUP.md +176 -0
  68. package/docs/AUTH_CREDENTIALS.md +54 -0
  69. package/docs/NPM-INSTALLATION.md +166 -0
  70. package/hooks/hooks.json +15 -0
  71. package/hooks/run-hook.cmd +19 -0
  72. package/hooks/session-start.sh +52 -0
  73. package/install.sh +155 -0
  74. package/mcp.json +34 -0
  75. package/model/perplexity.json +12 -0
  76. package/package.json +69 -0
  77. package/plugins/README.md +47 -0
  78. package/plugins/installed_plugins.json +317 -0
  79. package/plugins/known_marketplaces.json +10 -0
  80. package/plugins/marketplace-info/marketplace.json +517 -0
  81. package/postinstall.js +100 -0
  82. package/scripts/antigravity_proxy_server.py +168 -0
  83. package/scripts/get_gemini_api_key.py +96 -0
  84. package/scripts/setup_antigravity_auth.py +171 -0
  85. package/skills/api-development/SKILL.md +11 -0
  86. package/skills/api-development/openapi/api-documentation.yaml +108 -0
  87. package/skills/brainstorming/SKILL.md +54 -0
  88. package/skills/code-quality/SKILL.md +196 -0
  89. package/skills/condition-based-waiting/SKILL.md +120 -0
  90. package/skills/condition-based-waiting/example.ts +158 -0
  91. package/skills/database-development/SKILL.md +11 -0
  92. package/skills/database-development/migrations/migration.template.sql +49 -0
  93. package/skills/defense-in-depth/SKILL.md +127 -0
  94. package/skills/deployment/SKILL.md +11 -0
  95. package/skills/deployment/ci-cd/github-actions.yml +95 -0
  96. package/skills/deployment/docker/Dockerfile.template +39 -0
  97. package/skills/dispatching-parallel-agents/SKILL.md +180 -0
  98. package/skills/documentation-generation/SKILL.md +8 -0
  99. package/skills/documentation-generation/templates/README.template.md +60 -0
  100. package/skills/error-handling/SKILL.md +267 -0
  101. package/skills/executing-plans/SKILL.md +76 -0
  102. package/skills/finishing-a-development-branch/SKILL.md +200 -0
  103. package/skills/frontend-design/frontend-design/SKILL.md +42 -0
  104. package/skills/integration-testing/SKILL.md +13 -0
  105. package/skills/integration-testing/examples/contract-test.py +317 -0
  106. package/skills/integration-testing/examples/e2e-test.js +147 -0
  107. package/skills/integration-testing/examples/test-isolation.md +94 -0
  108. package/skills/logging-monitoring/SKILL.md +66 -0
  109. package/skills/mobile-development/SKILL.md +11 -0
  110. package/skills/mobile-development/responsive/responsive.css +80 -0
  111. package/skills/performance-optimization/SKILL.md +9 -0
  112. package/skills/performance-optimization/profiling/profile.template.js +21 -0
  113. package/skills/receiving-code-review/SKILL.md +209 -0
  114. package/skills/refactoring/SKILL.md +11 -0
  115. package/skills/refactoring/code-smells/common-smells.md +115 -0
  116. package/skills/requesting-code-review/SKILL.md +105 -0
  117. package/skills/requesting-code-review/code-reviewer.md +146 -0
  118. package/skills/root-cause-tracing/SKILL.md +174 -0
  119. package/skills/root-cause-tracing/find-polluter.sh +63 -0
  120. package/skills/security-review/SKILL.md +11 -0
  121. package/skills/security-review/checklists/owasp-checklist.md +31 -0
  122. package/skills/sharing-skills/SKILL.md +194 -0
  123. package/skills/subagent-driven-development/SKILL.md +240 -0
  124. package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +20 -0
  125. package/skills/subagent-driven-development/implementer-prompt.md +78 -0
  126. package/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  127. package/skills/systematic-debugging/CREATION-LOG.md +119 -0
  128. package/skills/systematic-debugging/SKILL.md +295 -0
  129. package/skills/systematic-debugging/test-academic.md +14 -0
  130. package/skills/systematic-debugging/test-pressure-1.md +58 -0
  131. package/skills/systematic-debugging/test-pressure-2.md +68 -0
  132. package/skills/systematic-debugging/test-pressure-3.md +69 -0
  133. package/skills/test-driven-development/SKILL.md +364 -0
  134. package/skills/testing-anti-patterns/SKILL.md +302 -0
  135. package/skills/testing-skills-with-subagents/SKILL.md +387 -0
  136. package/skills/testing-skills-with-subagents/examples/CLAUDE_MD_TESTING.md +189 -0
  137. package/skills/ui-ux-review/SKILL.md +13 -0
  138. package/skills/ui-ux-review/checklists/ux-heuristics.md +61 -0
  139. package/skills/using-git-worktrees/SKILL.md +213 -0
  140. package/skills/using-superpowers/SKILL.md +101 -0
  141. package/skills/verification-before-completion/SKILL.md +139 -0
  142. package/skills/writing-plans/SKILL.md +116 -0
  143. package/skills/writing-skills/SKILL.md +622 -0
  144. package/skills/writing-skills/anthropic-best-practices.md +1150 -0
  145. package/skills/writing-skills/graphviz-conventions.dot +172 -0
  146. package/skills/writing-skills/persuasion-principles.md +187 -0
  147. package/update.sh +36 -0
  148. package/utils/check-superpowers.sh +114 -0
  149. package/utils/claude-branding.md +166 -0
  150. package/utils/config.js +185 -0
  151. package/utils/custom-claude-config.sh +89 -0
  152. package/utils/custom-claude-hooks.md +129 -0
  153. package/utils/custom-claude-lib.js +222 -0
  154. package/utils/customize-claude-ui.sh +162 -0
  155. package/utils/fix-claude-integration.sh +133 -0
  156. package/utils/help.js +125 -0
  157. package/utils/install-curl.ps1 +135 -0
  158. package/utils/install-curl.sh +525 -0
  159. package/utils/install-superpowers.js +411 -0
  160. package/utils/install.js +298 -0
  161. package/utils/install.sh +182 -0
  162. package/utils/postinstall.js +63 -0
  163. package/utils/rename-claude.sh +96 -0
  164. package/utils/uninstall-superpowers.js +273 -0
  165. package/utils/uninstall.ps1 +136 -0
  166. package/utils/uninstall.sh +163 -0
  167. package/utils/update.sh +160 -0
@@ -0,0 +1,622 @@
1
+ ---
2
+ name: writing-skills
3
+ description: Use when creating new skills, editing existing skills, or verifying skills work before deployment - applies TDD to process documentation by testing with subagents before writing, iterating until bulletproof against rationalization
4
+ ---
5
+
6
+ # Writing Skills
7
+
8
+ ## Overview
9
+
10
+ **Writing skills IS Test-Driven Development applied to process documentation.**
11
+
12
+ **Personal skills live in agent-specific directories (`~/.claude/skills` for Claude Code, `~/.codex/skills` for Codex)**
13
+
14
+ You write test cases (pressure scenarios with subagents), watch them fail (baseline behavior), write the skill (documentation), watch tests pass (agents comply), and refactor (close loopholes).
15
+
16
+ **Core principle:** If you didn't watch an agent fail without the skill, you don't know if the skill teaches the right thing.
17
+
18
+ **REQUIRED BACKGROUND:** You MUST understand superpowers:test-driven-development before using this skill. That skill defines the fundamental RED-GREEN-REFACTOR cycle. This skill adapts TDD to documentation.
19
+
20
+ **Official guidance:** For Anthropic's official skill authoring best practices, see anthropic-best-practices.md. This document provides additional patterns and guidelines that complement the TDD-focused approach in this skill.
21
+
22
+ ## What is a Skill?
23
+
24
+ A **skill** is a reference guide for proven techniques, patterns, or tools. Skills help future Claude instances find and apply effective approaches.
25
+
26
+ **Skills are:** Reusable techniques, patterns, tools, reference guides
27
+
28
+ **Skills are NOT:** Narratives about how you solved a problem once
29
+
30
+ ## TDD Mapping for Skills
31
+
32
+ | TDD Concept | Skill Creation |
33
+ |-------------|----------------|
34
+ | **Test case** | Pressure scenario with subagent |
35
+ | **Production code** | Skill document (SKILL.md) |
36
+ | **Test fails (RED)** | Agent violates rule without skill (baseline) |
37
+ | **Test passes (GREEN)** | Agent complies with skill present |
38
+ | **Refactor** | Close loopholes while maintaining compliance |
39
+ | **Write test first** | Run baseline scenario BEFORE writing skill |
40
+ | **Watch it fail** | Document exact rationalizations agent uses |
41
+ | **Minimal code** | Write skill addressing those specific violations |
42
+ | **Watch it pass** | Verify agent now complies |
43
+ | **Refactor cycle** | Find new rationalizations → plug → re-verify |
44
+
45
+ The entire skill creation process follows RED-GREEN-REFACTOR.
46
+
47
+ ## When to Create a Skill
48
+
49
+ **Create when:**
50
+ - Technique wasn't intuitively obvious to you
51
+ - You'd reference this again across projects
52
+ - Pattern applies broadly (not project-specific)
53
+ - Others would benefit
54
+
55
+ **Don't create for:**
56
+ - One-off solutions
57
+ - Standard practices well-documented elsewhere
58
+ - Project-specific conventions (put in CLAUDE.md)
59
+
60
+ ## Skill Types
61
+
62
+ ### Technique
63
+ Concrete method with steps to follow (condition-based-waiting, root-cause-tracing)
64
+
65
+ ### Pattern
66
+ Way of thinking about problems (flatten-with-flags, test-invariants)
67
+
68
+ ### Reference
69
+ API docs, syntax guides, tool documentation (office docs)
70
+
71
+ ## Directory Structure
72
+
73
+
74
+ ```
75
+ skills/
76
+ skill-name/
77
+ SKILL.md # Main reference (required)
78
+ supporting-file.* # Only if needed
79
+ ```
80
+
81
+ **Flat namespace** - all skills in one searchable namespace
82
+
83
+ **Separate files for:**
84
+ 1. **Heavy reference** (100+ lines) - API docs, comprehensive syntax
85
+ 2. **Reusable tools** - Scripts, utilities, templates
86
+
87
+ **Keep inline:**
88
+ - Principles and concepts
89
+ - Code patterns (< 50 lines)
90
+ - Everything else
91
+
92
+ ## SKILL.md Structure
93
+
94
+ **Frontmatter (YAML):**
95
+ - Only two fields supported: `name` and `description`
96
+ - Max 1024 characters total
97
+ - `name`: Use letters, numbers, and hyphens only (no parentheses, special chars)
98
+ - `description`: Third-person, includes BOTH what it does AND when to use it
99
+ - Start with "Use when..." to focus on triggering conditions
100
+ - Include specific symptoms, situations, and contexts
101
+ - Keep under 500 characters if possible
102
+
103
+ ```markdown
104
+ ---
105
+ name: Skill-Name-With-Hyphens
106
+ description: Use when [specific triggering conditions and symptoms] - [what the skill does and how it helps, written in third person]
107
+ ---
108
+
109
+ # Skill Name
110
+
111
+ ## Overview
112
+ What is this? Core principle in 1-2 sentences.
113
+
114
+ ## When to Use
115
+ [Small inline flowchart IF decision non-obvious]
116
+
117
+ Bullet list with SYMPTOMS and use cases
118
+ When NOT to use
119
+
120
+ ## Core Pattern (for techniques/patterns)
121
+ Before/after code comparison
122
+
123
+ ## Quick Reference
124
+ Table or bullets for scanning common operations
125
+
126
+ ## Implementation
127
+ Inline code for simple patterns
128
+ Link to file for heavy reference or reusable tools
129
+
130
+ ## Common Mistakes
131
+ What goes wrong + fixes
132
+
133
+ ## Real-World Impact (optional)
134
+ Concrete results
135
+ ```
136
+
137
+
138
+ ## Claude Search Optimization (CSO)
139
+
140
+ **Critical for discovery:** Future Claude needs to FIND your skill
141
+
142
+ ### 1. Rich Description Field
143
+
144
+ **Purpose:** Claude reads description to decide which skills to load for a given task. Make it answer: "Should I read this skill right now?"
145
+
146
+ **Format:** Start with "Use when..." to focus on triggering conditions, then explain what it does
147
+
148
+ **Content:**
149
+ - Use concrete triggers, symptoms, and situations that signal this skill applies
150
+ - Describe the *problem* (race conditions, inconsistent behavior) not *language-specific symptoms* (setTimeout, sleep)
151
+ - Keep triggers technology-agnostic unless the skill itself is technology-specific
152
+ - If skill is technology-specific, make that explicit in the trigger
153
+ - Write in third person (injected into system prompt)
154
+
155
+ ```yaml
156
+ # ❌ BAD: Too abstract, vague, doesn't include when to use
157
+ description: For async testing
158
+
159
+ # ❌ BAD: First person
160
+ description: I can help you with async tests when they're flaky
161
+
162
+ # ❌ BAD: Mentions technology but skill isn't specific to it
163
+ description: Use when tests use setTimeout/sleep and are flaky
164
+
165
+ # ✅ GOOD: Starts with "Use when", describes problem, then what it does
166
+ description: Use when tests have race conditions, timing dependencies, or pass/fail inconsistently - replaces arbitrary timeouts with condition polling for reliable async tests
167
+
168
+ # ✅ GOOD: Technology-specific skill with explicit trigger
169
+ description: Use when using React Router and handling authentication redirects - provides patterns for protected routes and auth state management
170
+ ```
171
+
172
+ ### 2. Keyword Coverage
173
+
174
+ Use words Claude would search for:
175
+ - Error messages: "Hook timed out", "ENOTEMPTY", "race condition"
176
+ - Symptoms: "flaky", "hanging", "zombie", "pollution"
177
+ - Synonyms: "timeout/hang/freeze", "cleanup/teardown/afterEach"
178
+ - Tools: Actual commands, library names, file types
179
+
180
+ ### 3. Descriptive Naming
181
+
182
+ **Use active voice, verb-first:**
183
+ - ✅ `creating-skills` not `skill-creation`
184
+ - ✅ `testing-skills-with-subagents` not `subagent-skill-testing`
185
+
186
+ ### 4. Token Efficiency (Critical)
187
+
188
+ **Problem:** getting-started and frequently-referenced skills load into EVERY conversation. Every token counts.
189
+
190
+ **Target word counts:**
191
+ - getting-started workflows: <150 words each
192
+ - Frequently-loaded skills: <200 words total
193
+ - Other skills: <500 words (still be concise)
194
+
195
+ **Techniques:**
196
+
197
+ **Move details to tool help:**
198
+ ```bash
199
+ # ❌ BAD: Document all flags in SKILL.md
200
+ search-conversations supports --text, --both, --after DATE, --before DATE, --limit N
201
+
202
+ # ✅ GOOD: Reference --help
203
+ search-conversations supports multiple modes and filters. Run --help for details.
204
+ ```
205
+
206
+ **Use cross-references:**
207
+ ```markdown
208
+ # ❌ BAD: Repeat workflow details
209
+ When searching, dispatch subagent with template...
210
+ [20 lines of repeated instructions]
211
+
212
+ # ✅ GOOD: Reference other skill
213
+ Always use subagents (50-100x context savings). REQUIRED: Use [other-skill-name] for workflow.
214
+ ```
215
+
216
+ **Compress examples:**
217
+ ```markdown
218
+ # ❌ BAD: Verbose example (42 words)
219
+ your human partner: "How did we handle authentication errors in React Router before?"
220
+ You: I'll search past conversations for React Router authentication patterns.
221
+ [Dispatch subagent with search query: "React Router authentication error handling 401"]
222
+
223
+ # ✅ GOOD: Minimal example (20 words)
224
+ Partner: "How did we handle auth errors in React Router?"
225
+ You: Searching...
226
+ [Dispatch subagent → synthesis]
227
+ ```
228
+
229
+ **Eliminate redundancy:**
230
+ - Don't repeat what's in cross-referenced skills
231
+ - Don't explain what's obvious from command
232
+ - Don't include multiple examples of same pattern
233
+
234
+ **Verification:**
235
+ ```bash
236
+ wc -w skills/path/SKILL.md
237
+ # getting-started workflows: aim for <150 each
238
+ # Other frequently-loaded: aim for <200 total
239
+ ```
240
+
241
+ **Name by what you DO or core insight:**
242
+ - ✅ `condition-based-waiting` > `async-test-helpers`
243
+ - ✅ `using-skills` not `skill-usage`
244
+ - ✅ `flatten-with-flags` > `data-structure-refactoring`
245
+ - ✅ `root-cause-tracing` > `debugging-techniques`
246
+
247
+ **Gerunds (-ing) work well for processes:**
248
+ - `creating-skills`, `testing-skills`, `debugging-with-logs`
249
+ - Active, describes the action you're taking
250
+
251
+ ### 4. Cross-Referencing Other Skills
252
+
253
+ **When writing documentation that references other skills:**
254
+
255
+ Use skill name only, with explicit requirement markers:
256
+ - ✅ Good: `**REQUIRED SUB-SKILL:** Use superpowers:test-driven-development`
257
+ - ✅ Good: `**REQUIRED BACKGROUND:** You MUST understand superpowers:systematic-debugging`
258
+ - ❌ Bad: `See skills/testing/test-driven-development` (unclear if required)
259
+ - ❌ Bad: `@skills/testing/test-driven-development/SKILL.md` (force-loads, burns context)
260
+
261
+ **Why no @ links:** `@` syntax force-loads files immediately, consuming 200k+ context before you need them.
262
+
263
+ ## Flowchart Usage
264
+
265
+ ```dot
266
+ digraph when_flowchart {
267
+ "Need to show information?" [shape=diamond];
268
+ "Decision where I might go wrong?" [shape=diamond];
269
+ "Use markdown" [shape=box];
270
+ "Small inline flowchart" [shape=box];
271
+
272
+ "Need to show information?" -> "Decision where I might go wrong?" [label="yes"];
273
+ "Decision where I might go wrong?" -> "Small inline flowchart" [label="yes"];
274
+ "Decision where I might go wrong?" -> "Use markdown" [label="no"];
275
+ }
276
+ ```
277
+
278
+ **Use flowcharts ONLY for:**
279
+ - Non-obvious decision points
280
+ - Process loops where you might stop too early
281
+ - "When to use A vs B" decisions
282
+
283
+ **Never use flowcharts for:**
284
+ - Reference material → Tables, lists
285
+ - Code examples → Markdown blocks
286
+ - Linear instructions → Numbered lists
287
+ - Labels without semantic meaning (step1, helper2)
288
+
289
+ See @graphviz-conventions.dot for graphviz style rules.
290
+
291
+ ## Code Examples
292
+
293
+ **One excellent example beats many mediocre ones**
294
+
295
+ Choose most relevant language:
296
+ - Testing techniques → TypeScript/JavaScript
297
+ - System debugging → Shell/Python
298
+ - Data processing → Python
299
+
300
+ **Good example:**
301
+ - Complete and runnable
302
+ - Well-commented explaining WHY
303
+ - From real scenario
304
+ - Shows pattern clearly
305
+ - Ready to adapt (not generic template)
306
+
307
+ **Don't:**
308
+ - Implement in 5+ languages
309
+ - Create fill-in-the-blank templates
310
+ - Write contrived examples
311
+
312
+ You're good at porting - one great example is enough.
313
+
314
+ ## File Organization
315
+
316
+ ### Self-Contained Skill
317
+ ```
318
+ defense-in-depth/
319
+ SKILL.md # Everything inline
320
+ ```
321
+ When: All content fits, no heavy reference needed
322
+
323
+ ### Skill with Reusable Tool
324
+ ```
325
+ condition-based-waiting/
326
+ SKILL.md # Overview + patterns
327
+ example.ts # Working helpers to adapt
328
+ ```
329
+ When: Tool is reusable code, not just narrative
330
+
331
+ ### Skill with Heavy Reference
332
+ ```
333
+ pptx/
334
+ SKILL.md # Overview + workflows
335
+ pptxgenjs.md # 600 lines API reference
336
+ ooxml.md # 500 lines XML structure
337
+ scripts/ # Executable tools
338
+ ```
339
+ When: Reference material too large for inline
340
+
341
+ ## The Iron Law (Same as TDD)
342
+
343
+ ```
344
+ NO SKILL WITHOUT A FAILING TEST FIRST
345
+ ```
346
+
347
+ This applies to NEW skills AND EDITS to existing skills.
348
+
349
+ Write skill before testing? Delete it. Start over.
350
+ Edit skill without testing? Same violation.
351
+
352
+ **No exceptions:**
353
+ - Not for "simple additions"
354
+ - Not for "just adding a section"
355
+ - Not for "documentation updates"
356
+ - Don't keep untested changes as "reference"
357
+ - Don't "adapt" while running tests
358
+ - Delete means delete
359
+
360
+ **REQUIRED BACKGROUND:** The superpowers:test-driven-development skill explains why this matters. Same principles apply to documentation.
361
+
362
+ ## Testing All Skill Types
363
+
364
+ Different skill types need different test approaches:
365
+
366
+ ### Discipline-Enforcing Skills (rules/requirements)
367
+
368
+ **Examples:** TDD, verification-before-completion, designing-before-coding
369
+
370
+ **Test with:**
371
+ - Academic questions: Do they understand the rules?
372
+ - Pressure scenarios: Do they comply under stress?
373
+ - Multiple pressures combined: time + sunk cost + exhaustion
374
+ - Identify rationalizations and add explicit counters
375
+
376
+ **Success criteria:** Agent follows rule under maximum pressure
377
+
378
+ ### Technique Skills (how-to guides)
379
+
380
+ **Examples:** condition-based-waiting, root-cause-tracing, defensive-programming
381
+
382
+ **Test with:**
383
+ - Application scenarios: Can they apply the technique correctly?
384
+ - Variation scenarios: Do they handle edge cases?
385
+ - Missing information tests: Do instructions have gaps?
386
+
387
+ **Success criteria:** Agent successfully applies technique to new scenario
388
+
389
+ ### Pattern Skills (mental models)
390
+
391
+ **Examples:** reducing-complexity, information-hiding concepts
392
+
393
+ **Test with:**
394
+ - Recognition scenarios: Do they recognize when pattern applies?
395
+ - Application scenarios: Can they use the mental model?
396
+ - Counter-examples: Do they know when NOT to apply?
397
+
398
+ **Success criteria:** Agent correctly identifies when/how to apply pattern
399
+
400
+ ### Reference Skills (documentation/APIs)
401
+
402
+ **Examples:** API documentation, command references, library guides
403
+
404
+ **Test with:**
405
+ - Retrieval scenarios: Can they find the right information?
406
+ - Application scenarios: Can they use what they found correctly?
407
+ - Gap testing: Are common use cases covered?
408
+
409
+ **Success criteria:** Agent finds and correctly applies reference information
410
+
411
+ ## Common Rationalizations for Skipping Testing
412
+
413
+ | Excuse | Reality |
414
+ |--------|---------|
415
+ | "Skill is obviously clear" | Clear to you ≠ clear to other agents. Test it. |
416
+ | "It's just a reference" | References can have gaps, unclear sections. Test retrieval. |
417
+ | "Testing is overkill" | Untested skills have issues. Always. 15 min testing saves hours. |
418
+ | "I'll test if problems emerge" | Problems = agents can't use skill. Test BEFORE deploying. |
419
+ | "Too tedious to test" | Testing is less tedious than debugging bad skill in production. |
420
+ | "I'm confident it's good" | Overconfidence guarantees issues. Test anyway. |
421
+ | "Academic review is enough" | Reading ≠ using. Test application scenarios. |
422
+ | "No time to test" | Deploying untested skill wastes more time fixing it later. |
423
+
424
+ **All of these mean: Test before deploying. No exceptions.**
425
+
426
+ ## Bulletproofing Skills Against Rationalization
427
+
428
+ Skills that enforce discipline (like TDD) need to resist rationalization. Agents are smart and will find loopholes when under pressure.
429
+
430
+ **Psychology note:** Understanding WHY persuasion techniques work helps you apply them systematically. See persuasion-principles.md for research foundation (Cialdini, 2021; Meincke et al., 2025) on authority, commitment, scarcity, social proof, and unity principles.
431
+
432
+ ### Close Every Loophole Explicitly
433
+
434
+ Don't just state the rule - forbid specific workarounds:
435
+
436
+ <Bad>
437
+ ```markdown
438
+ Write code before test? Delete it.
439
+ ```
440
+ </Bad>
441
+
442
+ <Good>
443
+ ```markdown
444
+ Write code before test? Delete it. Start over.
445
+
446
+ **No exceptions:**
447
+ - Don't keep it as "reference"
448
+ - Don't "adapt" it while writing tests
449
+ - Don't look at it
450
+ - Delete means delete
451
+ ```
452
+ </Good>
453
+
454
+ ### Address "Spirit vs Letter" Arguments
455
+
456
+ Add foundational principle early:
457
+
458
+ ```markdown
459
+ **Violating the letter of the rules is violating the spirit of the rules.**
460
+ ```
461
+
462
+ This cuts off entire class of "I'm following the spirit" rationalizations.
463
+
464
+ ### Build Rationalization Table
465
+
466
+ Capture rationalizations from baseline testing (see Testing section below). Every excuse agents make goes in the table:
467
+
468
+ ```markdown
469
+ | Excuse | Reality |
470
+ |--------|---------|
471
+ | "Too simple to test" | Simple code breaks. Test takes 30 seconds. |
472
+ | "I'll test after" | Tests passing immediately prove nothing. |
473
+ | "Tests after achieve same goals" | Tests-after = "what does this do?" Tests-first = "what should this do?" |
474
+ ```
475
+
476
+ ### Create Red Flags List
477
+
478
+ Make it easy for agents to self-check when rationalizing:
479
+
480
+ ```markdown
481
+ ## Red Flags - STOP and Start Over
482
+
483
+ - Code before test
484
+ - "I already manually tested it"
485
+ - "Tests after achieve the same purpose"
486
+ - "It's about spirit not ritual"
487
+ - "This is different because..."
488
+
489
+ **All of these mean: Delete code. Start over with TDD.**
490
+ ```
491
+
492
+ ### Update CSO for Violation Symptoms
493
+
494
+ Add to description: symptoms of when you're ABOUT to violate the rule:
495
+
496
+ ```yaml
497
+ description: use when implementing any feature or bugfix, before writing implementation code
498
+ ```
499
+
500
+ ## RED-GREEN-REFACTOR for Skills
501
+
502
+ Follow the TDD cycle:
503
+
504
+ ### RED: Write Failing Test (Baseline)
505
+
506
+ Run pressure scenario with subagent WITHOUT the skill. Document exact behavior:
507
+ - What choices did they make?
508
+ - What rationalizations did they use (verbatim)?
509
+ - Which pressures triggered violations?
510
+
511
+ This is "watch the test fail" - you must see what agents naturally do before writing the skill.
512
+
513
+ ### GREEN: Write Minimal Skill
514
+
515
+ Write skill that addresses those specific rationalizations. Don't add extra content for hypothetical cases.
516
+
517
+ Run same scenarios WITH skill. Agent should now comply.
518
+
519
+ ### REFACTOR: Close Loopholes
520
+
521
+ Agent found new rationalization? Add explicit counter. Re-test until bulletproof.
522
+
523
+ **REQUIRED SUB-SKILL:** Use superpowers:testing-skills-with-subagents for the complete testing methodology:
524
+ - How to write pressure scenarios
525
+ - Pressure types (time, sunk cost, authority, exhaustion)
526
+ - Plugging holes systematically
527
+ - Meta-testing techniques
528
+
529
+ ## Anti-Patterns
530
+
531
+ ### ❌ Narrative Example
532
+ "In session 2025-10-03, we found empty projectDir caused..."
533
+ **Why bad:** Too specific, not reusable
534
+
535
+ ### ❌ Multi-Language Dilution
536
+ example-js.js, example-py.py, example-go.go
537
+ **Why bad:** Mediocre quality, maintenance burden
538
+
539
+ ### ❌ Code in Flowcharts
540
+ ```dot
541
+ step1 [label="import fs"];
542
+ step2 [label="read file"];
543
+ ```
544
+ **Why bad:** Can't copy-paste, hard to read
545
+
546
+ ### ❌ Generic Labels
547
+ helper1, helper2, step3, pattern4
548
+ **Why bad:** Labels should have semantic meaning
549
+
550
+ ## STOP: Before Moving to Next Skill
551
+
552
+ **After writing ANY skill, you MUST STOP and complete the deployment process.**
553
+
554
+ **Do NOT:**
555
+ - Create multiple skills in batch without testing each
556
+ - Move to next skill before current one is verified
557
+ - Skip testing because "batching is more efficient"
558
+
559
+ **The deployment checklist below is MANDATORY for EACH skill.**
560
+
561
+ Deploying untested skills = deploying untested code. It's a violation of quality standards.
562
+
563
+ ## Skill Creation Checklist (TDD Adapted)
564
+
565
+ **IMPORTANT: Use TodoWrite to create todos for EACH checklist item below.**
566
+
567
+ **RED Phase - Write Failing Test:**
568
+ - [ ] Create pressure scenarios (3+ combined pressures for discipline skills)
569
+ - [ ] Run scenarios WITHOUT skill - document baseline behavior verbatim
570
+ - [ ] Identify patterns in rationalizations/failures
571
+
572
+ **GREEN Phase - Write Minimal Skill:**
573
+ - [ ] Name uses only letters, numbers, hyphens (no parentheses/special chars)
574
+ - [ ] YAML frontmatter with only name and description (max 1024 chars)
575
+ - [ ] Description starts with "Use when..." and includes specific triggers/symptoms
576
+ - [ ] Description written in third person
577
+ - [ ] Keywords throughout for search (errors, symptoms, tools)
578
+ - [ ] Clear overview with core principle
579
+ - [ ] Address specific baseline failures identified in RED
580
+ - [ ] Code inline OR link to separate file
581
+ - [ ] One excellent example (not multi-language)
582
+ - [ ] Run scenarios WITH skill - verify agents now comply
583
+
584
+ **REFACTOR Phase - Close Loopholes:**
585
+ - [ ] Identify NEW rationalizations from testing
586
+ - [ ] Add explicit counters (if discipline skill)
587
+ - [ ] Build rationalization table from all test iterations
588
+ - [ ] Create red flags list
589
+ - [ ] Re-test until bulletproof
590
+
591
+ **Quality Checks:**
592
+ - [ ] Small flowchart only if decision non-obvious
593
+ - [ ] Quick reference table
594
+ - [ ] Common mistakes section
595
+ - [ ] No narrative storytelling
596
+ - [ ] Supporting files only for tools or heavy reference
597
+
598
+ **Deployment:**
599
+ - [ ] Commit skill to git and push to your fork (if configured)
600
+ - [ ] Consider contributing back via PR (if broadly useful)
601
+
602
+ ## Discovery Workflow
603
+
604
+ How future Claude finds your skill:
605
+
606
+ 1. **Encounters problem** ("tests are flaky")
607
+ 3. **Finds SKILL** (description matches)
608
+ 4. **Scans overview** (is this relevant?)
609
+ 5. **Reads patterns** (quick reference table)
610
+ 6. **Loads example** (only when implementing)
611
+
612
+ **Optimize for this flow** - put searchable terms early and often.
613
+
614
+ ## The Bottom Line
615
+
616
+ **Creating skills IS TDD for process documentation.**
617
+
618
+ Same Iron Law: No skill without failing test first.
619
+ Same cycle: RED (baseline) → GREEN (write skill) → REFACTOR (close loopholes).
620
+ Same benefits: Better quality, fewer surprises, bulletproof results.
621
+
622
+ If you follow TDD for code, follow it for skills. It's the same discipline applied to documentation.