@protolabsai/proto 0.14.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 (85) hide show
  1. package/LICENSE +203 -0
  2. package/README.md +286 -0
  3. package/dist/bundled/adversarial-verification/SKILL.md +98 -0
  4. package/dist/bundled/brainstorming/SKILL.md +171 -0
  5. package/dist/bundled/coding-agent-standards/SKILL.md +67 -0
  6. package/dist/bundled/dispatching-parallel-agents/SKILL.md +193 -0
  7. package/dist/bundled/executing-plans/SKILL.md +77 -0
  8. package/dist/bundled/finishing-a-development-branch/SKILL.md +213 -0
  9. package/dist/bundled/loop/SKILL.md +61 -0
  10. package/dist/bundled/qc-helper/SKILL.md +151 -0
  11. package/dist/bundled/qc-helper/docs/_meta.ts +30 -0
  12. package/dist/bundled/qc-helper/docs/common-workflow.md +571 -0
  13. package/dist/bundled/qc-helper/docs/configuration/_meta.ts +10 -0
  14. package/dist/bundled/qc-helper/docs/configuration/auth.md +366 -0
  15. package/dist/bundled/qc-helper/docs/configuration/memory.md +0 -0
  16. package/dist/bundled/qc-helper/docs/configuration/model-providers.md +542 -0
  17. package/dist/bundled/qc-helper/docs/configuration/qwen-ignore.md +55 -0
  18. package/dist/bundled/qc-helper/docs/configuration/settings.md +652 -0
  19. package/dist/bundled/qc-helper/docs/configuration/themes.md +160 -0
  20. package/dist/bundled/qc-helper/docs/configuration/trusted-folders.md +61 -0
  21. package/dist/bundled/qc-helper/docs/extension/_meta.ts +9 -0
  22. package/dist/bundled/qc-helper/docs/extension/extension-releasing.md +121 -0
  23. package/dist/bundled/qc-helper/docs/extension/getting-started-extensions.md +299 -0
  24. package/dist/bundled/qc-helper/docs/extension/introduction.md +303 -0
  25. package/dist/bundled/qc-helper/docs/features/_meta.ts +18 -0
  26. package/dist/bundled/qc-helper/docs/features/approval-mode.md +263 -0
  27. package/dist/bundled/qc-helper/docs/features/arena.md +218 -0
  28. package/dist/bundled/qc-helper/docs/features/checkpointing.md +77 -0
  29. package/dist/bundled/qc-helper/docs/features/commands.md +312 -0
  30. package/dist/bundled/qc-helper/docs/features/headless.md +318 -0
  31. package/dist/bundled/qc-helper/docs/features/hooks.md +343 -0
  32. package/dist/bundled/qc-helper/docs/features/language.md +139 -0
  33. package/dist/bundled/qc-helper/docs/features/lsp.md +453 -0
  34. package/dist/bundled/qc-helper/docs/features/mcp.md +281 -0
  35. package/dist/bundled/qc-helper/docs/features/sandbox.md +241 -0
  36. package/dist/bundled/qc-helper/docs/features/scheduled-tasks.md +139 -0
  37. package/dist/bundled/qc-helper/docs/features/skills.md +289 -0
  38. package/dist/bundled/qc-helper/docs/features/sub-agents.md +307 -0
  39. package/dist/bundled/qc-helper/docs/features/token-caching.md +29 -0
  40. package/dist/bundled/qc-helper/docs/ide-integration/_meta.ts +4 -0
  41. package/dist/bundled/qc-helper/docs/ide-integration/ide-companion-spec.md +182 -0
  42. package/dist/bundled/qc-helper/docs/ide-integration/ide-integration.md +144 -0
  43. package/dist/bundled/qc-helper/docs/integration-github-action.md +241 -0
  44. package/dist/bundled/qc-helper/docs/integration-jetbrains.md +81 -0
  45. package/dist/bundled/qc-helper/docs/integration-vscode.md +39 -0
  46. package/dist/bundled/qc-helper/docs/integration-zed.md +72 -0
  47. package/dist/bundled/qc-helper/docs/overview.md +64 -0
  48. package/dist/bundled/qc-helper/docs/quickstart.md +273 -0
  49. package/dist/bundled/qc-helper/docs/reference/_meta.ts +4 -0
  50. package/dist/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +72 -0
  51. package/dist/bundled/qc-helper/docs/reference/sdk-api.md +524 -0
  52. package/dist/bundled/qc-helper/docs/support/Uninstall.md +42 -0
  53. package/dist/bundled/qc-helper/docs/support/_meta.ts +6 -0
  54. package/dist/bundled/qc-helper/docs/support/tos-privacy.md +112 -0
  55. package/dist/bundled/qc-helper/docs/support/troubleshooting.md +123 -0
  56. package/dist/bundled/receiving-code-review/SKILL.md +226 -0
  57. package/dist/bundled/requesting-code-review/SKILL.md +115 -0
  58. package/dist/bundled/review/SKILL.md +123 -0
  59. package/dist/bundled/subagent-driven-development/SKILL.md +292 -0
  60. package/dist/bundled/subagent-driven-development/code-quality-reviewer-prompt.md +27 -0
  61. package/dist/bundled/subagent-driven-development/implementer-prompt.md +113 -0
  62. package/dist/bundled/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  63. package/dist/bundled/systematic-debugging/SKILL.md +305 -0
  64. package/dist/bundled/test-driven-development/SKILL.md +396 -0
  65. package/dist/bundled/using-git-worktrees/SKILL.md +223 -0
  66. package/dist/bundled/using-superpowers/SKILL.md +117 -0
  67. package/dist/bundled/verification-before-completion/SKILL.md +147 -0
  68. package/dist/bundled/writing-plans/SKILL.md +159 -0
  69. package/dist/bundled/writing-skills/SKILL.md +716 -0
  70. package/dist/cli.js +483432 -0
  71. package/dist/sandbox-macos-permissive-closed.sb +32 -0
  72. package/dist/sandbox-macos-permissive-open.sb +27 -0
  73. package/dist/sandbox-macos-permissive-proxied.sb +37 -0
  74. package/dist/sandbox-macos-restrictive-closed.sb +93 -0
  75. package/dist/sandbox-macos-restrictive-open.sb +96 -0
  76. package/dist/sandbox-macos-restrictive-proxied.sb +98 -0
  77. package/dist/vendor/ripgrep/COPYING +3 -0
  78. package/dist/vendor/ripgrep/arm64-darwin/rg +0 -0
  79. package/dist/vendor/ripgrep/arm64-linux/rg +0 -0
  80. package/dist/vendor/ripgrep/x64-darwin/rg +0 -0
  81. package/dist/vendor/ripgrep/x64-linux/rg +0 -0
  82. package/dist/vendor/ripgrep/x64-win32/rg.exe +0 -0
  83. package/dist/vendor/tree-sitter/tree-sitter-bash.wasm +0 -0
  84. package/dist/vendor/tree-sitter/tree-sitter.wasm +0 -0
  85. package/package.json +143 -0
@@ -0,0 +1,716 @@
1
+ ---
2
+ name: writing-skills
3
+ description: Use when creating new skills, editing existing skills, or verifying skills work before deployment
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, `~/.agents/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
+
51
+ - Technique wasn't intuitively obvious to you
52
+ - You'd reference this again across projects
53
+ - Pattern applies broadly (not project-specific)
54
+ - Others would benefit
55
+
56
+ **Don't create for:**
57
+
58
+ - One-off solutions
59
+ - Standard practices well-documented elsewhere
60
+ - Project-specific conventions (put in CLAUDE.md)
61
+ - Mechanical constraints (if it's enforceable with regex/validation, automate it—save documentation for judgment calls)
62
+
63
+ ## Skill Types
64
+
65
+ ### Technique
66
+
67
+ Concrete method with steps to follow (condition-based-waiting, root-cause-tracing)
68
+
69
+ ### Pattern
70
+
71
+ Way of thinking about problems (flatten-with-flags, test-invariants)
72
+
73
+ ### Reference
74
+
75
+ API docs, syntax guides, tool documentation (office docs)
76
+
77
+ ## Directory Structure
78
+
79
+ ```
80
+ skills/
81
+ skill-name/
82
+ SKILL.md # Main reference (required)
83
+ supporting-file.* # Only if needed
84
+ ```
85
+
86
+ **Flat namespace** - all skills in one searchable namespace
87
+
88
+ **Separate files for:**
89
+
90
+ 1. **Heavy reference** (100+ lines) - API docs, comprehensive syntax
91
+ 2. **Reusable tools** - Scripts, utilities, templates
92
+
93
+ **Keep inline:**
94
+
95
+ - Principles and concepts
96
+ - Code patterns (< 50 lines)
97
+ - Everything else
98
+
99
+ ## SKILL.md Structure
100
+
101
+ **Frontmatter (YAML):**
102
+
103
+ - Two required fields: `name` and `description` (see [agentskills.io/specification](https://agentskills.io/specification) for all supported fields)
104
+ - Max 1024 characters total
105
+ - `name`: Use letters, numbers, and hyphens only (no parentheses, special chars)
106
+ - `description`: Third-person, describes ONLY when to use (NOT what it does)
107
+ - Start with "Use when..." to focus on triggering conditions
108
+ - Include specific symptoms, situations, and contexts
109
+ - **NEVER summarize the skill's process or workflow** (see CSO section for why)
110
+ - Keep under 500 characters if possible
111
+
112
+ ```markdown
113
+ ---
114
+ name: Skill-Name-With-Hyphens
115
+ description: Use when [specific triggering conditions and symptoms]
116
+ ---
117
+
118
+ # Skill Name
119
+
120
+ ## Overview
121
+
122
+ What is this? Core principle in 1-2 sentences.
123
+
124
+ ## When to Use
125
+
126
+ [Small inline flowchart IF decision non-obvious]
127
+
128
+ Bullet list with SYMPTOMS and use cases
129
+ When NOT to use
130
+
131
+ ## Core Pattern (for techniques/patterns)
132
+
133
+ Before/after code comparison
134
+
135
+ ## Quick Reference
136
+
137
+ Table or bullets for scanning common operations
138
+
139
+ ## Implementation
140
+
141
+ Inline code for simple patterns
142
+ Link to file for heavy reference or reusable tools
143
+
144
+ ## Common Mistakes
145
+
146
+ What goes wrong + fixes
147
+
148
+ ## Real-World Impact (optional)
149
+
150
+ Concrete results
151
+ ```
152
+
153
+ ## Claude Search Optimization (CSO)
154
+
155
+ **Critical for discovery:** Future Claude needs to FIND your skill
156
+
157
+ ### 1. Rich Description Field
158
+
159
+ **Purpose:** Claude reads description to decide which skills to load for a given task. Make it answer: "Should I read this skill right now?"
160
+
161
+ **Format:** Start with "Use when..." to focus on triggering conditions
162
+
163
+ **CRITICAL: Description = When to Use, NOT What the Skill Does**
164
+
165
+ The description should ONLY describe triggering conditions. Do NOT summarize the skill's process or workflow in the description.
166
+
167
+ **Why this matters:** Testing revealed that when a description summarizes the skill's workflow, Claude may follow the description instead of reading the full skill content. A description saying "code review between tasks" caused Claude to do ONE review, even though the skill's flowchart clearly showed TWO reviews (spec compliance then code quality).
168
+
169
+ When the description was changed to just "Use when executing implementation plans with independent tasks" (no workflow summary), Claude correctly read the flowchart and followed the two-stage review process.
170
+
171
+ **The trap:** Descriptions that summarize workflow create a shortcut Claude will take. The skill body becomes documentation Claude skips.
172
+
173
+ ```yaml
174
+ # ❌ BAD: Summarizes workflow - Claude may follow this instead of reading skill
175
+ description: Use when executing plans - dispatches subagent per task with code review between tasks
176
+
177
+ # ❌ BAD: Too much process detail
178
+ description: Use for TDD - write test first, watch it fail, write minimal code, refactor
179
+
180
+ # ✅ GOOD: Just triggering conditions, no workflow summary
181
+ description: Use when executing implementation plans with independent tasks in the current session
182
+
183
+ # ✅ GOOD: Triggering conditions only
184
+ description: Use when implementing any feature or bugfix, before writing implementation code
185
+ ```
186
+
187
+ **Content:**
188
+
189
+ - Use concrete triggers, symptoms, and situations that signal this skill applies
190
+ - Describe the _problem_ (race conditions, inconsistent behavior) not _language-specific symptoms_ (setTimeout, sleep)
191
+ - Keep triggers technology-agnostic unless the skill itself is technology-specific
192
+ - If skill is technology-specific, make that explicit in the trigger
193
+ - Write in third person (injected into system prompt)
194
+ - **NEVER summarize the skill's process or workflow**
195
+
196
+ ```yaml
197
+ # ❌ BAD: Too abstract, vague, doesn't include when to use
198
+ description: For async testing
199
+
200
+ # ❌ BAD: First person
201
+ description: I can help you with async tests when they're flaky
202
+
203
+ # ❌ BAD: Mentions technology but skill isn't specific to it
204
+ description: Use when tests use setTimeout/sleep and are flaky
205
+
206
+ # ✅ GOOD: Starts with "Use when", describes problem, no workflow
207
+ description: Use when tests have race conditions, timing dependencies, or pass/fail inconsistently
208
+
209
+ # ✅ GOOD: Technology-specific skill with explicit trigger
210
+ description: Use when using React Router and handling authentication redirects
211
+ ```
212
+
213
+ ### 2. Keyword Coverage
214
+
215
+ Use words Claude would search for:
216
+
217
+ - Error messages: "Hook timed out", "ENOTEMPTY", "race condition"
218
+ - Symptoms: "flaky", "hanging", "zombie", "pollution"
219
+ - Synonyms: "timeout/hang/freeze", "cleanup/teardown/afterEach"
220
+ - Tools: Actual commands, library names, file types
221
+
222
+ ### 3. Descriptive Naming
223
+
224
+ **Use active voice, verb-first:**
225
+
226
+ - ✅ `creating-skills` not `skill-creation`
227
+ - ✅ `condition-based-waiting` not `async-test-helpers`
228
+
229
+ ### 4. Token Efficiency (Critical)
230
+
231
+ **Problem:** getting-started and frequently-referenced skills load into EVERY conversation. Every token counts.
232
+
233
+ **Target word counts:**
234
+
235
+ - getting-started workflows: <150 words each
236
+ - Frequently-loaded skills: <200 words total
237
+ - Other skills: <500 words (still be concise)
238
+
239
+ **Techniques:**
240
+
241
+ **Move details to tool help:**
242
+
243
+ ```bash
244
+ # ❌ BAD: Document all flags in SKILL.md
245
+ search-conversations supports --text, --both, --after DATE, --before DATE, --limit N
246
+
247
+ # ✅ GOOD: Reference --help
248
+ search-conversations supports multiple modes and filters. Run --help for details.
249
+ ```
250
+
251
+ **Use cross-references:**
252
+
253
+ ```markdown
254
+ # ❌ BAD: Repeat workflow details
255
+
256
+ When searching, dispatch subagent with template...
257
+ [20 lines of repeated instructions]
258
+
259
+ # ✅ GOOD: Reference other skill
260
+
261
+ Always use subagents (50-100x context savings). REQUIRED: Use [other-skill-name] for workflow.
262
+ ```
263
+
264
+ **Compress examples:**
265
+
266
+ ```markdown
267
+ # ❌ BAD: Verbose example (42 words)
268
+
269
+ your human partner: "How did we handle authentication errors in React Router before?"
270
+ You: I'll search past conversations for React Router authentication patterns.
271
+ [Dispatch subagent with search query: "React Router authentication error handling 401"]
272
+
273
+ # ✅ GOOD: Minimal example (20 words)
274
+
275
+ Partner: "How did we handle auth errors in React Router?"
276
+ You: Searching...
277
+ [Dispatch subagent → synthesis]
278
+ ```
279
+
280
+ **Eliminate redundancy:**
281
+
282
+ - Don't repeat what's in cross-referenced skills
283
+ - Don't explain what's obvious from command
284
+ - Don't include multiple examples of same pattern
285
+
286
+ **Verification:**
287
+
288
+ ```bash
289
+ wc -w skills/path/SKILL.md
290
+ # getting-started workflows: aim for <150 each
291
+ # Other frequently-loaded: aim for <200 total
292
+ ```
293
+
294
+ **Name by what you DO or core insight:**
295
+
296
+ - ✅ `condition-based-waiting` > `async-test-helpers`
297
+ - ✅ `using-skills` not `skill-usage`
298
+ - ✅ `flatten-with-flags` > `data-structure-refactoring`
299
+ - ✅ `root-cause-tracing` > `debugging-techniques`
300
+
301
+ **Gerunds (-ing) work well for processes:**
302
+
303
+ - `creating-skills`, `testing-skills`, `debugging-with-logs`
304
+ - Active, describes the action you're taking
305
+
306
+ ### 4. Cross-Referencing Other Skills
307
+
308
+ **When writing documentation that references other skills:**
309
+
310
+ Use skill name only, with explicit requirement markers:
311
+
312
+ - ✅ Good: `**REQUIRED SUB-SKILL:** Use superpowers:test-driven-development`
313
+ - ✅ Good: `**REQUIRED BACKGROUND:** You MUST understand superpowers:systematic-debugging`
314
+ - ❌ Bad: `See skills/testing/test-driven-development` (unclear if required)
315
+ - ❌ Bad: `@skills/testing/test-driven-development/SKILL.md` (force-loads, burns context)
316
+
317
+ **Why no @ links:** `@` syntax force-loads files immediately, consuming 200k+ context before you need them.
318
+
319
+ ## Flowchart Usage
320
+
321
+ ```dot
322
+ digraph when_flowchart {
323
+ "Need to show information?" [shape=diamond];
324
+ "Decision where I might go wrong?" [shape=diamond];
325
+ "Use markdown" [shape=box];
326
+ "Small inline flowchart" [shape=box];
327
+
328
+ "Need to show information?" -> "Decision where I might go wrong?" [label="yes"];
329
+ "Decision where I might go wrong?" -> "Small inline flowchart" [label="yes"];
330
+ "Decision where I might go wrong?" -> "Use markdown" [label="no"];
331
+ }
332
+ ```
333
+
334
+ **Use flowcharts ONLY for:**
335
+
336
+ - Non-obvious decision points
337
+ - Process loops where you might stop too early
338
+ - "When to use A vs B" decisions
339
+
340
+ **Never use flowcharts for:**
341
+
342
+ - Reference material → Tables, lists
343
+ - Code examples → Markdown blocks
344
+ - Linear instructions → Numbered lists
345
+ - Labels without semantic meaning (step1, helper2)
346
+
347
+ See @graphviz-conventions.dot for graphviz style rules.
348
+
349
+ **Visualizing for your human partner:** Use `render-graphs.js` in this directory to render a skill's flowcharts to SVG:
350
+
351
+ ```bash
352
+ ./render-graphs.js ../some-skill # Each diagram separately
353
+ ./render-graphs.js ../some-skill --combine # All diagrams in one SVG
354
+ ```
355
+
356
+ ## Code Examples
357
+
358
+ **One excellent example beats many mediocre ones**
359
+
360
+ Choose most relevant language:
361
+
362
+ - Testing techniques → TypeScript/JavaScript
363
+ - System debugging → Shell/Python
364
+ - Data processing → Python
365
+
366
+ **Good example:**
367
+
368
+ - Complete and runnable
369
+ - Well-commented explaining WHY
370
+ - From real scenario
371
+ - Shows pattern clearly
372
+ - Ready to adapt (not generic template)
373
+
374
+ **Don't:**
375
+
376
+ - Implement in 5+ languages
377
+ - Create fill-in-the-blank templates
378
+ - Write contrived examples
379
+
380
+ You're good at porting - one great example is enough.
381
+
382
+ ## File Organization
383
+
384
+ ### Self-Contained Skill
385
+
386
+ ```
387
+ defense-in-depth/
388
+ SKILL.md # Everything inline
389
+ ```
390
+
391
+ When: All content fits, no heavy reference needed
392
+
393
+ ### Skill with Reusable Tool
394
+
395
+ ```
396
+ condition-based-waiting/
397
+ SKILL.md # Overview + patterns
398
+ example.ts # Working helpers to adapt
399
+ ```
400
+
401
+ When: Tool is reusable code, not just narrative
402
+
403
+ ### Skill with Heavy Reference
404
+
405
+ ```
406
+ pptx/
407
+ SKILL.md # Overview + workflows
408
+ pptxgenjs.md # 600 lines API reference
409
+ ooxml.md # 500 lines XML structure
410
+ scripts/ # Executable tools
411
+ ```
412
+
413
+ When: Reference material too large for inline
414
+
415
+ ## The Iron Law (Same as TDD)
416
+
417
+ ```
418
+ NO SKILL WITHOUT A FAILING TEST FIRST
419
+ ```
420
+
421
+ This applies to NEW skills AND EDITS to existing skills.
422
+
423
+ Write skill before testing? Delete it. Start over.
424
+ Edit skill without testing? Same violation.
425
+
426
+ **No exceptions:**
427
+
428
+ - Not for "simple additions"
429
+ - Not for "just adding a section"
430
+ - Not for "documentation updates"
431
+ - Don't keep untested changes as "reference"
432
+ - Don't "adapt" while running tests
433
+ - Delete means delete
434
+
435
+ **REQUIRED BACKGROUND:** The superpowers:test-driven-development skill explains why this matters. Same principles apply to documentation.
436
+
437
+ ## Testing All Skill Types
438
+
439
+ Different skill types need different test approaches:
440
+
441
+ ### Discipline-Enforcing Skills (rules/requirements)
442
+
443
+ **Examples:** TDD, verification-before-completion, designing-before-coding
444
+
445
+ **Test with:**
446
+
447
+ - Academic questions: Do they understand the rules?
448
+ - Pressure scenarios: Do they comply under stress?
449
+ - Multiple pressures combined: time + sunk cost + exhaustion
450
+ - Identify rationalizations and add explicit counters
451
+
452
+ **Success criteria:** Agent follows rule under maximum pressure
453
+
454
+ ### Technique Skills (how-to guides)
455
+
456
+ **Examples:** condition-based-waiting, root-cause-tracing, defensive-programming
457
+
458
+ **Test with:**
459
+
460
+ - Application scenarios: Can they apply the technique correctly?
461
+ - Variation scenarios: Do they handle edge cases?
462
+ - Missing information tests: Do instructions have gaps?
463
+
464
+ **Success criteria:** Agent successfully applies technique to new scenario
465
+
466
+ ### Pattern Skills (mental models)
467
+
468
+ **Examples:** reducing-complexity, information-hiding concepts
469
+
470
+ **Test with:**
471
+
472
+ - Recognition scenarios: Do they recognize when pattern applies?
473
+ - Application scenarios: Can they use the mental model?
474
+ - Counter-examples: Do they know when NOT to apply?
475
+
476
+ **Success criteria:** Agent correctly identifies when/how to apply pattern
477
+
478
+ ### Reference Skills (documentation/APIs)
479
+
480
+ **Examples:** API documentation, command references, library guides
481
+
482
+ **Test with:**
483
+
484
+ - Retrieval scenarios: Can they find the right information?
485
+ - Application scenarios: Can they use what they found correctly?
486
+ - Gap testing: Are common use cases covered?
487
+
488
+ **Success criteria:** Agent finds and correctly applies reference information
489
+
490
+ ## Common Rationalizations for Skipping Testing
491
+
492
+ | Excuse | Reality |
493
+ | ------------------------------ | ---------------------------------------------------------------- |
494
+ | "Skill is obviously clear" | Clear to you ≠ clear to other agents. Test it. |
495
+ | "It's just a reference" | References can have gaps, unclear sections. Test retrieval. |
496
+ | "Testing is overkill" | Untested skills have issues. Always. 15 min testing saves hours. |
497
+ | "I'll test if problems emerge" | Problems = agents can't use skill. Test BEFORE deploying. |
498
+ | "Too tedious to test" | Testing is less tedious than debugging bad skill in production. |
499
+ | "I'm confident it's good" | Overconfidence guarantees issues. Test anyway. |
500
+ | "Academic review is enough" | Reading ≠ using. Test application scenarios. |
501
+ | "No time to test" | Deploying untested skill wastes more time fixing it later. |
502
+
503
+ **All of these mean: Test before deploying. No exceptions.**
504
+
505
+ ## Bulletproofing Skills Against Rationalization
506
+
507
+ Skills that enforce discipline (like TDD) need to resist rationalization. Agents are smart and will find loopholes when under pressure.
508
+
509
+ **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.
510
+
511
+ ### Close Every Loophole Explicitly
512
+
513
+ Don't just state the rule - forbid specific workarounds:
514
+
515
+ <Bad>
516
+ ```markdown
517
+ Write code before test? Delete it.
518
+ ```
519
+ </Bad>
520
+
521
+ <Good>
522
+ ```markdown
523
+ Write code before test? Delete it. Start over.
524
+
525
+ **No exceptions:**
526
+
527
+ - Don't keep it as "reference"
528
+ - Don't "adapt" it while writing tests
529
+ - Don't look at it
530
+ - Delete means delete
531
+
532
+ ````
533
+ </Good>
534
+
535
+ ### Address "Spirit vs Letter" Arguments
536
+
537
+ Add foundational principle early:
538
+
539
+ ```markdown
540
+ **Violating the letter of the rules is violating the spirit of the rules.**
541
+ ````
542
+
543
+ This cuts off entire class of "I'm following the spirit" rationalizations.
544
+
545
+ ### Build Rationalization Table
546
+
547
+ Capture rationalizations from baseline testing (see Testing section below). Every excuse agents make goes in the table:
548
+
549
+ ```markdown
550
+ | Excuse | Reality |
551
+ | -------------------------------- | ----------------------------------------------------------------------- |
552
+ | "Too simple to test" | Simple code breaks. Test takes 30 seconds. |
553
+ | "I'll test after" | Tests passing immediately prove nothing. |
554
+ | "Tests after achieve same goals" | Tests-after = "what does this do?" Tests-first = "what should this do?" |
555
+ ```
556
+
557
+ ### Create Red Flags List
558
+
559
+ Make it easy for agents to self-check when rationalizing:
560
+
561
+ ```markdown
562
+ ## Red Flags - STOP and Start Over
563
+
564
+ - Code before test
565
+ - "I already manually tested it"
566
+ - "Tests after achieve the same purpose"
567
+ - "It's about spirit not ritual"
568
+ - "This is different because..."
569
+
570
+ **All of these mean: Delete code. Start over with TDD.**
571
+ ```
572
+
573
+ ### Update CSO for Violation Symptoms
574
+
575
+ Add to description: symptoms of when you're ABOUT to violate the rule:
576
+
577
+ ```yaml
578
+ description: use when implementing any feature or bugfix, before writing implementation code
579
+ ```
580
+
581
+ ## RED-GREEN-REFACTOR for Skills
582
+
583
+ Follow the TDD cycle:
584
+
585
+ ### RED: Write Failing Test (Baseline)
586
+
587
+ Run pressure scenario with subagent WITHOUT the skill. Document exact behavior:
588
+
589
+ - What choices did they make?
590
+ - What rationalizations did they use (verbatim)?
591
+ - Which pressures triggered violations?
592
+
593
+ This is "watch the test fail" - you must see what agents naturally do before writing the skill.
594
+
595
+ ### GREEN: Write Minimal Skill
596
+
597
+ Write skill that addresses those specific rationalizations. Don't add extra content for hypothetical cases.
598
+
599
+ Run same scenarios WITH skill. Agent should now comply.
600
+
601
+ ### REFACTOR: Close Loopholes
602
+
603
+ Agent found new rationalization? Add explicit counter. Re-test until bulletproof.
604
+
605
+ **Testing methodology:** See @testing-skills-with-subagents.md for the complete testing methodology:
606
+
607
+ - How to write pressure scenarios
608
+ - Pressure types (time, sunk cost, authority, exhaustion)
609
+ - Plugging holes systematically
610
+ - Meta-testing techniques
611
+
612
+ ## Anti-Patterns
613
+
614
+ ### ❌ Narrative Example
615
+
616
+ "In session 2025-10-03, we found empty projectDir caused..."
617
+ **Why bad:** Too specific, not reusable
618
+
619
+ ### ❌ Multi-Language Dilution
620
+
621
+ example-js.js, example-py.py, example-go.go
622
+ **Why bad:** Mediocre quality, maintenance burden
623
+
624
+ ### ❌ Code in Flowcharts
625
+
626
+ ```dot
627
+ step1 [label="import fs"];
628
+ step2 [label="read file"];
629
+ ```
630
+
631
+ **Why bad:** Can't copy-paste, hard to read
632
+
633
+ ### ❌ Generic Labels
634
+
635
+ helper1, helper2, step3, pattern4
636
+ **Why bad:** Labels should have semantic meaning
637
+
638
+ ## STOP: Before Moving to Next Skill
639
+
640
+ **After writing ANY skill, you MUST STOP and complete the deployment process.**
641
+
642
+ **Do NOT:**
643
+
644
+ - Create multiple skills in batch without testing each
645
+ - Move to next skill before current one is verified
646
+ - Skip testing because "batching is more efficient"
647
+
648
+ **The deployment checklist below is MANDATORY for EACH skill.**
649
+
650
+ Deploying untested skills = deploying untested code. It's a violation of quality standards.
651
+
652
+ ## Skill Creation Checklist (TDD Adapted)
653
+
654
+ **IMPORTANT: Use TodoWrite to create todos for EACH checklist item below.**
655
+
656
+ **RED Phase - Write Failing Test:**
657
+
658
+ - [ ] Create pressure scenarios (3+ combined pressures for discipline skills)
659
+ - [ ] Run scenarios WITHOUT skill - document baseline behavior verbatim
660
+ - [ ] Identify patterns in rationalizations/failures
661
+
662
+ **GREEN Phase - Write Minimal Skill:**
663
+
664
+ - [ ] Name uses only letters, numbers, hyphens (no parentheses/special chars)
665
+ - [ ] YAML frontmatter with required `name` and `description` fields (max 1024 chars; see [spec](https://agentskills.io/specification))
666
+ - [ ] Description starts with "Use when..." and includes specific triggers/symptoms
667
+ - [ ] Description written in third person
668
+ - [ ] Keywords throughout for search (errors, symptoms, tools)
669
+ - [ ] Clear overview with core principle
670
+ - [ ] Address specific baseline failures identified in RED
671
+ - [ ] Code inline OR link to separate file
672
+ - [ ] One excellent example (not multi-language)
673
+ - [ ] Run scenarios WITH skill - verify agents now comply
674
+
675
+ **REFACTOR Phase - Close Loopholes:**
676
+
677
+ - [ ] Identify NEW rationalizations from testing
678
+ - [ ] Add explicit counters (if discipline skill)
679
+ - [ ] Build rationalization table from all test iterations
680
+ - [ ] Create red flags list
681
+ - [ ] Re-test until bulletproof
682
+
683
+ **Quality Checks:**
684
+
685
+ - [ ] Small flowchart only if decision non-obvious
686
+ - [ ] Quick reference table
687
+ - [ ] Common mistakes section
688
+ - [ ] No narrative storytelling
689
+ - [ ] Supporting files only for tools or heavy reference
690
+
691
+ **Deployment:**
692
+
693
+ - [ ] Commit skill to git and push to your fork (if configured)
694
+ - [ ] Consider contributing back via PR (if broadly useful)
695
+
696
+ ## Discovery Workflow
697
+
698
+ How future Claude finds your skill:
699
+
700
+ 1. **Encounters problem** ("tests are flaky")
701
+ 2. **Finds SKILL** (description matches)
702
+ 3. **Scans overview** (is this relevant?)
703
+ 4. **Reads patterns** (quick reference table)
704
+ 5. **Loads example** (only when implementing)
705
+
706
+ **Optimize for this flow** - put searchable terms early and often.
707
+
708
+ ## The Bottom Line
709
+
710
+ **Creating skills IS TDD for process documentation.**
711
+
712
+ Same Iron Law: No skill without failing test first.
713
+ Same cycle: RED (baseline) → GREEN (write skill) → REFACTOR (close loopholes).
714
+ Same benefits: Better quality, fewer surprises, bulletproof results.
715
+
716
+ If you follow TDD for code, follow it for skills. It's the same discipline applied to documentation.