claude-dev-env 2.0.1 → 2.1.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.
- package/CLAUDE.md +1 -1
- package/agents/clean-coder.md +31 -1
- package/audit-rubrics/prompts/category-e-dead-code.md +2 -2
- package/bin/install.test.mjs +2 -2
- package/docs/CLAUDE.md +6 -3
- package/docs/CODE_RULES.md +5 -1
- package/docs/agent-spawn-protocol.md +39 -0
- package/docs/nas-ssh-invocation.md +23 -0
- package/docs/worker-completion-gate.md +33 -0
- package/hooks/blocking/CLAUDE.md +1 -0
- package/hooks/blocking/code_rules_dead_module_constant.py +11 -5
- package/hooks/blocking/code_rules_shared.py +126 -47
- package/hooks/blocking/config/CLAUDE.md +2 -0
- package/hooks/blocking/config/verified_commit_constants.py +8 -1
- package/hooks/blocking/config/verified_commit_context_constants.py +21 -0
- package/hooks/blocking/config/verified_commit_gate_output_constants.py +14 -0
- package/hooks/blocking/conftest.py +36 -30
- package/hooks/blocking/convergence_gate_blocker.py +76 -8
- package/hooks/blocking/plain_language_blocker.py +8 -0
- package/hooks/blocking/state_description_blocker.py +4 -1
- package/hooks/blocking/test_code_rules_enforcer_dead_module_constant.py +58 -0
- package/hooks/blocking/test_code_rules_enforcer_dead_module_constant_alias.py +133 -0
- package/hooks/blocking/test_code_rules_shared.py +120 -20
- package/hooks/blocking/test_convergence_gate_blocker.py +146 -0
- package/hooks/blocking/test_plain_language_blocker.py +15 -0
- package/hooks/blocking/test_state_description_blocker.py +15 -0
- package/hooks/blocking/test_verification_verdict_store.py +12 -0
- package/hooks/blocking/test_verified_commit_config_bootstrap.py +18 -0
- package/hooks/blocking/test_verified_commit_docs_delta.py +176 -0
- package/hooks/blocking/test_verified_commit_gate_additional_context.py +134 -0
- package/hooks/blocking/tests/test_pii_prevention_blocker.py +0 -1
- package/hooks/blocking/tests/test_verified_commit_gate.py +41 -0
- package/hooks/blocking/verified_commit_config_bootstrap.py +22 -10
- package/hooks/blocking/verified_commit_gate.py +113 -568
- package/hooks/blocking/verified_commit_gate_parts/CLAUDE.md +28 -0
- package/hooks/blocking/verified_commit_gate_parts/__init__.py +1 -0
- package/hooks/blocking/verified_commit_gate_parts/command_tokenization.py +174 -0
- package/hooks/blocking/verified_commit_gate_parts/deny_payload.py +53 -0
- package/hooks/blocking/verified_commit_gate_parts/deny_reason.py +80 -0
- package/hooks/blocking/verified_commit_gate_parts/directory_resolution.py +170 -0
- package/hooks/blocking/verified_commit_gate_parts/gated_invocations.py +205 -0
- package/hooks/blocking/verified_commit_gate_parts/tests/conftest.py +10 -0
- package/hooks/blocking/verified_commit_gate_parts/tests/test_command_tokenization.py +94 -0
- package/hooks/blocking/verified_commit_gate_parts/tests/test_deny_payload.py +17 -0
- package/hooks/blocking/verified_commit_gate_parts/tests/test_deny_reason.py +38 -0
- package/hooks/blocking/verified_commit_gate_parts/tests/test_directory_resolution.py +71 -0
- package/hooks/blocking/verified_commit_gate_parts/tests/test_gated_invocations.py +61 -0
- package/hooks/hooks_constants/CLAUDE.md +4 -1
- package/hooks/hooks_constants/code_rules_path_utils_constants.py +1 -0
- package/hooks/hooks_constants/convergence_gate_blocker_constants.py +36 -0
- package/hooks/hooks_constants/dead_module_constant_constants.py +8 -0
- package/hooks/hooks_constants/harness_scratchpad_constants.py +10 -9
- package/hooks/hooks_constants/mypy_integration_constants.py +16 -0
- package/hooks/hooks_constants/pii_prevention_constants.py +1 -0
- package/hooks/validators/mypy_integration.py +145 -24
- package/hooks/validators/python_antipattern_checks.py +16 -0
- package/hooks/validators/run_all_validators.py +9 -3
- package/hooks/validators/test_mypy_integration.py +154 -0
- package/hooks/validators/test_python_antipattern_checks.py +112 -1
- package/hooks/validators/test_run_all_validators_pretooluse.py +16 -0
- package/package.json +1 -1
- package/rules/CLAUDE.md +3 -3
- package/rules/agent-spawn-protocol.md +5 -43
- package/rules/code-standards.md +1 -36
- package/rules/env-var-table-code-drift.md +2 -21
- package/rules/hook-prose-matches-detector.md +5 -16
- package/rules/nas-ssh-invocation.md +3 -15
- package/rules/no-historical-clutter.md +7 -49
- package/rules/no-inline-destructive-literals.md +3 -5
- package/rules/package-inventory-stale-entry.md +7 -32
- package/rules/re-stage-before-commit.md +6 -23
- package/rules/shell-invocation-policy.md +1 -1
- package/rules/vault-context.md +3 -3
- package/rules/verified-commit-gate-skip.md +28 -0
- package/rules/workers-done-before-complete.md +2 -30
- package/scripts/claude_chain_runner.py +39 -3
- package/scripts/dev_env_scripts_constants/claude_chain_constants.py +3 -0
- package/scripts/test_claude_chain_runner.py +112 -0
- package/scripts/test_grok_headless_runner.py +0 -1
- package/skills/auditing-claude-config/CLAUDE.md +2 -1
- package/skills/auditing-claude-config/SKILL.md +114 -176
- package/skills/auditing-claude-config/reference/probe-hook.md +74 -0
- package/skills/autoconverge/CLAUDE.md +1 -0
- package/skills/autoconverge/SKILL.md +310 -346
- package/skills/autoconverge/reference/CLAUDE.md +1 -0
- package/skills/autoconverge/reference/copilot-findings.md +51 -0
- package/skills/closeout/SKILL.md +7 -9
- package/skills/copilot-finding-triage/SKILL.md +5 -7
- package/skills/copilot-review/CLAUDE.md +3 -2
- package/skills/copilot-review/SKILL.md +119 -155
- package/skills/copilot-review/templates/subagent-prompt.md +49 -0
- package/skills/everything-search/SKILL.md +7 -1
- package/skills/fresh-branch/CLAUDE.md +6 -9
- package/skills/fresh-branch/SKILL.md +84 -33
- package/skills/fresh-branch/scripts/create_fresh_branch.py +445 -0
- package/skills/fresh-branch/scripts/fresh_branch_scripts_constants/__init__.py +1 -0
- package/skills/fresh-branch/scripts/fresh_branch_scripts_constants/fresh_branch_cli_constants.py +74 -0
- package/skills/fresh-branch/scripts/test_create_fresh_branch.py +670 -0
- package/skills/orchestrator/SKILL.md +161 -147
- package/skills/pr-converge/SKILL.md +277 -422
- package/skills/pr-converge/reference/CLAUDE.md +1 -0
- package/skills/pr-converge/reference/progress-checklist.md +168 -0
- package/skills/pr-converge/test_step5_host_branch.py +8 -6
- package/skills/pr-loop-cloud-transport/SKILL.md +1 -1
- package/skills/privacy-hygiene/SKILL.md +68 -115
- package/skills/privacy-hygiene/reference/sweep-procedure.md +62 -0
- package/skills/session-log/CLAUDE.md +2 -1
- package/skills/session-log/SKILL.md +4 -26
- package/skills/session-log/templates/frontmatter.md +40 -0
- package/skills/skill-builder/CLAUDE.md +8 -7
- package/skills/skill-builder/SKILL.md +26 -11
- package/skills/skill-builder/references/CLAUDE.md +3 -1
- package/skills/skill-builder/references/delegation-map.md +21 -12
- package/skills/skill-builder/references/description-field.md +9 -11
- package/skills/skill-builder/references/deterministic-elements.md +218 -0
- package/skills/skill-builder/references/self-audit-checklist.md +62 -45
- package/skills/skill-builder/references/skill-modularity.md +8 -9
- package/skills/skill-builder/templates/CLAUDE.md +2 -2
- package/skills/skill-builder/templates/gap-analysis.md +15 -0
- package/skills/skill-builder/workflows/CLAUDE.md +5 -5
- package/skills/skill-builder/workflows/improve-skill.md +18 -9
- package/skills/skill-builder/workflows/new-skill.md +23 -15
- package/skills/skill-builder/workflows/polish-skill.md +28 -21
- package/system-prompts/CLAUDE.md +3 -3
- package/docs/agents-md-alignment-plan.md +0 -123
- package/docs/emotion-informed-prompt-design.md +0 -362
- package/rules/es-exe-file-search.md +0 -17
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
name: skill-builder
|
|
3
3
|
description: >-
|
|
4
4
|
Skill lifecycle: classify, scaffold, write via skill-writer, self-audit, compose
|
|
5
|
-
sub-skills, polish description triggers. Triggers:
|
|
6
|
-
workflow, improve this skill, optimize skill description,
|
|
7
|
-
lifecycle, skill modularity, skill composition, description
|
|
5
|
+
sub-skills, polish description triggers, enforce deterministic scripts. Triggers:
|
|
6
|
+
build a skill, new skill workflow, improve this skill, optimize skill description,
|
|
7
|
+
skill development lifecycle, skill modularity, skill composition, description
|
|
8
|
+
trigger catalog, deterministic skill scripts.
|
|
8
9
|
---
|
|
9
10
|
|
|
10
11
|
# Skill Builder
|
|
@@ -22,6 +23,8 @@ Highest-signal content. Append a bullet each time a skill build fails in a new w
|
|
|
22
23
|
- Story-form `description` burns always-on context and weakens selection — rewrite to capability stem + `Triggers:` list (`description-field.md`).
|
|
23
24
|
- Multi-capability packages fail modularity audit — split or thin orchestrator + named sub-skills (`skill-modularity.md`).
|
|
24
25
|
- Skipping the composition plan before Write reintroduces silent reimplementation of peer skills.
|
|
26
|
+
- Deterministic steps written only as prose (fenced source, giant `rg` lines, multi-step mechanical sequences) fail audit — extract to `scripts/` / `workflow/` / `templates/` / `reference/` (`deterministic-elements.md`).
|
|
27
|
+
- Markdown `- [ ]` checklists as the agent's progress board fail audit when a task tool exists — seed tasks via `TaskCreate` / `TodoWrite` (`deterministic-elements.md`).
|
|
25
28
|
|
|
26
29
|
## When this skill applies
|
|
27
30
|
|
|
@@ -116,11 +119,13 @@ Mandatory highest-signal section (see Gotchas above). Capture real failure modes
|
|
|
116
119
|
|
|
117
120
|
Use the template pattern for structured outputs. Use the examples pattern (input/output pairs) for style-dependent work.
|
|
118
121
|
|
|
119
|
-
### Workflows and
|
|
122
|
+
### Workflows and task seeds
|
|
120
123
|
|
|
121
|
-
|
|
124
|
+
Multi-step required work is a **task seed list** (plain bullets in a reference file) plus an instruction to register each item on the host task tool (`TaskCreate`, `TodoWrite`, or equivalent). Agents work the task list and mark complete with evidence.
|
|
122
125
|
|
|
123
|
-
|
|
126
|
+
Do **not** ship markdown `- [ ]` boards as the completion protocol when a task tool is available. Do **not** say "copy this checklist into your response and check it off."
|
|
127
|
+
|
|
128
|
+
Quality-critical operations still use feedback loops (run validator → fix → repeat). Spec: [`references/deterministic-elements.md`](references/deterministic-elements.md) (Task-tool tracking).
|
|
124
129
|
|
|
125
130
|
### Scripts
|
|
126
131
|
|
|
@@ -128,6 +133,14 @@ Multi-step processes get `[ ]` checklists. Quality-critical operations get feedb
|
|
|
128
133
|
|
|
129
134
|
> "One of the most powerful tools you can give Claude is code — letting Claude spend its turns on composition rather than reconstructing boilerplate."
|
|
130
135
|
|
|
136
|
+
### Deterministic elements (mandatory classification)
|
|
137
|
+
|
|
138
|
+
Any skill element that is **deterministic** (same inputs → same outputs; machine-checkable success) ships as code, a fixed artifact, or a **session task seed** — not prose-only steps or markdown checkbox boards. Judgment, routing, and refusals stay in markdown.
|
|
139
|
+
|
|
140
|
+
Full rules, inventory table, task-tool tracking, CODE_RULES bar for skill scripts, and anti-patterns: [`references/deterministic-elements.md`](references/deterministic-elements.md).
|
|
141
|
+
|
|
142
|
+
New-skill Gather records a deterministic-elements inventory before write. Self-audit items register as session tasks and are mandatory on every delivery (pure-judgment skills mark script rows N/A with evidence).
|
|
143
|
+
|
|
131
144
|
### Setup and memory
|
|
132
145
|
|
|
133
146
|
> "Think through the Setup — some skills may need to be set up with context from the user. A good pattern is to store this in a config.json file."
|
|
@@ -142,22 +155,23 @@ Multi-step processes get `[ ]` checklists. Quality-critical operations get feedb
|
|
|
142
155
|
|
|
143
156
|
> No Windows paths. Don’t offer too many options — provide a default with escape hatch. Avoid time-sensitive claims. Use consistent terminology. No deeply nested references.
|
|
144
157
|
|
|
145
|
-
Also: story-form descriptions; monolith multi-capability skills; silent reimplementation of peer skills; nested folders used as fake sub-skills.
|
|
158
|
+
Also: story-form descriptions; monolith multi-capability skills; silent reimplementation of peer skills; nested folders used as fake sub-skills; deterministic logic only in prose or fenced source; markdown `- [ ]` as the agent's work tracker.
|
|
146
159
|
|
|
147
160
|
## Self-audit
|
|
148
161
|
|
|
149
|
-
After every build, improvement, or polish pass,
|
|
162
|
+
After every build, improvement, or polish pass, load `${CLAUDE_SKILL_DIR}/references/self-audit-checklist.md`, **register every bullet as a session task**, and complete each with evidence. Every item must pass before delivery. Fix failures, then re-audit.
|
|
150
163
|
|
|
151
164
|
## Delegation to skill-writer
|
|
152
165
|
|
|
153
166
|
skill-builder orchestrates; skill-writer authors. The handoff packet from Step 4 must include:
|
|
154
167
|
|
|
155
168
|
- Skill type and folder structure
|
|
156
|
-
- Gap analysis or observation findings (composition plan + description triggers)
|
|
169
|
+
- Gap analysis or observation findings (composition plan + description triggers + deterministic inventory)
|
|
157
170
|
- Degree of freedom assessment
|
|
158
171
|
- Initial gotchas
|
|
159
172
|
- Composition plan: related skills, sub-skills to invoke, split decisions
|
|
160
173
|
- Description trigger catalog: capability stem + trigger phrases (not prose)
|
|
174
|
+
- Deterministic elements inventory: each process step classified; code paths + paired tests
|
|
161
175
|
- Any constraints
|
|
162
176
|
|
|
163
177
|
See `${CLAUDE_SKILL_DIR}/references/delegation-map.md` for exact patterns.
|
|
@@ -171,12 +185,13 @@ See `${CLAUDE_SKILL_DIR}/references/delegation-map.md` for exact patterns.
|
|
|
171
185
|
| `references/progressive-disclosure.md` | Folder conventions, hub pattern, hard rules |
|
|
172
186
|
| `references/skill-modularity.md` | Cross-skill modularity, sub-skills, composition plan |
|
|
173
187
|
| `references/description-field.md` | Description as trigger catalog (not story prose) |
|
|
174
|
-
| `references/
|
|
188
|
+
| `references/deterministic-elements.md` | Deterministic steps as code/task seeds; CODE_RULES; no markdown checkbox boards |
|
|
189
|
+
| `references/self-audit-checklist.md` | Post-build audit task seeds (register via TaskCreate / TodoWrite) |
|
|
175
190
|
| `references/delegation-map.md` | Subagent handoff patterns and transcript guidance |
|
|
176
191
|
| `workflows/new-skill.md` | Full lifecycle for new skills (6 steps) |
|
|
177
192
|
| `workflows/improve-skill.md` | Observation-first flow for existing skills (6 steps) |
|
|
178
193
|
| `workflows/polish-skill.md` | Description trigger-catalog audit and final validation (5 steps) |
|
|
179
|
-
| `templates/gap-analysis.md` | Gaps, composition plan, description triggers |
|
|
194
|
+
| `templates/gap-analysis.md` | Gaps, composition plan, description triggers, deterministic inventory |
|
|
180
195
|
|
|
181
196
|
## Folder map
|
|
182
197
|
|
|
@@ -6,11 +6,12 @@ Best-practice specifications and the mandatory self-audit checklist for the `/sk
|
|
|
6
6
|
|
|
7
7
|
| File | Purpose |
|
|
8
8
|
|---|---|
|
|
9
|
-
| `self-audit-checklist.md` |
|
|
9
|
+
| `self-audit-checklist.md` | Audit task seeds after every build, improve, or polish. Register via TaskCreate / TodoWrite. |
|
|
10
10
|
| `skill-types.md` | 9-type skill taxonomy with folder structures per type. |
|
|
11
11
|
| `progressive-disclosure.md` | Hub pattern, folder conventions, hard rules: SKILL.md under 500 lines, one-level references. |
|
|
12
12
|
| `skill-modularity.md` | Cross-skill modularity: one capability, sub-skills by name, composition plan, anti-monolith. |
|
|
13
13
|
| `description-field.md` | Frontmatter description as trigger catalog (capability stem + Triggers). No story prose. |
|
|
14
|
+
| `deterministic-elements.md` | Classify process steps; deterministic ones ship as code, task seeds, or fixed artifacts under CODE_RULES. |
|
|
14
15
|
| `delegation-map.md` | Subagent handoff patterns and transcript guidance for skill-builder → skill-writer. |
|
|
15
16
|
| `thariq-x-post-skills.json` | Source reference data from Anthropic lessons on building Claude Code skills. |
|
|
16
17
|
|
|
@@ -20,4 +21,5 @@ Best-practice specifications and the mandatory self-audit checklist for the `/sk
|
|
|
20
21
|
- `self-audit-checklist.md` always loads at the end of a build cycle.
|
|
21
22
|
- Load `skill-modularity.md` during Gather and when scope/overlap is diagnosed.
|
|
22
23
|
- Load `description-field.md` during Gather, polish Step 1, and any activation diagnosis.
|
|
24
|
+
- Load `deterministic-elements.md` during Gather, when prose-as-code is diagnosed, and on polish structure audit.
|
|
23
25
|
- `thariq-x-post-skills.json` is source reference data, not executable content.
|
|
@@ -21,15 +21,19 @@ Create a skill with these parameters:
|
|
|
21
21
|
**Composition plan:** [related skills; sub-skills with when/produces/missing; leaf vs orchestrator]
|
|
22
22
|
**Description (exact frontmatter string):** [capability stem. Triggers: phrase, phrase, ...]
|
|
23
23
|
— Trigger catalog only per description-field.md. No story prose.
|
|
24
|
+
**Deterministic inventory:** [each process step → class → home path → paired test]
|
|
25
|
+
— Per deterministic-elements.md. Deterministic steps must be code/artifacts, not prose-only.
|
|
24
26
|
|
|
25
27
|
Produce:
|
|
26
28
|
1. SKILL.md with hub layout (principle, gotchas, when-applies, process, file index, folder map)
|
|
27
29
|
2. Frontmatter description set to the exact trigger-catalog string above
|
|
28
30
|
3. Sub-skills table in body when composition plan lists peer skills
|
|
29
|
-
4. Companion files as needed (reference docs, workflow steps, templates)
|
|
30
|
-
5.
|
|
31
|
-
6.
|
|
32
|
-
7.
|
|
31
|
+
4. Companion files as needed (reference docs, workflow steps, templates, scripts)
|
|
32
|
+
5. Scripts/workflows for every deterministic inventory row; body only points and handles exit codes
|
|
33
|
+
6. Skill scripts follow CODE_RULES (`*_constants/`, types, specific errors, paired tests)
|
|
34
|
+
7. Every file under 500 lines; TOC on files over 100 lines
|
|
35
|
+
8. File index listing every file and its purpose
|
|
36
|
+
9. No reimplementation of steps owned by named sub-skills
|
|
33
37
|
```
|
|
34
38
|
|
|
35
39
|
### Refine skill handoff
|
|
@@ -44,9 +48,11 @@ Refine this existing skill:
|
|
|
44
48
|
**What to preserve:** [working content — do not touch]
|
|
45
49
|
**Description rewrite (if activation issue):** [exact new trigger-catalog string]
|
|
46
50
|
**Composition change (if modularity issue):** [sub-skills to add/invoke or split plan]
|
|
51
|
+
**Deterministic fix (if prose-only mechanical work):** [steps to extract → script/workflow/template paths + tests]
|
|
47
52
|
|
|
48
53
|
Constraint: Only change what the observations demand. Do not reorganize working content.
|
|
49
54
|
Description must remain a trigger catalog (description-field.md), never story prose.
|
|
55
|
+
Deterministic steps must not remain prose-only (deterministic-elements.md).
|
|
50
56
|
```
|
|
51
57
|
|
|
52
58
|
## Spawning a test subagent
|
|
@@ -78,27 +84,30 @@ Scan the transcript for:
|
|
|
78
84
|
3. **Re-read files** — Did Claude re-read the same file multiple times? That content should be in SKILL.md.
|
|
79
85
|
4. **Gotcha moments** — Where did Claude make a wrong choice? That's a gotcha candidate.
|
|
80
86
|
5. **Script usage** — Did Claude execute scripts as expected, or did it try to read them instead?
|
|
81
|
-
6. **
|
|
87
|
+
6. **Prose-as-code** — Did Claude reconstruct a multi-step mechanical sequence from markdown when a script should have run? Flag as deterministic-elements failure.
|
|
88
|
+
7. **Tool call errors** — Any "tool not found" or path errors? Fix references.
|
|
82
89
|
|
|
83
90
|
## Delegating self-audit
|
|
84
91
|
|
|
85
|
-
After building, spawn a subagent to run the
|
|
92
|
+
After building, spawn a subagent to run the audit independently (task-tool first):
|
|
86
93
|
|
|
87
94
|
```
|
|
88
95
|
Agent(
|
|
89
96
|
subagent_type="general-purpose",
|
|
90
|
-
description="Self-audit skill
|
|
97
|
+
description="Self-audit skill via task seeds",
|
|
91
98
|
prompt="Read the skill at [skill-path]/SKILL.md and all companion files.
|
|
92
99
|
|
|
93
|
-
Then read the self-audit
|
|
100
|
+
Then read the self-audit task seeds at [skill-builder-path]/references/self-audit-checklist.md.
|
|
94
101
|
|
|
95
|
-
|
|
102
|
+
Register every bullet as a session task (TaskCreate / TodoWrite). Complete each with PASS, FAIL+file:line+fix, or N/A+reason. Do not use markdown checkboxes as the tracker.
|
|
96
103
|
|
|
97
104
|
Report as:
|
|
98
105
|
## Audit Results
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
106
|
+
- PASS: N
|
|
107
|
+
- N/A: M
|
|
108
|
+
- FAIL fixed: K
|
|
109
|
+
- Remaining FAIL (must be empty): …
|
|
110
|
+
"
|
|
102
111
|
)
|
|
103
112
|
```
|
|
104
113
|
|
|
@@ -85,19 +85,17 @@ description: You can use this to process Excel files
|
|
|
85
85
|
3. List **near-misses** that must *not* select it (sibling skills). Fold only the shortest distinguishing tokens into Triggers if needed.
|
|
86
86
|
4. Assemble stem + `Triggers:` list. Strip adjectives, benefits, and process narrative.
|
|
87
87
|
5. Count characters (≤1024). Prefer under ~400 when possible — every skill’s description is always loaded.
|
|
88
|
-
6.
|
|
88
|
+
6. Register the task seeds below on the session task list (`TaskCreate` / `TodoWrite`); complete each with evidence. Do not use markdown checkboxes as the tracker.
|
|
89
89
|
|
|
90
|
-
## Description
|
|
90
|
+
## Description task seeds
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
- [ ] Body holds process detail — not the description
|
|
100
|
-
```
|
|
92
|
+
- Third person; no I/you
|
|
93
|
+
- Capability stem present (what), ≤20 words of tokens
|
|
94
|
+
- Triggers: segment (or equivalent dense when-list) with concrete phrases
|
|
95
|
+
- No story prose, benefits language, or implementation steps
|
|
96
|
+
- No XML; length ≤1024
|
|
97
|
+
- Distinguishable from sibling skills in the same domain
|
|
98
|
+
- Body holds process detail — not the description
|
|
101
99
|
|
|
102
100
|
## Where process lives
|
|
103
101
|
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# Deterministic skill elements
|
|
2
|
+
|
|
3
|
+
Source: [Anthropic — Skill authoring best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices) (scripts, progressive disclosure), [Lessons from Building Claude Code](thariq-x-post-skills.json), repo skill conventions (`skills/CLAUDE.md`), `docs/CODE_RULES.md`, host task tools (`TaskCreate`, `TodoWrite`, and equivalents).
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- [Rule](#rule)
|
|
8
|
+
- [What counts as deterministic](#what-counts-as-deterministic)
|
|
9
|
+
- [Placement](#placement)
|
|
10
|
+
- [Task-tool tracking (not markdown checklists)](#task-tool-tracking-not-markdown-checklists)
|
|
11
|
+
- [CODE_RULES bar (every code file in the skill)](#code_rules-bar-every-code-file-in-the-skill)
|
|
12
|
+
- [Inventory (required before Write)](#inventory-required-before-write)
|
|
13
|
+
- [Required task seeds (Gather / gates)](#required-task-seeds-gather--gates)
|
|
14
|
+
- [Anti-patterns (fail self-audit)](#anti-patterns-fail-self-audit)
|
|
15
|
+
- [How the body should look](#how-the-body-should-look)
|
|
16
|
+
- [Relation to other skill-builder specs](#relation-to-other-skill-builder-specs)
|
|
17
|
+
|
|
18
|
+
## Rule
|
|
19
|
+
|
|
20
|
+
Any skill element that is **deterministic** ships as **code**, a **fixed artifact**, or a **session task** — never as prose-only work tracking.
|
|
21
|
+
|
|
22
|
+
| Deterministic shape | Required home |
|
|
23
|
+
|---|---|
|
|
24
|
+
| Validators, transforms, detection, mechanical sequences | `scripts/` or `workflow/*.mjs` (+ tests, `*_constants/`) |
|
|
25
|
+
| Verbatim templates | `templates/` |
|
|
26
|
+
| Long fixed tables / catalogs Claude must not paraphrase | `reference/` |
|
|
27
|
+
| Ordered work the agent must complete without skipping | Host **task tool** (`TaskCreate`, `TodoWrite`, or equivalent) |
|
|
28
|
+
|
|
29
|
+
> "One of the most powerful tools you can give Claude is code — letting Claude spend its turns on composition rather than reconstructing boilerplate."
|
|
30
|
+
|
|
31
|
+
> "These can include deterministic scripts or tools for maximum robustness."
|
|
32
|
+
|
|
33
|
+
Judgment, routing, and refusal stay in markdown. Fixed procedures and transforms stay in scripts. Required step lists stay on the task list — not as markdown `[ ]` boxes.
|
|
34
|
+
|
|
35
|
+
## What counts as deterministic
|
|
36
|
+
|
|
37
|
+
A process step is deterministic when **all** of these hold:
|
|
38
|
+
|
|
39
|
+
1. Same inputs → same outputs (no open-ended taste or design judgment).
|
|
40
|
+
2. Success or failure is machine-checkable (exit code, schema, path exists, token present, task marked complete with evidence).
|
|
41
|
+
3. A human could write the step as a pure function, a fixed command sequence, or a fixed task list.
|
|
42
|
+
|
|
43
|
+
### Deterministic (must leave prose-only tracking)
|
|
44
|
+
|
|
45
|
+
| Shape | Home |
|
|
46
|
+
|---|---|
|
|
47
|
+
| Validators, linters, schema/packet checks | `scripts/` (or `workflow/*.mjs`) |
|
|
48
|
+
| Multi-step mechanical sequences (compile, collect, gate, scan) | `scripts/` |
|
|
49
|
+
| Detection logic (regex sets, path rules, pattern catalogs) | `scripts/` + `*_constants/` |
|
|
50
|
+
| Sorting, ranking, ID assignment, path resolution | `scripts/` |
|
|
51
|
+
| Verbatim prompt or output templates | `templates/` (skill body points to the path) |
|
|
52
|
+
| Long fixed tables / catalogs | `reference/` or a script that prints the list |
|
|
53
|
+
| Inline Python / JS fences meant to run | Extract to `scripts/` or `workflow/` |
|
|
54
|
+
| Ordered gates, audits, author checks the agent must finish | **Task tool** — seed each item; mark complete with evidence |
|
|
55
|
+
|
|
56
|
+
### Judgment (markdown is correct)
|
|
57
|
+
|
|
58
|
+
| Shape | Home |
|
|
59
|
+
|---|---|
|
|
60
|
+
| When to invoke the skill; refusal lines | `SKILL.md` |
|
|
61
|
+
| How to weigh trade-offs or pick among valid approaches | `SKILL.md` / `reference/` |
|
|
62
|
+
| Gotchas and failure modes | `SKILL.md` |
|
|
63
|
+
| Sub-skill routing and composition | `SKILL.md` |
|
|
64
|
+
| Degree-of-freedom guidance | `SKILL.md` |
|
|
65
|
+
|
|
66
|
+
### Borderline
|
|
67
|
+
|
|
68
|
+
- A one-liner that only launches a tool with no branching → may stay in body; the moment it grows patterns, branches, or magic strings → `scripts/`.
|
|
69
|
+
- A short narrative process outline (Step 1 / Step 2 headings) may stay in body **if** every required work item is also registered on the task list. Headings are orientation; the task list is the completion surface.
|
|
70
|
+
- Markdown `[ ]` as the only place an agent is expected to track progress → **always fail** when a task tool is available.
|
|
71
|
+
|
|
72
|
+
## Placement
|
|
73
|
+
|
|
74
|
+
| Artifact | Directory / surface | Role |
|
|
75
|
+
|---|---|---|
|
|
76
|
+
| Python helpers | `scripts/` | Run, do not load into context as source |
|
|
77
|
+
| Workflow scripts | `workflow/` (`*.mjs`) | Host `Workflow` tool entrypoints |
|
|
78
|
+
| Named constants | `*_constants/` next to the scripts that import them | CODE_RULES config surface for skill code |
|
|
79
|
+
| Fixed templates | `templates/` | Copy/fill or pass to a script |
|
|
80
|
+
| Domain tables, long fixed lists | `reference/` | Load on demand |
|
|
81
|
+
| Required work items | Host task tool | Create at skill start; complete with evidence |
|
|
82
|
+
| Process skeleton + pointers | `SKILL.md` | "Run `scripts/foo.py` …" / "Register tasks from …" |
|
|
83
|
+
|
|
84
|
+
`SKILL.md` names the script, when to run it, what it prints, and how to treat non-zero exit. It does not restate the algorithm. It names which task-seed lists to load and when to register them.
|
|
85
|
+
|
|
86
|
+
## Task-tool tracking (not markdown checklists)
|
|
87
|
+
|
|
88
|
+
Harnesses expose task tools so agents cannot silently skip steps. A skill that expects the agent to finish an ordered set of work **must**:
|
|
89
|
+
|
|
90
|
+
1. Publish the items as a **task seed list** (plain bullets or numbered lines in a reference file — **no** `- [ ]` syntax).
|
|
91
|
+
2. Instruct the agent, at the start of that phase, to **create one session task per item** via the host tool:
|
|
92
|
+
- Prefer `TaskCreate` (or host `Task` / tasks MCP) when present.
|
|
93
|
+
- Else `TodoWrite` / equivalent.
|
|
94
|
+
- Fail closed: if no task tool exists, say so and stop — do not fall back to markdown checkboxes as the tracking plan.
|
|
95
|
+
3. Require each task to be marked complete only with evidence (PASS / FAIL+file:line / N/A+reason / exit code / path).
|
|
96
|
+
4. Ban "copy this checklist into your response and check it off" as the primary tracking method.
|
|
97
|
+
|
|
98
|
+
Reference files may still **catalog** the required items so authors and agents know what to seed. Catalogs are data for `TaskCreate`; they are not the live work board.
|
|
99
|
+
|
|
100
|
+
### Skills that ship multi-step process
|
|
101
|
+
|
|
102
|
+
Any skill whose process has two or more required steps must include a short **Task seeding** instruction in `SKILL.md` or the active workflow:
|
|
103
|
+
|
|
104
|
+
```markdown
|
|
105
|
+
## Task seeding
|
|
106
|
+
|
|
107
|
+
Before Step N, register every item under [reference/…-tasks.md] as a session task
|
|
108
|
+
(TaskCreate / TodoWrite). Work only from the task list. Mark complete with evidence.
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
The seed list file lives under `reference/` (or is a named section of an existing reference). Do not use `- [ ]` in that file.
|
|
112
|
+
|
|
113
|
+
## CODE_RULES bar (every code file in the skill)
|
|
114
|
+
|
|
115
|
+
Skill scripts are production code. They obey the same rules as the rest of the repo (`docs/CODE_RULES.md` / root `AGENTS.md`), including:
|
|
116
|
+
|
|
117
|
+
- **Named constants** — no bare magic numbers/strings in function bodies; skill-local values live in a `*_constants/` package the script imports.
|
|
118
|
+
- **Types** — parameters and returns annotated; no bare `Any` / untyped escape hatches.
|
|
119
|
+
- **Naming** — full words; `is_`/`has_` booleans; `all_` collections; `each_` multi-letter loops; banned prefixes (`handle_`, `process_`, `manage_`, `do_`).
|
|
120
|
+
- **Errors** — catch specific exceptions; exit with a clear code and message; do not punt raw traces to Claude as the recovery plan.
|
|
121
|
+
- **Tests** — every new production path ships a paired test in the same change (`test_*.py` beside the script, or `*.test.mjs` for workflow helpers).
|
|
122
|
+
- **Execute intent** — body says `Run scripts/…` (execute), not "see the script for the algorithm," unless the script is deliberately reference-only.
|
|
123
|
+
|
|
124
|
+
JS/TS skill helpers follow the same spirit: named constants, no silent stubs, paired tests.
|
|
125
|
+
|
|
126
|
+
## Inventory (required before Write)
|
|
127
|
+
|
|
128
|
+
Every new skill and every improve pass that touches process steps records a **deterministic elements inventory** in the gap analysis:
|
|
129
|
+
|
|
130
|
+
| Column | Content |
|
|
131
|
+
|---|---|
|
|
132
|
+
| Step | Short name |
|
|
133
|
+
| Class | `deterministic` \| `judgment` \| `borderline` |
|
|
134
|
+
| Home | Path (`scripts/…`, `workflow/…`, `templates/…`, `reference/…`, `task-seed:…`, or `SKILL.md`) |
|
|
135
|
+
| Evidence | Why this class (one line) |
|
|
136
|
+
| Paired test | Path if code; `task-tool` if work list; N/A + reason if pure judgment |
|
|
137
|
+
|
|
138
|
+
Rules:
|
|
139
|
+
|
|
140
|
+
- Every `deterministic` row has a real path under `scripts/`, `workflow/`, `templates/`, `reference/`, or a `task-seed:` pointer — not prose-only.
|
|
141
|
+
- Every code path under `scripts/` or `workflow/` has a paired test path (or a one-line pure-data reason).
|
|
142
|
+
- Every required multi-step work list has a `task-seed:` home and a body instruction to register those tasks.
|
|
143
|
+
- A `borderline` row kept in prose has a one-line why it is not worth extracting.
|
|
144
|
+
|
|
145
|
+
## Required task seeds (Gather / gates)
|
|
146
|
+
|
|
147
|
+
At the **deterministic-elements gate** (and again at self-audit), register **each** line below as its own session task, then complete it with evidence. Do not track these as markdown checkboxes.
|
|
148
|
+
|
|
149
|
+
1. Every process step is classified (deterministic / judgment / borderline).
|
|
150
|
+
2. Every deterministic step has a script, workflow, template, reference, or task-seed path — not prose-only.
|
|
151
|
+
3. No fenced executable source lives only inside `SKILL.md` when it is meant to run.
|
|
152
|
+
4. No multi-branch detection/validation logic lives only as an `rg`/`grep` one-liner in the body.
|
|
153
|
+
5. Each script states execute vs read intent from the body.
|
|
154
|
+
6. Each script uses a `*_constants/` (or equivalent) package for non-obvious literals.
|
|
155
|
+
7. Each new script path has a paired test in the same delivery.
|
|
156
|
+
8. `SKILL.md` process steps point at paths; they do not re-implement the script in markdown.
|
|
157
|
+
9. Every required multi-step work list in the skill is a task-seed catalog plus a seed instruction — not a markdown `- [ ]` board.
|
|
158
|
+
|
|
159
|
+
## Anti-patterns (fail self-audit)
|
|
160
|
+
|
|
161
|
+
- Full Python/JS program in a markdown code fence as the skill's real implementation.
|
|
162
|
+
- Giant shell one-liner with many alternations as the only form of a detector.
|
|
163
|
+
- 10+ step mechanical verification sequence written only as numbered markdown with no script.
|
|
164
|
+
- "Deterministic" claim in prose with no executable path Claude can run.
|
|
165
|
+
- Script that dumps unhandled exceptions for Claude to interpret.
|
|
166
|
+
- Magic literals and unnamed thresholds inside skill scripts.
|
|
167
|
+
- New script with no paired test.
|
|
168
|
+
- Markdown `- [ ]` checklist as the agent's progress tracker when a task tool is available.
|
|
169
|
+
- "Copy this checklist into your response and check off items" as the skill's completion protocol.
|
|
170
|
+
- Task-seed list written with checkbox syntax (`- [ ]`) so agents tick markdown instead of creating tasks.
|
|
171
|
+
|
|
172
|
+
## How the body should look
|
|
173
|
+
|
|
174
|
+
**Good (script):**
|
|
175
|
+
|
|
176
|
+
```markdown
|
|
177
|
+
## Step 3: Validate packet
|
|
178
|
+
|
|
179
|
+
Run `scripts/validate_packet.py --packet <path>`.
|
|
180
|
+
- Exit 0 → continue.
|
|
181
|
+
- Exit 2 → fix listed paths, re-run (do not invent missing sections).
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Good (required work list):**
|
|
185
|
+
|
|
186
|
+
```markdown
|
|
187
|
+
## Task seeding
|
|
188
|
+
|
|
189
|
+
Before self-audit, register every item in `reference/self-audit-tasks.md`
|
|
190
|
+
as a session task (TaskCreate). Complete each with PASS / FAIL+evidence / N/A+reason.
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**Bad:**
|
|
194
|
+
|
|
195
|
+
```markdown
|
|
196
|
+
## Step 3: Validate packet
|
|
197
|
+
|
|
198
|
+
Check that README.md, packet.json, context/source-map.md, …
|
|
199
|
+
Also run compileall, then pytest --collect-only, then scan for …
|
|
200
|
+
(and three more mechanical steps only in prose)
|
|
201
|
+
|
|
202
|
+
## Self-audit
|
|
203
|
+
|
|
204
|
+
Copy this checklist into your response and check every box:
|
|
205
|
+
- [ ] Item one
|
|
206
|
+
- [ ] Item two
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Relation to other skill-builder specs
|
|
210
|
+
|
|
211
|
+
| Spec | Concern |
|
|
212
|
+
|---|---|
|
|
213
|
+
| `progressive-disclosure.md` | Where files live and how the hub points to them |
|
|
214
|
+
| `skill-modularity.md` | One capability; compose peer skills by name |
|
|
215
|
+
| `description-field.md` | Frontmatter trigger catalog |
|
|
216
|
+
| **This file** | Which elements must be code, task-tool lists, or fixed artifacts |
|
|
217
|
+
|
|
218
|
+
Progressive disclosure alone does not satisfy this file: moving a mechanical sequence into `reference/` as prose still fails when the sequence is deterministic — it belongs in `scripts/` or on the task list.
|
|
@@ -1,109 +1,126 @@
|
|
|
1
|
-
# Self-Audit
|
|
1
|
+
# Self-Audit Task Seeds
|
|
2
2
|
|
|
3
3
|
Mandatory post-build verification. Every item must pass before a skill is delivered. Run after writing a new skill, improving an existing one, or polishing.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**How to run:** Register **each** bullet below as a session task (`TaskCreate`, `TodoWrite`, or host equivalent). Complete tasks only with evidence (PASS / FAIL+file:line / N/A+reason). Do not track progress as markdown `- [ ]` boxes in chat.
|
|
6
|
+
|
|
7
|
+
Source synthesis: [Anthropic best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices), [Lessons from Building Claude Code](thariq-x-post-skills.json), model skills (bugteam, pr-converge), host task tools.
|
|
6
8
|
|
|
7
9
|
## Core quality
|
|
8
10
|
|
|
9
|
-
-
|
|
11
|
+
- **Conciseness** — Only context Claude doesn't already have. Every line justifies its token cost.
|
|
10
12
|
> "Default assumption: Claude is already very smart."
|
|
11
|
-
-
|
|
13
|
+
- **Degree of freedom** — Matches task fragility. Low for narrow bridges, high for open fields.
|
|
12
14
|
> "Match the level of specificity to the task's fragility and variability."
|
|
13
|
-
-
|
|
15
|
+
- **Naming convention** — Name uses gerund form (verb-ing) unless it's a well-known acronym or proper name. Lowercase, numbers, hyphens only. Max 64 chars. No reserved words.
|
|
14
16
|
> "Use consistent naming patterns to make Skills easier to reference."
|
|
15
|
-
-
|
|
17
|
+
- **Description is a trigger catalog** — Capability stem (what tokens) + concrete Triggers list (when). Third person. Max 1024 chars. No XML. Spec: `description-field.md`.
|
|
16
18
|
> "The description is critical for skill selection: Claude uses it to choose the right Skill from potentially 100+ available Skills."
|
|
17
|
-
-
|
|
19
|
+
- **Description is not a story** — No narrative prose, benefits language ("helps you"), first/second person, or process/implementation dump in frontmatter.
|
|
18
20
|
> "The description field is not a summary — it's a description of when to trigger."
|
|
19
|
-
-
|
|
21
|
+
- **Description match surface** — Includes specific phrases, slash forms, and file types a user would say; distinguishable from sibling skills.
|
|
20
22
|
> "Be specific and include key terms."
|
|
21
|
-
-
|
|
23
|
+
- **SKILL.md body under 500 lines**
|
|
22
24
|
> "Keep SKILL.md body under 500 lines for optimal performance."
|
|
23
|
-
-
|
|
25
|
+
- **One level deep** — All reference files link directly from SKILL.md. No nested references.
|
|
24
26
|
> "Claude may partially read files when they're referenced from other referenced files."
|
|
25
|
-
-
|
|
27
|
+
- **TOC on files over 100 lines** — Every reference file >100 lines has a table of contents.
|
|
26
28
|
> "This ensures Claude can see the full scope of available information even when previewing with partial reads."
|
|
27
|
-
-
|
|
29
|
+
- **No time-sensitive claims** — Or isolated in "old patterns" section.
|
|
28
30
|
> "Don't include information that will become outdated."
|
|
29
|
-
-
|
|
31
|
+
- **Consistent terminology** — One term per concept throughout.
|
|
30
32
|
> "Consistency helps Claude understand and follow instructions."
|
|
31
|
-
-
|
|
33
|
+
- **Forward slashes only** — File paths use `/`, not `\`.
|
|
32
34
|
> "Unix-style paths work across all platforms."
|
|
33
|
-
-
|
|
35
|
+
- **Default provided, not options menu** — One recommended approach, escape hatch for special cases.
|
|
34
36
|
> "Don't present multiple approaches unless necessary. Provide a default with escape hatch."
|
|
35
|
-
-
|
|
37
|
+
- **Gotchas section present** — Highest-signal content. Built from real failure observations.
|
|
36
38
|
> "The highest-signal content in any skill is the Gotchas section."
|
|
37
|
-
-
|
|
39
|
+
- **Doesn't state the obvious** — Pushes Claude out of defaults, doesn't re-teach what Claude knows.
|
|
38
40
|
> "Focus on information that pushes Claude out of its normal way of thinking."
|
|
39
|
-
-
|
|
41
|
+
- **Not railroading** — Gives information and flexibility, not rigid scripts.
|
|
40
42
|
> "Give Claude the information it needs, but give it the flexibility to adapt to the situation."
|
|
41
|
-
-
|
|
43
|
+
- **When-this-applies section** — Trigger conditions clear. Refusal cases with exact response text.
|
|
42
44
|
> bugteam pattern — "Refusals — first match wins; respond with the quoted line exactly and stop."
|
|
43
|
-
-
|
|
45
|
+
- **File index present** — Every file in the package listed with its purpose.
|
|
44
46
|
> "Tell Claude what files are in your skill, and it will read them at appropriate times."
|
|
45
|
-
-
|
|
47
|
+
- **Concrete examples** — Input/output pairs or exit scenarios, not abstract descriptions.
|
|
46
48
|
> "Examples help Claude understand the desired style and level of detail more clearly than descriptions alone."
|
|
47
|
-
-
|
|
48
|
-
>
|
|
49
|
-
-
|
|
49
|
+
- **Workflows seed tasks** — Multi-step processes ship a task-seed list and instruct the agent to register each item on the host task tool (`TaskCreate` / `TodoWrite`). No markdown `- [ ]` as the progress board when a task tool is available.
|
|
50
|
+
> Spec: `deterministic-elements.md` — Task-tool tracking.
|
|
51
|
+
- **Feedback loops where quality-critical** — Run validator → fix → repeat pattern.
|
|
50
52
|
> "This pattern greatly improves output quality."
|
|
51
|
-
-
|
|
53
|
+
- **Constraints separated** — Non-negotiables in CONSTRAINTS.md or equivalent section.
|
|
52
54
|
> bugteam pattern — constraints file with design rationale.
|
|
53
|
-
-
|
|
55
|
+
- **Folder map at bottom** — Lists directories and their purposes.
|
|
54
56
|
> pr-converge pattern — "Folder map" section.
|
|
55
57
|
|
|
56
58
|
## Skill-type-specific
|
|
57
59
|
|
|
58
|
-
-
|
|
60
|
+
- **Skill type classified** — Fits one of 9 types. Folder structure matches type recommendation.
|
|
59
61
|
> "The best skills fit cleanly into one; the more confusing ones straddle several."
|
|
60
|
-
-
|
|
62
|
+
- **Domain layout appropriate** — If multiple domains, organized by domain (reference/finance.md, reference/sales.md).
|
|
61
63
|
> Pattern 2 — domain-specific organization.
|
|
62
64
|
|
|
63
|
-
##
|
|
65
|
+
## Deterministic elements
|
|
66
|
+
|
|
67
|
+
Mandatory for every skill. Spec: `deterministic-elements.md`. Progressive disclosure alone does not satisfy these items.
|
|
64
68
|
|
|
65
|
-
-
|
|
69
|
+
- **Process steps classified** — Every process step is marked deterministic, judgment, or borderline (inventory in gap analysis or equivalent).
|
|
70
|
+
> "One of the most powerful tools you can give Claude is code."
|
|
71
|
+
- **Deterministic steps are not prose-only** — Each deterministic step has a real path under `scripts/`, `workflow/`, `templates/`, `reference/`, or a task-seed list — not only markdown steps, fenced source, markdown checkboxes, or a giant shell one-liner in the body.
|
|
72
|
+
> "These can include deterministic scripts or tools for maximum robustness."
|
|
73
|
+
- **Body points at code** — SKILL.md names when to run each script, what it prints, and how to treat non-zero exit; it does not restate the algorithm.
|
|
74
|
+
> "Make clear in your instructions whether Claude should execute the script or read it as reference."
|
|
75
|
+
- **No executable-only fences** — Full programs meant to run do not live only inside `SKILL.md` code fences.
|
|
76
|
+
- **CODE_RULES on skill scripts** — Any `scripts/` or `workflow/` code uses named constants (`*_constants/` or equivalent), type annotations where the language supports them, specific error handling, and no banned identifier/prefix patterns from CODE_RULES.
|
|
77
|
+
- **Paired tests for new scripts** — Each new production script path ships a paired test in the same delivery (N/A only when the package has zero code files).
|
|
78
|
+
- **Task seeds for required work lists** — Every ordered gate/audit/process list the agent must finish is a plain task-seed catalog plus a seed instruction; no markdown checkbox board.
|
|
79
|
+
- **Scripts solve, don't punt** — Error handling explicit, no raw exceptions for Claude to figure out.
|
|
66
80
|
> "Handle error conditions rather than punting to Claude."
|
|
67
|
-
-
|
|
68
|
-
> "Configuration parameters should be justified and documented."
|
|
69
|
-
- [ ] **Execute vs read intent clear** — "Run script.py" (execute) vs "See script.py for algorithm" (read).
|
|
81
|
+
- **Execute vs read intent clear** — "Run script.py" (execute) vs "See script.py for algorithm" (read).
|
|
70
82
|
> "Make clear in your instructions whether Claude should execute the script or read it as reference."
|
|
71
|
-
-
|
|
83
|
+
- **Dependencies listed** — Required packages stated, verified as available (N/A when no scripts).
|
|
72
84
|
> "List required packages in your SKILL.md and verify they're available."
|
|
73
|
-
-
|
|
85
|
+
- **MCP tools fully qualified** — `ServerName:tool_name` format when MCP tools appear.
|
|
74
86
|
> "Always use fully qualified tool names to avoid 'tool not found' errors."
|
|
75
|
-
-
|
|
87
|
+
- **Plan-validate-execute for high-stakes ops** — Verifiable intermediate outputs before destructive actions (N/A when no high-stakes ops).
|
|
76
88
|
> "Catches errors early: validation finds problems before changes are applied."
|
|
77
89
|
|
|
78
90
|
## Setup and memory (if applicable)
|
|
79
91
|
|
|
80
|
-
-
|
|
92
|
+
- **Setup instructions clear** — config.json pattern or AskUserQuestion for initial context.
|
|
81
93
|
> "If the config is not set up, the agent can then ask the user for information."
|
|
82
|
-
-
|
|
94
|
+
- **Persistent data uses `${CLAUDE_PLUGIN_DATA}`** — Not stored in skill directory itself.
|
|
83
95
|
> "Data stored in the skill directory may be deleted when you upgrade the skill."
|
|
84
96
|
|
|
85
97
|
## Modularity and composition
|
|
86
98
|
|
|
87
99
|
Mandatory for every skill. Spec: `skill-modularity.md`. Progressive disclosure (file split) does not satisfy these items.
|
|
88
100
|
|
|
89
|
-
-
|
|
101
|
+
- **Single capability boundary** — One clear job in one sentence. Unrelated jobs are separate skills or an orchestrator that only routes to named sub-skills.
|
|
90
102
|
> "The best skills fit cleanly into one; the more confusing ones straddle several."
|
|
91
|
-
-
|
|
103
|
+
- **Compose before reimplement** — Steps an existing skill already owns are invoked by name, not pasted into this package. Local reimplementation has a one-line why in the gap analysis or gotchas.
|
|
92
104
|
> "You can just reference other skills by name, and the model will invoke them if they are installed."
|
|
93
|
-
-
|
|
105
|
+
- **Sub-skills table (when composing)** — Each invoked skill lists when to call it, what it produces, and missing-install behavior. N/A only when the skill is a pure leaf (invokes no peers).
|
|
94
106
|
> "You may want to have skills that depend on each other."
|
|
95
|
-
-
|
|
107
|
+
- **Sibling boundary clear** — Description and when-this-applies distinguish this skill from related skills in the same domain. No silent overlap.
|
|
96
108
|
> "The description field is not a summary — it's a description of when to trigger."
|
|
97
|
-
-
|
|
109
|
+
- **No monolith packing** — Multi-capability content is not stuffed under one description. Either split packages or thin orchestrator + peer sub-skills (not nested fake skills under `workflows/`).
|
|
98
110
|
> skill-modularity.md — anti-patterns: monolith, silent reimplementation, folder nesting as composition.
|
|
99
111
|
|
|
100
112
|
## Hooks (if applicable)
|
|
101
113
|
|
|
102
|
-
-
|
|
114
|
+
- **Hooks declared** — If skill registers hooks, their purpose and scope is stated.
|
|
103
115
|
> "Skills can include hooks that are only activated when the skill is called."
|
|
104
116
|
|
|
105
117
|
---
|
|
106
118
|
|
|
107
119
|
## Usage
|
|
108
120
|
|
|
109
|
-
|
|
121
|
+
1. Register every bullet in this file as a session task (batch create is fine).
|
|
122
|
+
2. Work only from the task list. Mark complete with PASS, FAIL+file:line+fix, or N/A+one-line reason.
|
|
123
|
+
3. Any FAIL must be fixed before delivery; re-open a task if the fix needs re-check.
|
|
124
|
+
4. Sub-skills table may be N/A for pure leaf skills; single capability boundary and no-monolith never are. Process-step classification and "deterministic steps are not prose-only" never are N/A — pure-judgment skills still inventory steps and mark each as judgment.
|
|
125
|
+
5. Deliver a short audit summary (counts of PASS / N/A / FAIL fixed) — not a markdown checkbox dump.
|
|
126
|
+
|