@wenaixi/dsh-superpower 7.4.1 → 7.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +110 -105
- package/README.zh.md +216 -0
- package/lib/catalog.d.ts +8 -2
- package/lib/catalog.d.ts.map +1 -1
- package/lib/catalog.js +64 -9
- package/lib/catalog.js.map +1 -1
- package/lib/client.js +68 -21
- package/lib/document.d.ts +8 -2
- package/lib/document.d.ts.map +1 -1
- package/lib/document.js +14 -4
- package/lib/document.js.map +1 -1
- package/lib/superpowers.d.ts +2 -0
- package/lib/superpowers.d.ts.map +1 -1
- package/lib/superpowers.js +8 -0
- package/lib/superpowers.js.map +1 -1
- package/lib/switches.d.ts +2 -10
- package/lib/switches.d.ts.map +1 -1
- package/lib/switches.js +29 -5
- package/lib/switches.js.map +1 -1
- package/package.json +3 -3
- package/skills/brainstorming/SKILL.md +235 -171
- package/skills/brainstorming/spec-document-reviewer-prompt.md +27 -25
- package/skills/brainstorming/visual-companion.md +65 -69
- package/skills/diagnosing-superpowers/SKILL.md +107 -43
- package/skills/diagnosing-superpowers/prompts/analyst-common.md +32 -18
- package/skills/diagnosing-superpowers/prompts/cost-and-time.md +25 -9
- package/skills/diagnosing-superpowers/prompts/plan-adherence.md +26 -12
- package/skills/diagnosing-superpowers/prompts/quality-evidence.md +23 -8
- package/skills/diagnosing-superpowers/prompts/repeated-work.md +25 -14
- package/skills/diagnosing-superpowers/prompts/request-conflicts.md +18 -9
- package/skills/diagnosing-superpowers/prompts/scrub-audit.md +23 -10
- package/skills/diagnosing-superpowers/prompts/scrub.md +25 -12
- package/skills/diagnosing-superpowers/prompts/similar-session.md +30 -22
- package/skills/diagnosing-superpowers/prompts/skill-timeline.md +26 -12
- package/skills/diagnosing-superpowers/prompts/stumbles.md +24 -12
- package/skills/diagnosing-superpowers/references/context-safety.md +15 -7
- package/skills/diagnosing-superpowers/references/github-issues.md +17 -9
- package/skills/diagnosing-superpowers/references/redaction-policy.md +27 -15
- package/skills/diagnosing-superpowers/references/session-discovery.md +31 -20
- package/skills/diagnosing-superpowers/templates/bundle-README.md +66 -40
- package/skills/diagnosing-superpowers/templates/case.md +49 -42
- package/skills/diagnosing-superpowers/templates/issue.md +32 -26
- package/skills/diagnosing-superpowers/templates/report.md +54 -48
- package/skills/dispatching-parallel-agents/SKILL.md +92 -90
- package/skills/executing-plans/SKILL.md +345 -197
- package/skills/finishing-a-development-branch/SKILL.md +107 -82
- package/skills/receiving-code-review/SKILL.md +129 -127
- package/skills/requesting-code-review/SKILL.md +52 -50
- package/skills/requesting-code-review/code-reviewer.md +132 -111
- package/skills/subagent-driven-development/SKILL.md +521 -298
- package/skills/subagent-driven-development/implementer-prompt.md +138 -117
- package/skills/subagent-driven-development/re-review-prompt.md +80 -48
- package/skills/subagent-driven-development/task-reviewer-prompt.md +189 -110
- package/skills/systematic-debugging/CREATION-LOG.md +85 -85
- package/skills/systematic-debugging/SKILL.md +221 -219
- package/skills/systematic-debugging/condition-based-waiting.md +48 -49
- package/skills/systematic-debugging/defense-in-depth.md +46 -46
- package/skills/systematic-debugging/root-cause-tracing.md +63 -63
- package/skills/systematic-debugging/test-academic.md +10 -10
- package/skills/systematic-debugging/test-pressure-1.md +40 -40
- package/skills/systematic-debugging/test-pressure-2.md +58 -58
- package/skills/systematic-debugging/test-pressure-3.md +48 -48
- package/skills/test-driven-development/SKILL.md +161 -153
- package/skills/test-driven-development/writing-good-tests.md +137 -84
- package/skills/using-git-worktrees/SKILL.md +74 -72
- package/skills/using-superpowers/SKILL.md +40 -39
- package/skills/using-superpowers/references/dsh-tools.md +36 -36
- package/skills/verification-before-completion/SKILL.md +85 -83
- package/skills/writing-plans/SKILL.md +123 -84
- package/skills/writing-skills/SKILL.md +419 -417
- package/skills/writing-skills/persuasion-principles.md +118 -118
- package/skills/writing-skills/testing-skills-with-subagents.md +190 -190
|
@@ -1,681 +1,683 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: writing-skills
|
|
3
|
-
description: "Superpower Skill
|
|
3
|
+
description: "Superpower Skill: Use when creating new skills, editing existing skills, or verifying skills work before deployment"
|
|
4
|
+
description_zh: "Superpower Skill:在创建新技能、编辑或重构现有技能,以及在部署前验证技能可用性、合规性与实际生效情况时使用。"
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
# 技能编写
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
# Writing Skills
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Overview
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
**Writing skills IS Test-Driven Development applied to process documentation.**
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
**Personal skills live in DSH** at `~/.dsh/skills/` (global), `<project>/.dsh/skills/` (project-level), or distributed by a DSH bundle plugin (`cordis.patch.yml` injecting `ctx.skills`). See [dsh-tools.md](../using-superpowers/references/dsh-tools.md) for the DSH tool mapping.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
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).
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
**Core principle:** If you didn't watch an agent fail without the skill, you don't know if the skill teaches the right thing.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
**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.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
**Official guidance:** For the DSH platform skill standards and tool conventions, see [dsh-tools.md](../using-superpowers/references/dsh-tools.md). This document provides additional patterns and guidelines that complement the TDD-focused approach in this skill.
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
## What is a Skill?
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
A **skill** is a reference guide for proven techniques, patterns, or tools. Skills help future agents find and apply effective approaches.
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
**Skills are:** Reusable techniques, patterns, tools, reference guides
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
**Skills are NOT:** Narratives about how you solved a problem once
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
## TDD Mapping for Skills
|
|
33
|
+
|
|
34
|
+
| TDD Concept | Skill Creation |
|
|
33
35
|
|-------------|----------------|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
36
|
+
| **Test case** | Pressure scenario with subagent |
|
|
37
|
+
| **Production code** | Skill document (SKILL.md) |
|
|
38
|
+
| **Test fails (RED)** | Agent violates rule without skill (baseline) |
|
|
39
|
+
| **Test passes (GREEN)** | Agent complies with skill present |
|
|
40
|
+
| **Refactor** | Close loopholes while maintaining compliance |
|
|
41
|
+
| **Write test first** | Run baseline scenario BEFORE writing skill |
|
|
42
|
+
| **Watch it fail** | Document exact rationalizations agent uses |
|
|
43
|
+
| **Minimal code** | Write skill addressing those specific violations |
|
|
44
|
+
| **Watch it pass** | Verify agent now complies |
|
|
45
|
+
| **Refactor cycle** | Find new rationalizations → plug → re-verify |
|
|
44
46
|
|
|
45
|
-
|
|
47
|
+
The entire skill creation process follows RED-GREEN-REFACTOR.
|
|
46
48
|
|
|
47
|
-
##
|
|
49
|
+
## When to Create a Skill
|
|
48
50
|
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
51
|
+
**Create when:**
|
|
52
|
+
- Technique wasn't intuitively obvious to you
|
|
53
|
+
- You'd reference this again across projects
|
|
54
|
+
- Pattern applies broadly (not project-specific)
|
|
55
|
+
- Others would benefit
|
|
54
56
|
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
57
|
+
**Don't create for:**
|
|
58
|
+
- One-off solutions
|
|
59
|
+
- Standard practices well-documented elsewhere
|
|
60
|
+
- Project-specific conventions (put in your instructions file)
|
|
61
|
+
- Mechanical constraints (if it's enforceable with regex/validation, automate it—save documentation for judgment calls)
|
|
60
62
|
|
|
61
|
-
##
|
|
63
|
+
## Skill Types
|
|
62
64
|
|
|
63
|
-
###
|
|
64
|
-
|
|
65
|
+
### Technique
|
|
66
|
+
Concrete method with steps to follow (condition-based-waiting, root-cause-tracing)
|
|
65
67
|
|
|
66
|
-
###
|
|
67
|
-
|
|
68
|
+
### Pattern
|
|
69
|
+
Way of thinking about problems (flatten-with-flags, test-invariants)
|
|
68
70
|
|
|
69
|
-
###
|
|
70
|
-
API
|
|
71
|
+
### Reference
|
|
72
|
+
API docs, syntax guides, tool documentation (office docs)
|
|
71
73
|
|
|
72
|
-
##
|
|
74
|
+
## Directory Structure
|
|
73
75
|
|
|
74
76
|
|
|
75
77
|
```
|
|
76
78
|
skills/
|
|
77
79
|
skill-name/
|
|
78
|
-
SKILL.md #
|
|
79
|
-
supporting-file.* #
|
|
80
|
+
SKILL.md # Main reference (required)
|
|
81
|
+
supporting-file.* # Only if needed
|
|
80
82
|
```
|
|
81
83
|
|
|
82
|
-
|
|
84
|
+
**Flat namespace** - all skills in one searchable namespace
|
|
83
85
|
|
|
84
|
-
|
|
85
|
-
1.
|
|
86
|
-
2.
|
|
86
|
+
**Separate files for:**
|
|
87
|
+
1. **Heavy reference** (100+ lines) - API docs, comprehensive syntax
|
|
88
|
+
2. **Reusable tools** - Scripts, utilities, templates
|
|
87
89
|
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
90
|
+
**Keep inline:**
|
|
91
|
+
- Principles and concepts
|
|
92
|
+
- Code patterns (< 50 lines)
|
|
93
|
+
- Everything else
|
|
92
94
|
|
|
93
|
-
## SKILL.md
|
|
95
|
+
## SKILL.md Structure
|
|
94
96
|
|
|
95
|
-
**Frontmatter
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
- `name
|
|
99
|
-
- `description
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
97
|
+
**Frontmatter (YAML):**
|
|
98
|
+
- Two required fields: `name` and `description` (see [agentskills.io/specification](https://agentskills.io/specification) for all supported fields)
|
|
99
|
+
- Max 1024 characters total
|
|
100
|
+
- `name`: Use letters, numbers, and hyphens only (no parentheses, special chars)
|
|
101
|
+
- `description`: Third-person, describes ONLY when to use (NOT what it does)
|
|
102
|
+
- Start with "Use when..." to focus on triggering conditions
|
|
103
|
+
- Include specific symptoms, situations, and contexts
|
|
104
|
+
- **NEVER summarize the skill's process or workflow** (see SDO section for why)
|
|
105
|
+
- Keep under 500 characters if possible
|
|
104
106
|
|
|
105
107
|
```markdown
|
|
106
108
|
---
|
|
107
109
|
name: Skill-Name-With-Hyphens
|
|
108
|
-
description: Use when [
|
|
110
|
+
description: Use when [specific triggering conditions and symptoms]
|
|
109
111
|
---
|
|
110
112
|
|
|
111
|
-
#
|
|
113
|
+
# Skill Name
|
|
112
114
|
|
|
113
|
-
##
|
|
114
|
-
|
|
115
|
+
## Overview
|
|
116
|
+
What is this? Core principle in 1-2 sentences.
|
|
115
117
|
|
|
116
|
-
##
|
|
117
|
-
[
|
|
118
|
+
## When to Use
|
|
119
|
+
[Small inline flowchart IF decision non-obvious]
|
|
118
120
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
+
Bullet list with SYMPTOMS and use cases
|
|
122
|
+
When NOT to use
|
|
121
123
|
|
|
122
|
-
##
|
|
123
|
-
|
|
124
|
+
## Core Pattern (for techniques/patterns)
|
|
125
|
+
Before/after code comparison
|
|
124
126
|
|
|
125
|
-
##
|
|
126
|
-
|
|
127
|
+
## Quick Reference
|
|
128
|
+
Table or bullets for scanning common operations
|
|
127
129
|
|
|
128
|
-
##
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
## Implementation
|
|
131
|
+
Inline code for simple patterns
|
|
132
|
+
Link to file for heavy reference or reusable tools
|
|
131
133
|
|
|
132
|
-
##
|
|
133
|
-
|
|
134
|
+
## Common Mistakes
|
|
135
|
+
What goes wrong + fixes
|
|
134
136
|
|
|
135
|
-
##
|
|
136
|
-
|
|
137
|
+
## Real-World Impact (optional)
|
|
138
|
+
Concrete results
|
|
137
139
|
```
|
|
138
140
|
|
|
139
141
|
|
|
140
|
-
##
|
|
142
|
+
## Skill Discovery Optimization (SDO)
|
|
141
143
|
|
|
142
|
-
|
|
144
|
+
**Critical for discovery:** Future agents need to FIND your skill
|
|
143
145
|
|
|
144
|
-
### 1.
|
|
146
|
+
### 1. Rich Description Field
|
|
145
147
|
|
|
146
|
-
|
|
148
|
+
**Purpose:** Your agent reads the description to decide which skills to load for a given task. Make it answer: "Should I read this skill right now?"
|
|
147
149
|
|
|
148
|
-
|
|
150
|
+
**Format:** Start with "Use when..." to focus on triggering conditions
|
|
149
151
|
|
|
150
|
-
|
|
152
|
+
**CRITICAL: Description = When to Use, NOT What the Skill Does**
|
|
151
153
|
|
|
152
|
-
description
|
|
154
|
+
The description should ONLY describe triggering conditions. Do NOT summarize the skill's process or workflow in the description.
|
|
153
155
|
|
|
154
|
-
|
|
156
|
+
**Why this matters:** Testing revealed that when a description summarizes the skill's workflow, an agent may follow the description instead of reading the full skill content. A description saying "code review between tasks" caused an agent to do ONE review, even though the skill's flowchart clearly showed TWO reviews (spec compliance then code quality).
|
|
155
157
|
|
|
156
|
-
|
|
158
|
+
When the description was changed to just "Use when executing implementation plans with independent tasks" (no workflow summary), the agent correctly read the flowchart and followed the two-stage review process.
|
|
157
159
|
|
|
158
|
-
|
|
160
|
+
**The trap:** Descriptions that summarize workflow create a shortcut agents will take. The skill body becomes documentation agents skip.
|
|
159
161
|
|
|
160
162
|
```yaml
|
|
161
|
-
# [FAIL]
|
|
163
|
+
# [FAIL] BAD: Summarizes workflow - agents may follow this instead of reading skill
|
|
162
164
|
description: Use when executing plans - dispatches subagent per task with code review between tasks
|
|
163
165
|
|
|
164
|
-
# [FAIL]
|
|
166
|
+
# [FAIL] BAD: Too much process detail
|
|
165
167
|
description: Use for TDD - write test first, watch it fail, write minimal code, refactor
|
|
166
168
|
|
|
167
|
-
# [OK]
|
|
169
|
+
# [OK] GOOD: Just triggering conditions, no workflow summary
|
|
168
170
|
description: Use when executing implementation plans with independent tasks in the current session
|
|
169
171
|
|
|
170
|
-
# [OK]
|
|
172
|
+
# [OK] GOOD: Triggering conditions only
|
|
171
173
|
description: Use when implementing any feature or bugfix, before writing implementation code
|
|
172
174
|
```
|
|
173
175
|
|
|
174
|
-
|
|
175
|
-
-
|
|
176
|
-
-
|
|
177
|
-
-
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
-
|
|
176
|
+
**Content:**
|
|
177
|
+
- Use concrete triggers, symptoms, and situations that signal this skill applies
|
|
178
|
+
- Describe the *problem* (race conditions, inconsistent behavior) not *language-specific symptoms* (setTimeout, sleep)
|
|
179
|
+
- Keep triggers technology-agnostic unless the skill itself is technology-specific
|
|
180
|
+
- If skill is technology-specific, make that explicit in the trigger
|
|
181
|
+
- Write in third person (injected into system prompt)
|
|
182
|
+
- **NEVER summarize the skill's process or workflow**
|
|
181
183
|
|
|
182
184
|
```yaml
|
|
183
|
-
# [FAIL]
|
|
185
|
+
# [FAIL] BAD: Too abstract, vague, doesn't include when to use
|
|
184
186
|
description: For async testing
|
|
185
187
|
|
|
186
|
-
# [FAIL]
|
|
188
|
+
# [FAIL] BAD: First person
|
|
187
189
|
description: I can help you with async tests when they're flaky
|
|
188
190
|
|
|
189
|
-
# [FAIL]
|
|
191
|
+
# [FAIL] BAD: Mentions technology but skill isn't specific to it
|
|
190
192
|
description: Use when tests use setTimeout/sleep and are flaky
|
|
191
193
|
|
|
192
|
-
# [OK]
|
|
194
|
+
# [OK] GOOD: Starts with "Use when", describes problem, no workflow
|
|
193
195
|
description: Use when tests have race conditions, timing dependencies, or pass/fail inconsistently
|
|
194
196
|
|
|
195
|
-
# [OK]
|
|
197
|
+
# [OK] GOOD: Technology-specific skill with explicit trigger
|
|
196
198
|
description: Use when using React Router and handling authentication redirects
|
|
197
199
|
```
|
|
198
200
|
|
|
199
|
-
### 2.
|
|
201
|
+
### 2. Keyword Coverage
|
|
200
202
|
|
|
201
|
-
|
|
202
|
-
-
|
|
203
|
-
-
|
|
204
|
-
-
|
|
205
|
-
-
|
|
203
|
+
Use words an agent would search for:
|
|
204
|
+
- Error messages: "Hook timed out", "ENOTEMPTY", "race condition"
|
|
205
|
+
- Symptoms: "flaky", "hanging", "zombie", "pollution"
|
|
206
|
+
- Synonyms: "timeout/hang/freeze", "cleanup/teardown/afterEach"
|
|
207
|
+
- Tools: Actual commands, library names, file types
|
|
206
208
|
|
|
207
|
-
### 3.
|
|
209
|
+
### 3. Descriptive Naming
|
|
208
210
|
|
|
209
|
-
|
|
210
|
-
- [OK] `creating-skills`
|
|
211
|
-
- [OK] `condition-based-waiting`
|
|
211
|
+
**Use active voice, verb-first:**
|
|
212
|
+
- [OK] `creating-skills` not `skill-creation`
|
|
213
|
+
- [OK] `condition-based-waiting` not `async-test-helpers`
|
|
212
214
|
|
|
213
|
-
### 4. Token
|
|
215
|
+
### 4. Token Efficiency (Critical)
|
|
214
216
|
|
|
215
|
-
|
|
217
|
+
**Problem:** getting-started and frequently-referenced skills load into EVERY conversation. Every token counts.
|
|
216
218
|
|
|
217
|
-
|
|
218
|
-
- getting-started
|
|
219
|
-
-
|
|
220
|
-
-
|
|
219
|
+
**Target word counts:**
|
|
220
|
+
- getting-started workflows: <150 words each
|
|
221
|
+
- Frequently-loaded skills: <200 words total
|
|
222
|
+
- Other skills: <500 words (still be concise)
|
|
221
223
|
|
|
222
|
-
|
|
224
|
+
**Techniques:**
|
|
223
225
|
|
|
224
|
-
|
|
226
|
+
**Move details to tool help:**
|
|
225
227
|
```bash
|
|
226
|
-
# [FAIL]
|
|
228
|
+
# [FAIL] BAD: Document all flags in SKILL.md
|
|
227
229
|
search-conversations supports --text, --both, --after DATE, --before DATE, --limit N
|
|
228
230
|
|
|
229
|
-
# [OK]
|
|
230
|
-
search-conversations
|
|
231
|
+
# [OK] GOOD: Reference --help
|
|
232
|
+
search-conversations supports multiple modes and filters. Run --help for details.
|
|
231
233
|
```
|
|
232
234
|
|
|
233
|
-
|
|
235
|
+
**Use cross-references:**
|
|
234
236
|
```markdown
|
|
235
|
-
# [FAIL]
|
|
237
|
+
# [FAIL] BAD: Repeat workflow details
|
|
236
238
|
When searching, dispatch subagent with template...
|
|
237
|
-
[20
|
|
239
|
+
[20 lines of repeated instructions]
|
|
238
240
|
|
|
239
|
-
# [OK]
|
|
240
|
-
|
|
241
|
+
# [OK] GOOD: Reference other skill
|
|
242
|
+
Always use subagents (50-100x context savings). REQUIRED: Use [other-skill-name] for workflow.
|
|
241
243
|
```
|
|
242
244
|
|
|
243
|
-
|
|
245
|
+
**Compress examples:**
|
|
244
246
|
```markdown
|
|
245
|
-
# [FAIL]
|
|
247
|
+
# [FAIL] BAD: Verbose example (42 words)
|
|
246
248
|
your human partner: "How did we handle authentication errors in React Router before?"
|
|
247
249
|
You: I'll search past conversations for React Router authentication patterns.
|
|
248
250
|
[Dispatch subagent with search query: "React Router authentication error handling 401"]
|
|
249
251
|
|
|
250
|
-
# [OK]
|
|
252
|
+
# [OK] GOOD: Minimal example (20 words)
|
|
251
253
|
Partner: "How did we handle auth errors in React Router?"
|
|
252
254
|
You: Searching...
|
|
253
255
|
[Dispatch subagent → synthesis]
|
|
254
256
|
```
|
|
255
257
|
|
|
256
|
-
|
|
257
|
-
-
|
|
258
|
-
-
|
|
259
|
-
-
|
|
258
|
+
**Eliminate redundancy:**
|
|
259
|
+
- Don't repeat what's in cross-referenced skills
|
|
260
|
+
- Don't explain what's obvious from command
|
|
261
|
+
- Don't include multiple examples of same pattern
|
|
260
262
|
|
|
261
|
-
|
|
263
|
+
**Verification:**
|
|
262
264
|
```bash
|
|
263
265
|
wc -w skills/path/SKILL.md
|
|
264
|
-
# getting-started
|
|
265
|
-
#
|
|
266
|
+
# getting-started workflows: aim for <150 each
|
|
267
|
+
# Other frequently-loaded: aim for <200 total
|
|
266
268
|
```
|
|
267
269
|
|
|
268
|
-
|
|
270
|
+
**Name by what you DO or core insight:**
|
|
269
271
|
- [OK] `condition-based-waiting` > `async-test-helpers`
|
|
270
|
-
- [OK] `using-skills`
|
|
272
|
+
- [OK] `using-skills` not `skill-usage`
|
|
271
273
|
- [OK] `flatten-with-flags` > `data-structure-refactoring`
|
|
272
274
|
- [OK] `root-cause-tracing` > `debugging-techniques`
|
|
273
275
|
|
|
274
|
-
|
|
275
|
-
- `creating-skills
|
|
276
|
-
-
|
|
276
|
+
**Gerunds (-ing) work well for processes:**
|
|
277
|
+
- `creating-skills`, `testing-skills`, `debugging-with-logs`
|
|
278
|
+
- Active, describes the action you're taking
|
|
277
279
|
|
|
278
|
-
### 5.
|
|
280
|
+
### 5. Cross-Referencing Other Skills
|
|
279
281
|
|
|
280
|
-
|
|
282
|
+
**When writing documentation that references other skills:**
|
|
281
283
|
|
|
282
|
-
|
|
283
|
-
- [OK]
|
|
284
|
-
- [OK]
|
|
285
|
-
- [FAIL]
|
|
286
|
-
- [FAIL]
|
|
284
|
+
Use skill name only, with explicit requirement markers:
|
|
285
|
+
- [OK] Good: `**REQUIRED SUB-SKILL:** Use superpowers:test-driven-development`
|
|
286
|
+
- [OK] Good: `**REQUIRED BACKGROUND:** You MUST understand superpowers:systematic-debugging`
|
|
287
|
+
- [FAIL] Bad: `See skills/testing/test-driven-development` (unclear if required)
|
|
288
|
+
- [FAIL] Bad: `@skills/testing/test-driven-development/SKILL.md` (force-loads, burns context)
|
|
287
289
|
|
|
288
|
-
|
|
290
|
+
**Why no @ links:** `@` syntax force-loads files immediately, consuming 200k+ context before you need them.
|
|
289
291
|
|
|
290
|
-
##
|
|
292
|
+
## Flowchart Usage
|
|
291
293
|
|
|
292
294
|
```dot
|
|
293
295
|
digraph when_flowchart {
|
|
294
|
-
"
|
|
295
|
-
"
|
|
296
|
-
"
|
|
297
|
-
"
|
|
298
|
-
|
|
299
|
-
"
|
|
300
|
-
"
|
|
301
|
-
"
|
|
296
|
+
"Need to show information?" [shape=diamond];
|
|
297
|
+
"Decision where I might go wrong?" [shape=diamond];
|
|
298
|
+
"Use markdown" [shape=box];
|
|
299
|
+
"Small inline flowchart" [shape=box];
|
|
300
|
+
|
|
301
|
+
"Need to show information?" -> "Decision where I might go wrong?" [label="yes"];
|
|
302
|
+
"Decision where I might go wrong?" -> "Small inline flowchart" [label="yes"];
|
|
303
|
+
"Decision where I might go wrong?" -> "Use markdown" [label="no"];
|
|
302
304
|
}
|
|
303
305
|
```
|
|
304
306
|
|
|
305
|
-
|
|
306
|
-
-
|
|
307
|
-
-
|
|
308
|
-
- "
|
|
307
|
+
**Use flowcharts ONLY for:**
|
|
308
|
+
- Non-obvious decision points
|
|
309
|
+
- Process loops where you might stop too early
|
|
310
|
+
- "When to use A vs B" decisions
|
|
309
311
|
|
|
310
|
-
|
|
311
|
-
-
|
|
312
|
-
-
|
|
313
|
-
-
|
|
314
|
-
-
|
|
312
|
+
**Never use flowcharts for:**
|
|
313
|
+
- Reference material → Tables, lists
|
|
314
|
+
- Code examples → Markdown blocks
|
|
315
|
+
- Linear instructions → Numbered lists
|
|
316
|
+
- Labels without semantic meaning (step1, helper2)
|
|
315
317
|
|
|
316
|
-
|
|
318
|
+
See `graphviz-conventions.dot` in this directory for graphviz style rules.
|
|
317
319
|
|
|
318
|
-
|
|
320
|
+
**Visualizing for your human partner:** Use `render-graphs.js` in this directory to render a skill's flowcharts to SVG:
|
|
319
321
|
```bash
|
|
320
|
-
node ./render-graphs.js ../some-skill #
|
|
321
|
-
node ./render-graphs.js ../some-skill --combine #
|
|
322
|
+
node ./render-graphs.js ../some-skill # Each diagram separately
|
|
323
|
+
node ./render-graphs.js ../some-skill --combine # All diagrams in one SVG
|
|
322
324
|
```
|
|
323
325
|
|
|
324
|
-
##
|
|
326
|
+
## Code Examples
|
|
325
327
|
|
|
326
|
-
|
|
328
|
+
**One excellent example beats many mediocre ones**
|
|
327
329
|
|
|
328
|
-
|
|
329
|
-
-
|
|
330
|
-
-
|
|
331
|
-
-
|
|
330
|
+
Choose most relevant language:
|
|
331
|
+
- Testing techniques → TypeScript/JavaScript
|
|
332
|
+
- System debugging → Shell/Python
|
|
333
|
+
- Data processing → Python
|
|
332
334
|
|
|
333
|
-
|
|
334
|
-
-
|
|
335
|
-
-
|
|
336
|
-
-
|
|
337
|
-
-
|
|
338
|
-
-
|
|
335
|
+
**Good example:**
|
|
336
|
+
- Complete and runnable
|
|
337
|
+
- Well-commented explaining WHY
|
|
338
|
+
- From real scenario
|
|
339
|
+
- Shows pattern clearly
|
|
340
|
+
- Ready to adapt (not generic template)
|
|
339
341
|
|
|
340
|
-
|
|
341
|
-
-
|
|
342
|
-
-
|
|
343
|
-
-
|
|
342
|
+
**Don't:**
|
|
343
|
+
- Implement in 5+ languages
|
|
344
|
+
- Create fill-in-the-blank templates
|
|
345
|
+
- Write contrived examples
|
|
344
346
|
|
|
345
|
-
|
|
347
|
+
You're good at porting - one great example is enough.
|
|
346
348
|
|
|
347
|
-
##
|
|
349
|
+
## File Organization
|
|
348
350
|
|
|
349
|
-
###
|
|
351
|
+
### Self-Contained Skill
|
|
350
352
|
```
|
|
351
353
|
defense-in-depth/
|
|
352
|
-
SKILL.md #
|
|
354
|
+
SKILL.md # Everything inline
|
|
353
355
|
```
|
|
354
|
-
|
|
356
|
+
When: All content fits, no heavy reference needed
|
|
355
357
|
|
|
356
|
-
###
|
|
358
|
+
### Skill with Reusable Tool
|
|
357
359
|
```
|
|
358
360
|
condition-based-waiting/
|
|
359
|
-
SKILL.md #
|
|
360
|
-
example.ts #
|
|
361
|
+
SKILL.md # Overview + patterns
|
|
362
|
+
example.ts # Working helpers to adapt
|
|
361
363
|
```
|
|
362
|
-
|
|
364
|
+
When: Tool is reusable code, not just narrative
|
|
363
365
|
|
|
364
|
-
###
|
|
366
|
+
### Skill with Heavy Reference
|
|
365
367
|
```
|
|
366
368
|
pptx/
|
|
367
|
-
SKILL.md #
|
|
368
|
-
pptxgenjs.md # 600
|
|
369
|
-
ooxml.md # 500
|
|
370
|
-
scripts/ #
|
|
369
|
+
SKILL.md # Overview + workflows
|
|
370
|
+
pptxgenjs.md # 600 lines API reference
|
|
371
|
+
ooxml.md # 500 lines XML structure
|
|
372
|
+
scripts/ # Executable tools
|
|
371
373
|
```
|
|
372
|
-
|
|
374
|
+
When: Reference material too large for inline
|
|
373
375
|
|
|
374
|
-
|
|
376
|
+
Invoke bundled scripts through their interpreter in the prose (`bash scripts/tool.sh`, `node scripts/tool.js`), never by bare path: some harness plugin packagers strip executable bits, and a bare `scripts/tool.sh` fails there with `Permission denied`.
|
|
375
377
|
|
|
376
|
-
##
|
|
378
|
+
## The Iron Law (Same as TDD)
|
|
377
379
|
|
|
378
380
|
```
|
|
379
381
|
NO SKILL WITHOUT A FAILING TEST FIRST
|
|
380
382
|
```
|
|
381
383
|
|
|
382
|
-
|
|
384
|
+
This applies to NEW skills AND EDITS to existing skills.
|
|
383
385
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
+
Write skill before testing? Delete it. Start over.
|
|
387
|
+
Edit skill without testing? Same violation.
|
|
386
388
|
|
|
387
|
-
|
|
388
|
-
-
|
|
389
|
-
-
|
|
390
|
-
-
|
|
391
|
-
-
|
|
392
|
-
-
|
|
393
|
-
-
|
|
389
|
+
**No exceptions:**
|
|
390
|
+
- Not for "simple additions"
|
|
391
|
+
- Not for "just adding a section"
|
|
392
|
+
- Not for "documentation updates"
|
|
393
|
+
- Don't keep untested changes as "reference"
|
|
394
|
+
- Don't "adapt" while running tests
|
|
395
|
+
- Delete means delete
|
|
394
396
|
|
|
395
|
-
|
|
397
|
+
**REQUIRED BACKGROUND:** The superpowers:test-driven-development skill explains why this matters. Same principles apply to documentation.
|
|
396
398
|
|
|
397
|
-
##
|
|
399
|
+
## Testing All Skill Types
|
|
398
400
|
|
|
399
|
-
|
|
401
|
+
Different skill types need different test approaches:
|
|
400
402
|
|
|
401
|
-
###
|
|
403
|
+
### Discipline-Enforcing Skills (rules/requirements)
|
|
402
404
|
|
|
403
|
-
|
|
405
|
+
**Examples:** TDD, verification-before-completion, designing-before-coding
|
|
404
406
|
|
|
405
|
-
|
|
406
|
-
-
|
|
407
|
-
-
|
|
408
|
-
-
|
|
409
|
-
-
|
|
407
|
+
**Test with:**
|
|
408
|
+
- Academic questions: Do they understand the rules?
|
|
409
|
+
- Pressure scenarios: Do they comply under stress?
|
|
410
|
+
- Multiple pressures combined: time + sunk cost + exhaustion
|
|
411
|
+
- Identify rationalizations and add explicit counters
|
|
410
412
|
|
|
411
|
-
|
|
413
|
+
**Success criteria:** Agent follows rule under maximum pressure
|
|
412
414
|
|
|
413
|
-
###
|
|
415
|
+
### Technique Skills (how-to guides)
|
|
414
416
|
|
|
415
|
-
|
|
417
|
+
**Examples:** condition-based-waiting, root-cause-tracing, defensive-programming
|
|
416
418
|
|
|
417
|
-
|
|
418
|
-
-
|
|
419
|
-
-
|
|
420
|
-
-
|
|
419
|
+
**Test with:**
|
|
420
|
+
- Application scenarios: Can they apply the technique correctly?
|
|
421
|
+
- Variation scenarios: Do they handle edge cases?
|
|
422
|
+
- Missing information tests: Do instructions have gaps?
|
|
421
423
|
|
|
422
|
-
|
|
424
|
+
**Success criteria:** Agent successfully applies technique to new scenario
|
|
423
425
|
|
|
424
|
-
###
|
|
426
|
+
### Pattern Skills (mental models)
|
|
425
427
|
|
|
426
|
-
|
|
428
|
+
**Examples:** reducing-complexity, information-hiding concepts
|
|
427
429
|
|
|
428
|
-
|
|
429
|
-
-
|
|
430
|
-
-
|
|
431
|
-
-
|
|
430
|
+
**Test with:**
|
|
431
|
+
- Recognition scenarios: Do they recognize when pattern applies?
|
|
432
|
+
- Application scenarios: Can they use the mental model?
|
|
433
|
+
- Counter-examples: Do they know when NOT to apply?
|
|
432
434
|
|
|
433
|
-
|
|
435
|
+
**Success criteria:** Agent correctly identifies when/how to apply pattern
|
|
434
436
|
|
|
435
|
-
###
|
|
437
|
+
### Reference Skills (documentation/APIs)
|
|
436
438
|
|
|
437
|
-
|
|
439
|
+
**Examples:** API documentation, command references, library guides
|
|
438
440
|
|
|
439
|
-
|
|
440
|
-
-
|
|
441
|
-
-
|
|
442
|
-
- Gap
|
|
441
|
+
**Test with:**
|
|
442
|
+
- Retrieval scenarios: Can they find the right information?
|
|
443
|
+
- Application scenarios: Can they use what they found correctly?
|
|
444
|
+
- Gap testing: Are common use cases covered?
|
|
443
445
|
|
|
444
|
-
|
|
446
|
+
**Success criteria:** Agent finds and correctly applies reference information
|
|
445
447
|
|
|
446
|
-
##
|
|
448
|
+
## Common Rationalizations for Skipping Testing
|
|
447
449
|
|
|
448
|
-
|
|
|
450
|
+
| Excuse | Reality |
|
|
449
451
|
|--------|---------|
|
|
450
|
-
| "
|
|
451
|
-
| "
|
|
452
|
-
| "
|
|
453
|
-
| "
|
|
454
|
-
| "
|
|
455
|
-
| "
|
|
456
|
-
| "
|
|
457
|
-
| "
|
|
452
|
+
| "Skill is obviously clear" | Clear to you ≠ clear to other agents. Test it. |
|
|
453
|
+
| "It's just a reference" | References can have gaps, unclear sections. Test retrieval. |
|
|
454
|
+
| "Testing is overkill" | Untested skills have issues. Always. 15 min testing saves hours. |
|
|
455
|
+
| "I'll test if problems emerge" | Problems = agents can't use skill. Test BEFORE deploying. |
|
|
456
|
+
| "Too tedious to test" | Testing is less tedious than debugging bad skill in production. |
|
|
457
|
+
| "I'm confident it's good" | Overconfidence guarantees issues. Test anyway. |
|
|
458
|
+
| "Academic review is enough" | Reading ≠ using. Test application scenarios. |
|
|
459
|
+
| "No time to test" | Deploying untested skill wastes more time fixing it later. |
|
|
458
460
|
|
|
459
|
-
|
|
461
|
+
**All of these mean: Test before deploying. No exceptions.**
|
|
460
462
|
|
|
461
|
-
##
|
|
463
|
+
## Match the Form to the Failure
|
|
462
464
|
|
|
463
|
-
|
|
465
|
+
Before writing guidance, classify the baseline failure. The form that bulletproofs one failure type measurably backfires on another.
|
|
464
466
|
|
|
465
|
-
|
|
|
467
|
+
| Baseline failure | Right form | Wrong form |
|
|
466
468
|
|---|---|---|
|
|
467
|
-
|
|
|
468
|
-
|
|
|
469
|
-
|
|
|
470
|
-
|
|
|
469
|
+
| Skips/violates a rule under pressure (knows better, does it anyway) | Prohibition + rationalization table + red flags (see Bulletproofing below) | Soft guidance ("prefer...", "consider...") |
|
|
470
|
+
| Complies, but output has the wrong shape (bloated prompt, buried verdict, restated spec) | Positive recipe or contract: state what the output IS — its parts, in order | Prohibition list ("don't restate", "never narrate") |
|
|
471
|
+
| Omits a required element from something they already produce | Structural: REQUIRED field or slot in the template they fill in | Prose reminders near the template |
|
|
472
|
+
| Behavior should depend on a condition | Conditional keyed to an observable predicate ("if the brief exists, reference it") | Unconditional rule + exemption clauses |
|
|
471
473
|
|
|
472
|
-
|
|
474
|
+
**Why prohibitions backfire on shaping problems:** under a competing incentive ("make the prompt self-contained"), agents negotiate with "don't X". In head-to-head wording tests on dispatch-prompt guidance, the prohibition arm produced clearly more of the unwanted content than the recipe arm (fully separated distributions), and trended worse than even the no-guidance control — micro-test your own case rather than assuming, but never reach for the prohibition by default. A recipe leaves nothing to negotiate: the output matches the stated shape or it doesn't.
|
|
473
475
|
|
|
474
|
-
|
|
475
|
-
-
|
|
476
|
-
-
|
|
476
|
+
**Rules for whichever form you pick:**
|
|
477
|
+
- **No nuance clauses.** "Don't X unless it matters" reopens the negotiation — appending a single nuance clause to a winning recipe degraded it from consistent to noisy in the same wording tests. Express a real exception as its own conditional on an observable predicate.
|
|
478
|
+
- **Exemption clauses don't scope.** "This limit doesn't apply to code blocks" still suppresses code blocks. If part of the output must be exempt, restructure so the rule can't reach it.
|
|
477
479
|
|
|
478
|
-
##
|
|
480
|
+
## Bulletproofing Skills Against Rationalization
|
|
479
481
|
|
|
480
|
-
|
|
482
|
+
Skills that enforce discipline (like TDD) need to resist rationalization. Agents are smart and will find loopholes when under pressure.
|
|
481
483
|
|
|
482
|
-
|
|
484
|
+
**Scope:** this toolkit is for discipline failures — an agent that knows the rule and skips it under pressure. For wrong-shaped output or omitted elements, prohibition-based bulletproofing backfires; use the forms in Match the Form to the Failure instead.
|
|
483
485
|
|
|
484
|
-
|
|
486
|
+
**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.
|
|
485
487
|
|
|
486
|
-
###
|
|
488
|
+
### Close Every Loophole Explicitly
|
|
487
489
|
|
|
488
|
-
|
|
490
|
+
Don't just state the rule - forbid specific workarounds:
|
|
489
491
|
|
|
490
492
|
<Bad>
|
|
491
493
|
```markdown
|
|
492
|
-
|
|
494
|
+
Write code before test? Delete it.
|
|
493
495
|
```
|
|
494
496
|
</Bad>
|
|
495
497
|
|
|
496
498
|
<Good>
|
|
497
499
|
```markdown
|
|
498
|
-
|
|
500
|
+
Write code before test? Delete it. Start over.
|
|
499
501
|
|
|
500
|
-
|
|
501
|
-
-
|
|
502
|
-
-
|
|
503
|
-
-
|
|
504
|
-
-
|
|
502
|
+
**No exceptions:**
|
|
503
|
+
- Don't keep it as "reference"
|
|
504
|
+
- Don't "adapt" it while writing tests
|
|
505
|
+
- Don't look at it
|
|
506
|
+
- Delete means delete
|
|
505
507
|
```
|
|
506
508
|
</Good>
|
|
507
509
|
|
|
508
|
-
###
|
|
510
|
+
### Address "Spirit vs Letter" Arguments
|
|
509
511
|
|
|
510
|
-
|
|
512
|
+
Add foundational principle early:
|
|
511
513
|
|
|
512
514
|
```markdown
|
|
513
|
-
|
|
515
|
+
**Violating the letter of the rules is violating the spirit of the rules.**
|
|
514
516
|
```
|
|
515
517
|
|
|
516
|
-
|
|
518
|
+
This cuts off entire class of "I'm following the spirit" rationalizations.
|
|
517
519
|
|
|
518
|
-
###
|
|
520
|
+
### Build Rationalization Table
|
|
519
521
|
|
|
520
|
-
|
|
522
|
+
Capture rationalizations from baseline testing (see Testing section below). Every excuse agents make goes in the table:
|
|
521
523
|
|
|
522
524
|
```markdown
|
|
523
|
-
|
|
|
525
|
+
| Excuse | Reality |
|
|
524
526
|
|--------|---------|
|
|
525
|
-
| "
|
|
526
|
-
| "
|
|
527
|
-
| "
|
|
527
|
+
| "Too simple to test" | Simple code breaks. Test takes 30 seconds. |
|
|
528
|
+
| "I'll test after" | Tests passing immediately prove nothing. |
|
|
529
|
+
| "Tests after achieve same goals" | Tests-after = "what does this do?" Tests-first = "what should this do?" |
|
|
528
530
|
```
|
|
529
531
|
|
|
530
|
-
###
|
|
532
|
+
### Create Red Flags List
|
|
531
533
|
|
|
532
|
-
|
|
534
|
+
Make it easy for agents to self-check when rationalizing:
|
|
533
535
|
|
|
534
536
|
```markdown
|
|
535
|
-
##
|
|
537
|
+
## Red Flags - STOP and Start Over
|
|
536
538
|
|
|
537
|
-
-
|
|
538
|
-
- "
|
|
539
|
-
- "
|
|
540
|
-
- "
|
|
541
|
-
- "
|
|
539
|
+
- Code before test
|
|
540
|
+
- "I already manually tested it"
|
|
541
|
+
- "Tests after achieve the same purpose"
|
|
542
|
+
- "It's about spirit not ritual"
|
|
543
|
+
- "This is different because..."
|
|
542
544
|
|
|
543
|
-
|
|
545
|
+
**All of these mean: Delete code. Start over with TDD.**
|
|
544
546
|
```
|
|
545
547
|
|
|
546
|
-
###
|
|
548
|
+
### Update SDO for Violation Symptoms
|
|
547
549
|
|
|
548
|
-
|
|
550
|
+
Add to description: symptoms of when you're ABOUT to violate the rule:
|
|
549
551
|
|
|
550
552
|
```yaml
|
|
551
553
|
description: use when implementing any feature or bugfix, before writing implementation code
|
|
552
554
|
```
|
|
553
555
|
|
|
554
|
-
##
|
|
556
|
+
## RED-GREEN-REFACTOR for Skills
|
|
555
557
|
|
|
556
|
-
|
|
558
|
+
Follow the TDD cycle:
|
|
557
559
|
|
|
558
|
-
###
|
|
560
|
+
### RED: Write Failing Test (Baseline)
|
|
559
561
|
|
|
560
|
-
|
|
561
|
-
-
|
|
562
|
-
-
|
|
563
|
-
-
|
|
562
|
+
Run pressure scenario with subagent WITHOUT the skill. Document exact behavior:
|
|
563
|
+
- What choices did they make?
|
|
564
|
+
- What rationalizations did they use (verbatim)?
|
|
565
|
+
- Which pressures triggered violations?
|
|
564
566
|
|
|
565
|
-
|
|
567
|
+
This is "watch the test fail" - you must see what agents naturally do before writing the skill.
|
|
566
568
|
|
|
567
|
-
###
|
|
569
|
+
### GREEN: Write Minimal Skill
|
|
568
570
|
|
|
569
|
-
|
|
571
|
+
Write skill that addresses those specific rationalizations. Don't add extra content for hypothetical cases.
|
|
570
572
|
|
|
571
|
-
|
|
573
|
+
Run same scenarios WITH skill. Agent should now comply.
|
|
572
574
|
|
|
573
|
-
###
|
|
575
|
+
### REFACTOR: Close Loopholes
|
|
574
576
|
|
|
575
|
-
|
|
577
|
+
Agent found new rationalization? Add explicit counter. Re-test until bulletproof.
|
|
576
578
|
|
|
577
|
-
###
|
|
579
|
+
### Micro-Test Wording Before Full Scenarios
|
|
578
580
|
|
|
579
|
-
|
|
581
|
+
Full pressure-scenario runs are the final gate, but they are slow and expensive per iteration. Verify the wording itself first with micro-tests:
|
|
580
582
|
|
|
581
|
-
1.
|
|
582
|
-
2.
|
|
583
|
-
3.
|
|
584
|
-
4.
|
|
585
|
-
5.
|
|
583
|
+
1. **One fresh-context sample per call** — a raw API call, or a single-shot subagent if you don't have API access. System prompt = the realistic context the guidance will live in (the full skill or prompt template, not the guidance in isolation); user message = a task that tempts the failure.
|
|
584
|
+
2. **Always include a no-guidance control.** If the control doesn't exhibit the failure, there is nothing to fix — stop, don't author the guidance.
|
|
585
|
+
3. **5+ reps per variant.** Single samples lie.
|
|
586
|
+
4. **Manually read every flagged match.** Score programmatically if you like, but template echoes and quoted counter-examples masquerade as hits; automated counts alone overstate both failure and success.
|
|
587
|
+
5. **Variance is a metric.** When guidance lands, reps converge on the same shape. Five different interpretations across five reps means the wording isn't binding — tighten the form before adding words.
|
|
586
588
|
|
|
587
|
-
|
|
589
|
+
Micro-tests verify wording; they do not replace pressure scenarios for discipline skills.
|
|
588
590
|
|
|
589
|
-
|
|
590
|
-
-
|
|
591
|
-
-
|
|
592
|
-
-
|
|
593
|
-
-
|
|
591
|
+
**Testing methodology:** See [testing-skills-with-subagents.md](testing-skills-with-subagents.md) for the complete testing methodology:
|
|
592
|
+
- How to write pressure scenarios
|
|
593
|
+
- Pressure types (time, sunk cost, authority, exhaustion)
|
|
594
|
+
- Plugging holes systematically
|
|
595
|
+
- Meta-testing techniques
|
|
594
596
|
|
|
595
|
-
##
|
|
597
|
+
## Anti-Patterns
|
|
596
598
|
|
|
597
|
-
### [FAIL]
|
|
599
|
+
### [FAIL] Narrative Example
|
|
598
600
|
"In session 2025-10-03, we found empty projectDir caused..."
|
|
599
|
-
|
|
601
|
+
**Why bad:** Too specific, not reusable
|
|
600
602
|
|
|
601
|
-
### [FAIL]
|
|
602
|
-
example-js.js
|
|
603
|
-
|
|
603
|
+
### [FAIL] Multi-Language Dilution
|
|
604
|
+
example-js.js, example-py.py, example-go.go
|
|
605
|
+
**Why bad:** Mediocre quality, maintenance burden
|
|
604
606
|
|
|
605
|
-
### [FAIL]
|
|
607
|
+
### [FAIL] Code in Flowcharts
|
|
606
608
|
```dot
|
|
607
609
|
step1 [label="import fs"];
|
|
608
610
|
step2 [label="read file"];
|
|
609
611
|
```
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
### [FAIL]
|
|
613
|
-
helper1
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
##
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
-
|
|
622
|
-
-
|
|
623
|
-
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
##
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
- [ ]
|
|
635
|
-
- [ ]
|
|
636
|
-
- [ ]
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
- [ ]
|
|
640
|
-
- [ ] YAML frontmatter
|
|
641
|
-
- [ ] Description
|
|
642
|
-
- [ ] Description
|
|
643
|
-
- [ ]
|
|
644
|
-
- [ ]
|
|
645
|
-
- [ ]
|
|
646
|
-
- [ ]
|
|
647
|
-
- [ ]
|
|
648
|
-
- [ ]
|
|
649
|
-
- [ ]
|
|
650
|
-
- [ ]
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
- [ ]
|
|
654
|
-
- [ ]
|
|
655
|
-
- [ ]
|
|
656
|
-
- [ ]
|
|
657
|
-
- [ ]
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
- [ ]
|
|
661
|
-
- [ ]
|
|
662
|
-
- [ ]
|
|
663
|
-
- [ ]
|
|
664
|
-
- [ ]
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
- [ ]
|
|
668
|
-
- [ ]
|
|
669
|
-
|
|
670
|
-
##
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
1.
|
|
675
|
-
2.
|
|
676
|
-
3.
|
|
677
|
-
4.
|
|
678
|
-
5.
|
|
679
|
-
6.
|
|
680
|
-
|
|
681
|
-
|
|
612
|
+
**Why bad:** Can't copy-paste, hard to read
|
|
613
|
+
|
|
614
|
+
### [FAIL] Generic Labels
|
|
615
|
+
helper1, helper2, step3, pattern4
|
|
616
|
+
**Why bad:** Labels should have semantic meaning
|
|
617
|
+
|
|
618
|
+
## STOP: Before Moving to Next Skill
|
|
619
|
+
|
|
620
|
+
**After writing ANY skill, you MUST STOP and complete the deployment process.**
|
|
621
|
+
|
|
622
|
+
**Do NOT:**
|
|
623
|
+
- Create multiple skills in batch without testing each
|
|
624
|
+
- Move to next skill before current one is verified
|
|
625
|
+
- Skip testing because "batching is more efficient"
|
|
626
|
+
|
|
627
|
+
**The deployment checklist below is MANDATORY for EACH skill.**
|
|
628
|
+
|
|
629
|
+
Deploying untested skills = deploying untested code. It's a violation of quality standards.
|
|
630
|
+
|
|
631
|
+
## Skill Creation Checklist (TDD Adapted)
|
|
632
|
+
|
|
633
|
+
**IMPORTANT: Create a todo for EACH checklist item below.**
|
|
634
|
+
|
|
635
|
+
**RED Phase - Write Failing Test:**
|
|
636
|
+
- [ ] Create pressure scenarios (3+ combined pressures for discipline skills)
|
|
637
|
+
- [ ] Run scenarios WITHOUT skill - document baseline behavior verbatim
|
|
638
|
+
- [ ] Identify patterns in rationalizations/failures
|
|
639
|
+
|
|
640
|
+
**GREEN Phase - Write Minimal Skill:**
|
|
641
|
+
- [ ] Name uses only letters, numbers, hyphens (no parentheses/special chars)
|
|
642
|
+
- [ ] YAML frontmatter with required `name` and `description` fields (max 1024 chars; see [spec](https://agentskills.io/specification))
|
|
643
|
+
- [ ] Description starts with "Use when..." and includes specific triggers/symptoms
|
|
644
|
+
- [ ] Description written in third person
|
|
645
|
+
- [ ] Keywords throughout for search (errors, symptoms, tools)
|
|
646
|
+
- [ ] Clear overview with core principle
|
|
647
|
+
- [ ] Address specific baseline failures identified in RED
|
|
648
|
+
- [ ] Guidance form matches the failure type (see Match the Form to the Failure)
|
|
649
|
+
- [ ] For behavior-shaping guidance: wording micro-tested against a no-guidance control (5+ reps, every flagged match read manually) — N/A for pure reference skills
|
|
650
|
+
- [ ] Code inline OR link to separate file
|
|
651
|
+
- [ ] One excellent example (not multi-language)
|
|
652
|
+
- [ ] Run scenarios WITH skill - verify agents now comply
|
|
653
|
+
|
|
654
|
+
**REFACTOR Phase - Close Loopholes:**
|
|
655
|
+
- [ ] Identify NEW rationalizations from testing
|
|
656
|
+
- [ ] Add explicit counters (if discipline skill)
|
|
657
|
+
- [ ] Build rationalization table from all test iterations
|
|
658
|
+
- [ ] Create red flags list
|
|
659
|
+
- [ ] Re-test until bulletproof
|
|
660
|
+
|
|
661
|
+
**Quality Checks:**
|
|
662
|
+
- [ ] Small flowchart only if decision non-obvious
|
|
663
|
+
- [ ] Quick reference table
|
|
664
|
+
- [ ] Common mistakes section
|
|
665
|
+
- [ ] No narrative storytelling
|
|
666
|
+
- [ ] Supporting files only for tools or heavy reference
|
|
667
|
+
|
|
668
|
+
**Deployment:**
|
|
669
|
+
- [ ] Commit skill to git and push to your fork (if configured)
|
|
670
|
+
- [ ] Consider contributing back via PR (if broadly useful)
|
|
671
|
+
|
|
672
|
+
## Discovery Workflow
|
|
673
|
+
|
|
674
|
+
How future agents find your skill:
|
|
675
|
+
|
|
676
|
+
1. **Encounters problem** ("tests are flaky")
|
|
677
|
+
2. **Searches skills** (greps descriptions, browses categories)
|
|
678
|
+
3. **Finds SKILL** (description matches)
|
|
679
|
+
4. **Scans overview** (is this relevant?)
|
|
680
|
+
5. **Reads patterns** (quick reference table)
|
|
681
|
+
6. **Loads example** (only when implementing)
|
|
682
|
+
|
|
683
|
+
**Optimize for this flow** - put searchable terms early and often.
|