claude-dev-env 1.93.1 → 1.95.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/_shared/advisor/CLAUDE.md +2 -2
  2. package/_shared/advisor/advisor-protocol.md +35 -27
  3. package/_shared/advisor/scripts/config/advisor_scripts_constants/model_tier_run_validator_constants.py +3 -2
  4. package/_shared/advisor/scripts/model_tier_run_validator.py +23 -15
  5. package/_shared/advisor/scripts/tests/test_model_tier_run_validator.py +81 -17
  6. package/_shared/pr-loop/CLAUDE.md +1 -0
  7. package/_shared/pr-loop/audit-contract.md +1 -1
  8. package/_shared/pr-loop/gh-payloads.md +3 -3
  9. package/_shared/pr-loop/post-audit-thread-contract.md +51 -0
  10. package/_shared/pr-loop/scripts/README.md +2 -2
  11. package/_shared/pr-loop/scripts/fix_hookspath.py +47 -12
  12. package/_shared/pr-loop/scripts/tests/test_code_rules_gate.py +0 -69
  13. package/_shared/pr-loop/scripts/tests/test_fix_hookspath.py +497 -374
  14. package/_shared/pr-loop/state-schema.md +3 -22
  15. package/bin/CLAUDE.md +11 -2
  16. package/bin/ever-shipped-skills.mjs +70 -0
  17. package/bin/install.mjs +138 -13
  18. package/bin/install.prune.test.mjs +457 -0
  19. package/bin/install.test.mjs +10 -4
  20. package/docs/CODE_RULES.md +1 -1
  21. package/hooks/blocking/CLAUDE.md +2 -0
  22. package/hooks/blocking/code_rules_enforcer.py +4 -0
  23. package/hooks/blocking/code_rules_shared.py +82 -0
  24. package/hooks/blocking/code_rules_test_layout.py +9 -3
  25. package/hooks/blocking/pii_commit_command.py +398 -0
  26. package/hooks/blocking/pii_payload_scan.py +133 -0
  27. package/hooks/blocking/pii_prevention_blocker.py +151 -449
  28. package/hooks/blocking/plain_language_blocker.py +138 -4
  29. package/hooks/blocking/sensitive_file_protector.py +114 -48
  30. package/hooks/blocking/tdd_enforcer.py +9 -2
  31. package/hooks/blocking/test_code_rules_enforcer_scratchpad.py +105 -0
  32. package/hooks/blocking/test_code_rules_shared.py +181 -0
  33. package/hooks/blocking/test_pii_prevention_blocker.py +299 -0
  34. package/hooks/blocking/test_plain_language_blocker_allowlist.py +184 -0
  35. package/hooks/blocking/test_sensitive_file_protector.py +185 -0
  36. package/hooks/blocking/test_tdd_enforcer_scratchpad.py +105 -0
  37. package/hooks/blocking/test_verdict_directory_write_blocker.py +42 -7
  38. package/hooks/hooks_constants/CLAUDE.md +4 -2
  39. package/hooks/hooks_constants/code_rules_path_utils_constants.py +0 -2
  40. package/hooks/hooks_constants/harness_scratchpad_constants.py +17 -0
  41. package/hooks/hooks_constants/local_identity.py +65 -15
  42. package/hooks/hooks_constants/pii_prevention_constants.py +16 -0
  43. package/hooks/hooks_constants/plain_language_blocker_constants.py +5 -0
  44. package/hooks/hooks_constants/pr_description_enforcer_constants.py +1 -1
  45. package/hooks/hooks_constants/sensitive_file_protector_constants.py +42 -0
  46. package/hooks/hooks_constants/test_local_identity.py +68 -0
  47. package/hooks/pyproject.toml +75 -4
  48. package/hooks/validators/CLAUDE.md +1 -1
  49. package/hooks/validators/README.md +2 -0
  50. package/hooks/validators/python_style_checks.py +114 -136
  51. package/hooks/validators/python_style_helpers.py +95 -0
  52. package/hooks/validators/test_python_style_checks.py +0 -164
  53. package/hooks/validators/test_python_style_checks_decorator_gap.py +119 -0
  54. package/hooks/validators/test_python_style_fixes.py +251 -0
  55. package/hooks/validators/test_python_style_helpers.py +125 -0
  56. package/package.json +1 -1
  57. package/rules/CLAUDE.md +1 -0
  58. package/rules/anti-corollary-tests.md +69 -0
  59. package/rules/bdd.md +1 -3
  60. package/rules/code-reviews.md +1 -1
  61. package/rules/gh-paginate.md +1 -1
  62. package/rules/plain-language.md +2 -0
  63. package/scripts/CLAUDE.md +10 -1
  64. package/scripts/Get-SessionAccount.ps1 +210 -0
  65. package/scripts/tests/CLAUDE.md +15 -1
  66. package/scripts/tests/Get-SessionAccount.Tests.ps1 +350 -0
  67. package/skills/CLAUDE.md +6 -27
  68. package/skills/anthropic-plan/SKILL.md +1 -13
  69. package/skills/autoconverge/CLAUDE.md +5 -2
  70. package/skills/autoconverge/SKILL.md +112 -387
  71. package/skills/autoconverge/reference/CLAUDE.md +4 -1
  72. package/skills/autoconverge/reference/closing-report.md +9 -2
  73. package/skills/autoconverge/reference/convergence.md +26 -22
  74. package/skills/autoconverge/reference/headless-safety.md +44 -0
  75. package/skills/autoconverge/reference/multi-pr.md +88 -0
  76. package/skills/autoconverge/reference/self-closing-loop.md +84 -0
  77. package/skills/autoconverge/reference/stop-conditions.md +21 -13
  78. package/skills/autoconverge/workflow/converge.clean-audit.test.mjs +87 -27
  79. package/skills/autoconverge/workflow/converge.contract.test.mjs +40 -10
  80. package/skills/autoconverge/workflow/converge.copilot-gate.test.mjs +179 -47
  81. package/skills/autoconverge/workflow/converge.fix-progress.test.mjs +1 -1
  82. package/skills/autoconverge/workflow/converge.mjs +286 -96
  83. package/skills/bugteam/CLAUDE.md +1 -1
  84. package/skills/bugteam/CONSTRAINTS.md +3 -3
  85. package/skills/bugteam/PROMPTS.md +8 -19
  86. package/skills/bugteam/SKILL.md +13 -14
  87. package/skills/bugteam/reference/CLAUDE.md +1 -1
  88. package/skills/bugteam/reference/README.md +2 -3
  89. package/skills/bugteam/reference/audit-and-teammates.md +2 -2
  90. package/skills/bugteam/reference/copilot-gap-analysis.md +2 -0
  91. package/skills/bugteam/reference/github-pr-reviews.md +56 -38
  92. package/skills/bugteam/reference/team-setup.md +11 -11
  93. package/skills/bugteam/scripts/CLAUDE.md +6 -6
  94. package/skills/bugteam/scripts/README.md +20 -8
  95. package/skills/bugteam/scripts/bugteam_code_rules_gate.py +13 -1463
  96. package/skills/bugteam/scripts/bugteam_fix_hookspath.py +23 -358
  97. package/skills/bugteam/scripts/bugteam_preflight.py +13 -315
  98. package/skills/bugteam/scripts/bugteam_scripts_constants/CLAUDE.md +2 -3
  99. package/skills/bugteam/scripts/test_bugteam_code_rules_gate.py +34 -1053
  100. package/skills/bugteam/scripts/test_bugteam_fix_hookspath.py +30 -347
  101. package/skills/bugteam/scripts/test_bugteam_preflight.py +30 -305
  102. package/skills/closeout/SKILL.md +153 -0
  103. package/skills/closeout/reference/handoff-prompt-template.md +72 -0
  104. package/skills/closeout/reference/issue-body-templates.md +108 -0
  105. package/skills/closeout/reference/pii-redaction-checklist.md +36 -0
  106. package/skills/copilot-finding-triage/SKILL.md +80 -28
  107. package/skills/copilot-finding-triage/reference/tier-rubric.md +70 -11
  108. package/skills/copilot-finding-triage/templates/notification.md +8 -3
  109. package/skills/everything-search/SKILL.md +1 -2
  110. package/skills/grokify/SKILL.md +58 -0
  111. package/skills/grokify/templates/handoff-template.md +92 -0
  112. package/skills/orchestrator/SKILL.md +35 -25
  113. package/skills/orchestrator-refresh/SKILL.md +15 -11
  114. package/skills/pr-converge/CLAUDE.md +1 -1
  115. package/skills/pr-converge/SKILL.md +132 -233
  116. package/skills/pr-converge/reference/convergence-gates.md +102 -66
  117. package/skills/pr-converge/reference/examples.md +37 -25
  118. package/skills/pr-converge/reference/fix-protocol.md +7 -7
  119. package/skills/pr-converge/reference/multi-pr-orchestration.md +10 -4
  120. package/skills/pr-converge/reference/per-tick.md +64 -41
  121. package/skills/pr-converge/reference/state-schema.md +27 -2
  122. package/skills/pr-converge/scripts/CLAUDE.md +8 -0
  123. package/skills/pr-converge/scripts/README.md +4 -3
  124. package/skills/pr-converge/scripts/_pr_converge_path_setup.py +23 -0
  125. package/skills/pr-converge/scripts/check_convergence.py +189 -645
  126. package/skills/pr-converge/scripts/check_convergence_gates.py +235 -0
  127. package/skills/pr-converge/scripts/check_convergence_thread_gates.py +219 -0
  128. package/skills/pr-converge/scripts/conftest.py +8 -0
  129. package/skills/pr-converge/scripts/pr_converge_scripts_constants/CLAUDE.md +1 -0
  130. package/skills/pr-converge/scripts/pr_converge_scripts_constants/convergence_gate_constants.py +36 -0
  131. package/skills/pr-converge/scripts/test__pr_converge_path_setup.py +26 -0
  132. package/skills/pr-converge/scripts/test_check_convergence.py +73 -228
  133. package/skills/pr-converge/scripts/test_check_convergence_contract.py +321 -0
  134. package/skills/pr-converge/scripts/test_check_convergence_gates.py +68 -0
  135. package/skills/pr-converge/scripts/test_check_convergence_thread_gates.py +75 -0
  136. package/skills/pr-fix-protocol/SKILL.md +20 -20
  137. package/skills/privacy-hygiene/SKILL.md +4 -3
  138. package/skills/reviewer-gates/SKILL.md +26 -8
  139. package/skills/session-log/SKILL.md +11 -12
  140. package/skills/session-tidy/SKILL.md +40 -30
  141. package/skills/skill-builder/CLAUDE.md +13 -10
  142. package/skills/skill-builder/SKILL.md +31 -31
  143. package/skills/skill-builder/references/CLAUDE.md +10 -6
  144. package/skills/skill-builder/references/delegation-map.md +13 -4
  145. package/skills/skill-builder/references/description-field.md +113 -0
  146. package/skills/skill-builder/references/self-audit-checklist.md +21 -4
  147. package/skills/skill-builder/references/skill-modularity.md +113 -0
  148. package/skills/skill-builder/references/skill-types.md +4 -0
  149. package/skills/skill-builder/templates/CLAUDE.md +4 -4
  150. package/skills/skill-builder/templates/gap-analysis.md +25 -1
  151. package/skills/skill-builder/workflows/CLAUDE.md +6 -4
  152. package/skills/skill-builder/workflows/improve-skill.md +17 -16
  153. package/skills/skill-builder/workflows/new-skill.md +34 -10
  154. package/skills/skill-builder/workflows/polish-skill.md +59 -43
  155. package/skills/team-advisor/SKILL.md +15 -11
  156. package/skills/usage-pause/SKILL.md +10 -14
  157. package/system-prompts/software-engineer.xml +7 -6
  158. package/hooks/validators/test_verify_paths.py +0 -32
  159. package/hooks/validators/verify_paths.py +0 -57
  160. package/skills/bdd-protocol/CLAUDE.md +0 -26
  161. package/skills/bdd-protocol/SKILL.md +0 -30
  162. package/skills/bdd-protocol/references/CLAUDE.md +0 -10
  163. package/skills/bdd-protocol/references/anti-patterns.md +0 -26
  164. package/skills/bdd-protocol/references/example-mapping.md +0 -23
  165. package/skills/bg-agent/CLAUDE.md +0 -17
  166. package/skills/bg-agent/SKILL.md +0 -69
  167. package/skills/bugteam/scripts/bugteam_scripts_constants/bugteam_code_rules_gate_constants.py +0 -55
  168. package/skills/bugteam/scripts/bugteam_scripts_constants/bugteam_fix_hookspath_constants.py +0 -26
  169. package/skills/bugteam/scripts/bugteam_scripts_constants/bugteam_preflight_constants.py +0 -35
  170. package/skills/caveman/CLAUDE.md +0 -15
  171. package/skills/caveman/SKILL.md +0 -38
  172. package/skills/code/CLAUDE.md +0 -17
  173. package/skills/code/SKILL.md +0 -178
  174. package/skills/deep-research/CLAUDE.md +0 -17
  175. package/skills/deep-research/SKILL.md +0 -80
  176. package/skills/findbugs/CLAUDE.md +0 -20
  177. package/skills/findbugs/SKILL.md +0 -241
  178. package/skills/fixbugs/CLAUDE.md +0 -19
  179. package/skills/fixbugs/SKILL.md +0 -142
  180. package/skills/gh-paginate/CLAUDE.md +0 -18
  181. package/skills/gh-paginate/SKILL.md +0 -84
  182. package/skills/gotcha/CLAUDE.md +0 -33
  183. package/skills/gotcha/SKILL.md +0 -73
  184. package/skills/implement/CLAUDE.md +0 -27
  185. package/skills/implement/SKILL.md +0 -66
  186. package/skills/implement/scripts/CLAUDE.md +0 -22
  187. package/skills/implement/scripts/append_note.py +0 -133
  188. package/skills/implement/scripts/implement_scripts_constants/CLAUDE.md +0 -22
  189. package/skills/implement/scripts/implement_scripts_constants/__init__.py +0 -0
  190. package/skills/implement/scripts/implement_scripts_constants/notes_constants.py +0 -12
  191. package/skills/implement/scripts/test_append_note.py +0 -191
  192. package/skills/log-audit/CLAUDE.md +0 -20
  193. package/skills/log-audit/SKILL.md +0 -66
  194. package/skills/log-audit/reference/CLAUDE.md +0 -9
  195. package/skills/log-audit/reference/charter.md +0 -52
  196. package/skills/log-audit/scripts/CLAUDE.md +0 -27
  197. package/skills/log-audit/scripts/cluster_recurrences.py +0 -261
  198. package/skills/log-audit/scripts/collect_log_window.py +0 -199
  199. package/skills/log-audit/scripts/log_audit_constants/CLAUDE.md +0 -12
  200. package/skills/log-audit/scripts/log_audit_constants/__init__.py +0 -0
  201. package/skills/log-audit/scripts/log_audit_constants/cluster_recurrences_constants.py +0 -23
  202. package/skills/log-audit/scripts/log_audit_constants/collect_log_window_constants.py +0 -24
  203. package/skills/log-audit/scripts/log_audit_constants/mine_copilot_findings_constants.py +0 -49
  204. package/skills/log-audit/scripts/mine_copilot_findings.py +0 -302
  205. package/skills/log-audit/scripts/test_cluster_recurrences.py +0 -160
  206. package/skills/log-audit/scripts/test_collect_log_window.py +0 -111
  207. package/skills/log-audit/scripts/test_mine_copilot_findings.py +0 -126
  208. package/skills/logifix/CLAUDE.md +0 -36
  209. package/skills/logifix/SKILL.md +0 -69
  210. package/skills/logifix/scripts/CLAUDE.md +0 -16
  211. package/skills/logifix/scripts/logifix.ps1 +0 -205
  212. package/skills/monitor-open-prs/CLAUDE.md +0 -34
  213. package/skills/monitor-open-prs/SKILL.md +0 -88
  214. package/skills/monitor-open-prs/scripts/CLAUDE.md +0 -17
  215. package/skills/monitor-open-prs/scripts/discover_open_prs.py +0 -69
  216. package/skills/monitor-open-prs/scripts/test_discover_open_prs.py +0 -149
  217. package/skills/monitor-open-prs/test_skill_contract.py +0 -27
  218. package/skills/post-audit-findings/SKILL.md +0 -80
  219. package/skills/pr-consistency-audit/CLAUDE.md +0 -34
  220. package/skills/pr-consistency-audit/SKILL.md +0 -116
  221. package/skills/pr-consistency-audit/reference/CLAUDE.md +0 -16
  222. package/skills/pr-consistency-audit/reference/detection-rules.md +0 -96
  223. package/skills/pr-consistency-audit/reference/illustrations.md +0 -78
  224. package/skills/pr-review-responder/CLAUDE.md +0 -35
  225. package/skills/pr-review-responder/EXAMPLES.md +0 -590
  226. package/skills/pr-review-responder/PRINCIPLES.md +0 -533
  227. package/skills/pr-review-responder/README.md +0 -168
  228. package/skills/pr-review-responder/SKILL.md +0 -203
  229. package/skills/pr-review-responder/TESTING.md +0 -350
  230. package/skills/pr-scope-resolve/SKILL.md +0 -45
  231. package/skills/pre-compact/CLAUDE.md +0 -24
  232. package/skills/pre-compact/SKILL.md +0 -134
  233. package/skills/qbug/CLAUDE.md +0 -40
  234. package/skills/qbug/SKILL.md +0 -387
  235. package/skills/qbug/test_qbug_skill_audit_schema.py +0 -152
  236. package/skills/qbug/test_qbug_skill_post_fix_audit.py +0 -103
  237. package/skills/refine/CLAUDE.md +0 -44
  238. package/skills/refine/SKILL.md +0 -262
  239. package/skills/refine/templates/CLAUDE.md +0 -17
  240. package/skills/refine/templates/implementation-notes-template.html +0 -56
  241. package/skills/refine/templates/plan-template.md +0 -60
  242. package/skills/research-mode/CLAUDE.md +0 -35
  243. package/skills/research-mode/SKILL.md +0 -53
  244. package/skills/structure-prompt/CLAUDE.md +0 -42
  245. package/skills/structure-prompt/SKILL.md +0 -44
  246. package/skills/structure-prompt/reference/CLAUDE.md +0 -28
  247. package/skills/structure-prompt/reference/adversarial-tuning.md +0 -62
  248. package/skills/structure-prompt/reference/block-classification.md +0 -27
  249. package/skills/structure-prompt/reference/canonical-case.md +0 -48
  250. package/skills/structure-prompt/reference/citation-depth.md +0 -70
  251. package/skills/structure-prompt/reference/cleanup.md +0 -33
  252. package/skills/structure-prompt/reference/constraints.md +0 -33
  253. package/skills/structure-prompt/reference/directives.md +0 -37
  254. package/skills/structure-prompt/reference/examples.md +0 -72
  255. package/skills/structure-prompt/reference/instantiation.md +0 -51
  256. package/skills/structure-prompt/reference/output-contract.md +0 -72
  257. package/skills/structure-prompt/reference/per-category.md +0 -23
  258. package/skills/structure-prompt/reference/persona.md +0 -38
  259. package/skills/structure-prompt/reference/research.md +0 -33
  260. package/skills/structure-prompt/reference/structure.md +0 -28
  261. package/skills/verified-build/CLAUDE.md +0 -33
  262. package/skills/verified-build/SKILL.md +0 -33
@@ -12,8 +12,12 @@ Source synthesis: [Anthropic best practices](https://platform.claude.com/docs/en
12
12
  > "Match the level of specificity to the task's fragility and variability."
13
13
  - [ ] **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
14
  > "Use consistent naming patterns to make Skills easier to reference."
15
- - [ ] **Description field** — Third person. Includes what AND when. Specific trigger phrases. Max 1024 chars. No XML tags.
15
+ - [ ] **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
16
  > "The description is critical for skill selection: Claude uses it to choose the right Skill from potentially 100+ available Skills."
17
+ - [ ] **Description is not a story** — No narrative prose, benefits language ("helps you"), first/second person, or process/implementation dump in frontmatter.
18
+ > "The description field is not a summary — it's a description of when to trigger."
19
+ - [ ] **Description match surface** — Includes specific phrases, slash forms, and file types a user would say; distinguishable from sibling skills.
20
+ > "Be specific and include key terms."
17
21
  - [ ] **SKILL.md body under 500 lines**
18
22
  > "Keep SKILL.md body under 500 lines for optimal performance."
19
23
  - [ ] **One level deep** — All reference files link directly from SKILL.md. No nested references.
@@ -78,10 +82,23 @@ Source synthesis: [Anthropic best practices](https://platform.claude.com/docs/en
78
82
  - [ ] **Persistent data uses `${CLAUDE_PLUGIN_DATA}`** — Not stored in skill directory itself.
79
83
  > "Data stored in the skill directory may be deleted when you upgrade the skill."
80
84
 
81
- ## Composition and measurement (if applicable)
85
+ ## Modularity and composition
82
86
 
83
- - [ ] **Skill dependencies documented** Skills this one composes with are named.
87
+ Mandatory for every skill. Spec: `skill-modularity.md`. Progressive disclosure (file split) does not satisfy these items.
88
+
89
+ - [ ] **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
+ > "The best skills fit cleanly into one; the more confusing ones straddle several."
91
+ - [ ] **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.
84
92
  > "You can just reference other skills by name, and the model will invoke them if they are installed."
93
+ - [ ] **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
+ > "You may want to have skills that depend on each other."
95
+ - [ ] **Sibling boundary clear** — Description and when-this-applies distinguish this skill from related skills in the same domain. No silent overlap.
96
+ > "The description field is not a summary — it's a description of when to trigger."
97
+ - [ ] **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
+ > skill-modularity.md — anti-patterns: monolith, silent reimplementation, folder nesting as composition.
99
+
100
+ ## Hooks (if applicable)
101
+
85
102
  - [ ] **Hooks declared** — If skill registers hooks, their purpose and scope is stated.
86
103
  > "Skills can include hooks that are only activated when the skill is called."
87
104
 
@@ -89,4 +106,4 @@ Source synthesis: [Anthropic best practices](https://platform.claude.com/docs/en
89
106
 
90
107
  ## Usage
91
108
 
92
- Copy this checklist into your response after building. Check off each item. Any item that fails → fix before delivering. Any item marked "if applicable" that doesn't apply → mark N/A with a one-line reason.
109
+ Copy this checklist into your response after building. Check off each item. Any item that fails → fix before delivering. Any item marked "if applicable" that doesn't apply → mark N/A with a one-line reason. Sub-skills table may be N/A for pure leaf skills; single capability boundary and no-monolith never are.
@@ -0,0 +1,113 @@
1
+ # Skill modularity and composition
2
+
3
+ Source: [Lessons from Building Claude Code](thariq-x-post-skills.json) — Composing Skills; skill type notes on skill dependencies; Anthropic progressive disclosure (within-skill layering).
4
+
5
+ ## Two modularity layers
6
+
7
+ | Layer | What it controls | Where enforced |
8
+ |---|---|---|
9
+ | **Within skill** | SKILL.md stays a hub; detail lives in companion files | `progressive-disclosure.md`, self-audit line-cap items |
10
+ | **Across skills** | One skill = one capability; multi-step work invokes sibling skills by name | This file, self-audit modularity items, new/improve workflows |
11
+
12
+ Both layers apply. Progressive disclosure alone does not make a multi-capability skill modular.
13
+
14
+ ## Core rules
15
+
16
+ ### One capability per skill
17
+
18
+ A skill owns **one** clear job a user can name in one sentence. Signals it is too large:
19
+
20
+ - Description needs "and" for unrelated jobs
21
+ - Process has independent branches that never share gotchas or scripts
22
+ - Claude B only ever needs half the package for a typical task
23
+ - Gotchas cluster into two or more unrelated failure domains
24
+
25
+ When those hold, split or restructure as an orchestrator + sub-skills (below).
26
+
27
+ ### Compose by name (sub-skills)
28
+
29
+ > "You can just reference other skills by name, and the model will invoke them if they are installed."
30
+
31
+ There is no native dependency installer. Composition works by:
32
+
33
+ 1. Naming the sibling skill (`/skill-name` or the skill's trigger description).
34
+ 2. Stating **when** to invoke it (which process step).
35
+ 3. Stating **what** it must produce for the next step.
36
+ 4. Stating what to do if it is missing (refuse, degrade, or ask the user).
37
+
38
+ **Sub-skill** means a focused skill another skill invokes — not a nested folder inside the parent package. Sub-skills are peer skills in the skill library.
39
+
40
+ ### Prefer invoke over reimplement
41
+
42
+ When an existing skill already owns a step (PR scope resolve, self-audit handoff pattern, commit protocol, etc.), the new skill **names and invokes** that skill. It does not paste a second copy of that process into its own SKILL.md.
43
+
44
+ Exception: the existing skill is wrong for this domain, and the gap analysis records why a local procedure is required.
45
+
46
+ ### Orchestrator skills
47
+
48
+ Some capabilities are multi-step by nature (lifecycle skills, PR loops). The modular shape is:
49
+
50
+ ```
51
+ orchestrator-skill/ # thin: routing, order, refusal, handoff packets
52
+ SKILL.md # invokes named sub-skills at each step
53
+ sibling-skill-a/ # one capability
54
+ sibling-skill-b/ # one capability
55
+ ```
56
+
57
+ The orchestrator owns sequence and gates. Sub-skills own domain detail. skill-builder itself follows this shape: it orchestrates and delegates writing to `/skill-writer`.
58
+
59
+ ### Within-skill vs split
60
+
61
+ | Situation | Choice |
62
+ |---|---|
63
+ | One capability, large reference surface | Stay one skill; use progressive disclosure |
64
+ | Two capabilities that users invoke separately | Two skills |
65
+ | Multi-step workflow that always runs end-to-end | Orchestrator skill + named sub-skills for reusable steps |
66
+ | Overlap with an existing skill | Shrink the new skill; invoke the existing one; tighten both descriptions |
67
+
68
+ ## Composition plan (required before write)
69
+
70
+ Every new skill and every improve pass that changes scope records a composition plan in the gap analysis:
71
+
72
+ 1. **Capability sentence** — one job.
73
+ 2. **Related skills inventory** — existing skills that touch the same domain (scan installed skills and the package tree).
74
+ 3. **Reuse** — which steps invoke which skills.
75
+ 4. **Split** — if more than one capability, list the skills to create or keep separate.
76
+ 5. **Missing** — sub-skills that do not exist yet (build them first or as sibling packages in the same change).
77
+
78
+ ## How to document sub-skills in SKILL.md
79
+
80
+ In Process or a dedicated **Sub-skills** section:
81
+
82
+ ```markdown
83
+ ## Sub-skills
84
+
85
+ | Skill | When | Produces |
86
+ |---|---|---|
87
+ | `/reviewer-gates` | Step 1 — gate external reviewers | opt-out, Copilot quota, Bugbot trigger decisions |
88
+ | `/skill-writer` | Step 4 — author SKILL.md | skill package files |
89
+
90
+ If a listed skill is not installed, respond: `[exact refusal or degrade line]`.
91
+ ```
92
+
93
+ Self-audit requires this table (or equivalent) whenever the skill composes others.
94
+
95
+ ## Anti-patterns
96
+
97
+ - **Monolith skill** — one package that reimplements commit, review, deploy, and logging under one description.
98
+ - **Silent reimplementation** — copy-pasted steps from another skill with no name reference.
99
+ - **Folder nesting as composition** — burying a second skill's content under `workflows/` instead of a real sibling skill the model can select.
100
+ - **Vague dependency** — "use other skills as needed" with no names, when, or outputs.
101
+ - **Redundant twin** — a new skill whose description overlaps an existing one without a refusal boundary.
102
+
103
+ ## Checklist for authors
104
+
105
+ Copy into the response during new-skill Gather and improve Diagnose:
106
+
107
+ ```
108
+ - [ ] Capability fits one sentence without an unrelated "and"
109
+ - [ ] Related skills scanned; inventory written
110
+ - [ ] Reusable steps map to named skills (or justify local procedure)
111
+ - [ ] Multi-capability work is split or is an orchestrator with sub-skills
112
+ - [ ] SKILL.md will name each sub-skill with when + produces + missing behavior
113
+ ```
@@ -149,6 +149,8 @@ Skills that help fetch, push, and deploy code.
149
149
 
150
150
  > "These skills may reference other skills to collect data."
151
151
 
152
+ Compose peer skills by name (see `skill-modularity.md`). Do not paste those peers' procedures into this package.
153
+
152
154
  **Examples:** `babysit-pr`, `deploy-<service>`, `cherry-pick-prod`
153
155
 
154
156
  **Folder structure:**
@@ -226,3 +228,5 @@ skill-name/
226
228
  | "Manage infrastructure / cleanup" | 9. Infrastructure Operations |
227
229
 
228
230
  When the skill straddles multiple types, pick the dominant one for folder structure and note the secondary influence.
231
+
232
+ If it straddles **capabilities** (not just types), split into separate skills or a thin orchestrator plus sub-skills — see `skill-modularity.md`. Frontmatter `description` stays a trigger catalog for whichever package owns the job — see `description-field.md`.
@@ -1,14 +1,14 @@
1
1
  # skill-builder/templates
2
2
 
3
- Reusable template for skill-building artifacts.
3
+ Reusable templates for skill-building artifacts.
4
4
 
5
5
  ## Key files
6
6
 
7
7
  | File | Purpose |
8
8
  |---|---|
9
- | `gap-analysis.md` | Template for documenting gaps in an existing skill. Used during the "improve existing skill" workflow (Step 2 observation gathering) to structure findings before writing a new version. |
9
+ | `gap-analysis.md` | Template for gaps, composition plan, and description triggers. Used in new-skill Gather and improve diagnosis. |
10
10
 
11
11
  ## Conventions
12
12
 
13
- - The gap-analysis template is loaded by the `improve-skill.md` workflow, not the `new-skill.md` workflow.
14
- - Fill in the template inline during the workflow; do not commit completed gap analyses to this directory.
13
+ - Fill the template inline during the workflow; do not commit completed gap analyses to this directory.
14
+ - Composition plan and Description triggers sections are required before Write on a new skill.
@@ -6,12 +6,36 @@
6
6
 
7
7
  ## Task Description
8
8
 
9
- [What the user is trying to accomplish — the capability this skill should provide]
9
+ [One capability sentence — the single job this skill owns]
10
10
 
11
11
  ## Degree of Freedom
12
12
 
13
13
  [High | Medium | Low] — [Reasoning based on task fragility and variability]
14
14
 
15
+ ## Composition Plan
16
+
17
+ See `references/skill-modularity.md`.
18
+
19
+ - **Capability sentence:** [one job, no unrelated "and"]
20
+ - **Related skills inventory:** [skill → keep separate | invoke as sub-skill | absorb + reason]
21
+ - **Sub-skills to invoke:** [name → when → produces → missing behavior]
22
+ - **Split or orchestrator:** [one leaf skill | several skills | thin orchestrator + peers]
23
+ - **Missing sub-skills to create:** [names to build first or as siblings]
24
+
25
+ ## Description Triggers
26
+
27
+ See `references/description-field.md`. Not story prose.
28
+
29
+ - **Capability stem tokens:** [5–20 words]
30
+ - **Trigger phrases:** [comma-separated phrases, slash forms, file types]
31
+ - **Near-miss exclusions:** [tokens that must not select this skill]
32
+ - **Draft description string:**
33
+
34
+ ```yaml
35
+ description: >-
36
+ <stem>. Triggers: <phrases>.
37
+ ```
38
+
15
39
  ## Gaps Identified
16
40
 
17
41
  ### Gap 1: [Descriptive Name]
@@ -6,12 +6,14 @@ Step-by-step workflow files for each skill lifecycle phase, loaded on demand by
6
6
 
7
7
  | File | Purpose |
8
8
  |---|---|
9
- | `new-skill.md` | Full lifecycle for creating a new skill: 6 steps from intent capture through type classification, folder scaffolding, writing via skill-writer, self-audit, and delivery. |
10
- | `improve-skill.md` | Observation-first flow for improving an existing skill: 6 steps starting from real usage failures, gap analysis, targeted rewrite, and re-audit. |
11
- | `polish-skill.md` | Description audit and final validation: 5 steps for description optimization, trigger phrase review, and checklist sign-off. |
9
+ | `new-skill.md` | Full lifecycle: classify, scaffold, gather (composition + description triggers), write via skill-writer, self-audit, deliver. |
10
+ | `improve-skill.md` | Observation-first improve: diagnose activation/modularity/quality, targeted fix, re-audit. |
11
+ | `polish-skill.md` | Description trigger-catalog audit, progressive disclosure + modularity audit, checklist sign-off. |
12
12
 
13
13
  ## Conventions
14
14
 
15
15
  - `SKILL.md` routes to exactly one workflow file per invocation based on the user's intent (new / improve / polish).
16
- - Each workflow references `../references/self-audit-checklist.md` at its final step.
16
+ - Each workflow references `../references/self-audit-checklist.md` at its final verification step.
17
+ - New and improve load `skill-modularity.md` and `description-field.md` when gathering or diagnosing.
18
+ - Polish Step 1 is the dedicated description rewrite pass.
17
19
  - Load only the workflow that matches the active task; the other two stay out of context.
@@ -28,15 +28,7 @@ Spawn a subagent with the existing skill on a real task (see delegation-map.md f
28
28
 
29
29
  ### Transcript analysis
30
30
 
31
- > "Watch for unexpected exploration paths, missed connections, overreliance on certain sections, and ignored content."
32
-
33
- Document:
34
- - Where did the skill work well?
35
- - Where did it fail or produce subpar results?
36
- - Did Claude B follow the skill’s instructions as written?
37
- - Did Claude B ignore any sections or files?
38
- - Did Claude B explore in unexpected directions?
39
- - What would a gotcha have prevented?
31
+ Follow **Reading a transcript for observations** in `${CLAUDE_SKILL_DIR}/references/delegation-map.md`. Note what worked, what failed, and which gotcha would have prevented each failure.
40
32
 
41
33
  **Output:** Observation notes with specific failure examples.
42
34
 
@@ -50,8 +42,11 @@ Failure classification:
50
42
 
51
43
  | Symptom | Diagnosis | Apply |
52
44
  |---|---|---|
53
- | Skill never activates when it should | Description missing trigger phrases or too vague | Principles: Description field |
54
- | Skill activates when it shouldn’t | Description too broad, no refusal cases | Principles: Constraints and refusal cases |
45
+ | Skill never activates when it should | Description missing trigger phrases, story prose, or too vague | `description-field.md` trigger catalog |
46
+ | Skill activates when it shouldn’t | Description too broad / story; no refusal boundary | Description triggers + Constraints / when-this-applies |
47
+ | Description is multi-sentence narrative | Description used as summary/story | Rewrite per `description-field.md` |
48
+ | Skill owns unrelated jobs | Monolith / multi-capability | `skill-modularity.md` — split or orchestrator + sub-skills |
49
+ | Skill reimplements another skill’s steps | Silent reimplementation | Compose by name; sub-skills table |
55
50
  | Claude reads wrong files first | Structure not intuitive, hub doesn’t guide well | Progressive disclosure |
56
51
  | Claude ignores a companion file | File not signaled in SKILL.md or poorly linked | File index, hub pattern |
57
52
  | Claude over-explains basics | Skill states what Claude already knows | Principles: Concision |
@@ -60,6 +55,8 @@ Failure classification:
60
55
  | Claude errors on script execution | Script doesn’t handle errors, missing deps | Principles: Scripts |
61
56
  | Output format is wrong | Missing template or examples | Principles: Templates and examples |
62
57
 
58
+ When scope or activation is in play, re-read `${CLAUDE_SKILL_DIR}/references/skill-modularity.md` and `${CLAUDE_SKILL_DIR}/references/description-field.md`.
59
+
63
60
  **Output:** Diagnosis per failure — which best practice was violated.
64
61
 
65
62
  ---
@@ -72,9 +69,11 @@ Failure classification:
72
69
 
73
70
  For each diagnosis from Step 2:
74
71
 
75
- 1. Read the relevant section in `${CLAUDE_SKILL_DIR}/references/progressive-disclosure.md` or the SKILL.md principles.
72
+ 1. Read the matching reference (`description-field.md`, `skill-modularity.md`, `progressive-disclosure.md`, or SKILL.md principles).
76
73
  2. Make the minimum change that addresses the failure.
77
- 3. Verify the fix doesn’t break anything that was working.
74
+ 3. For description failures: rewrite frontmatter into a trigger catalog (capability stem + Triggers list); strip story prose.
75
+ 4. For modularity failures: add sub-skills table, split packages, or thin the orchestrator; do not paste peer skill procedures.
76
+ 5. Verify the fix doesn’t break anything that was working.
78
77
 
79
78
  Delegate larger rewrites to `/skill-writer` using the refine-skill handoff from delegation-map.md.
80
79
 
@@ -121,6 +120,8 @@ Present to the user:
121
120
  1. **What was observed** — summary of failures from Step 1.
122
121
  2. **What was diagnosed** — which best practices were violated.
123
122
  3. **What changed** — delta summary (files modified, lines added/removed).
124
- 4. **New gotchas added** — list of gotchas captured.
125
- 5. **Audit summary** — post-fix audit results.
126
- 6. **Suggested re-test** — a concrete task to verify the fix with Claude B.
123
+ 4. **Description** — final frontmatter if rewritten (paste the trigger catalog).
124
+ 5. **Composition** — sub-skills or splits if modularity changed.
125
+ 6. **New gotchas added** — list of gotchas captured.
126
+ 7. **Audit summary** — post-fix audit results.
127
+ 8. **Suggested re-test** — a concrete task to verify the fix with Claude B.
@@ -52,10 +52,12 @@ Best-practice-driven lifecycle for building a skill from scratch.
52
52
 
53
53
  ## Step 3: Gather
54
54
 
55
- **Goal:** Collect domain knowledge, failure patterns, and gotchas from the user.
55
+ **Goal:** Collect domain knowledge, failure patterns, gotchas, and a composition plan.
56
56
 
57
57
  > "Build a Gotchas Section — these sections should be built up from common failure points that Claude runs into when using your skill."
58
58
 
59
+ Read `${CLAUDE_SKILL_DIR}/references/skill-modularity.md` and `${CLAUDE_SKILL_DIR}/references/description-field.md` before the interview. Modularity and description triggers are gates: do not proceed to Write until the composition plan and trigger catalog drafts are filled.
60
+
59
61
  ### Interview questions
60
62
 
61
63
  Ask the user:
@@ -68,16 +70,26 @@ Ask the user:
68
70
  6. "Are there rules or constraints Claude must never violate?"
69
71
  7. "What tools, scripts, or libraries does Claude need to use?"
70
72
  8. "Does this skill need to run differently for different models (Haiku vs Opus)?"
73
+ 9. "In one sentence, what is the single capability this skill owns?"
74
+ 10. "Which existing skills already cover a step of this work? Which steps should this skill invoke by name?"
75
+ 11. "Is this one skill, several skills, or a thin orchestrator that calls sub-skills?"
76
+ 12. "What exact phrases, slash commands, or file types should select this skill?"
77
+
78
+ ### Related-skills inventory
79
+
80
+ Scan installed skills and the package skill tree for names that touch the same domain. List each with: keep separate / invoke as sub-skill / absorb (with reason if absorb).
71
81
 
72
82
  ### Generate gap analysis
73
83
 
74
84
  Use the template at `${CLAUDE_SKILL_DIR}/templates/gap-analysis.md`. Fill in:
75
85
 
76
86
  - Skill type and degree of freedom
77
- - Task description
87
+ - Task description (one capability sentence)
78
88
  - Gaps identified (what failed, what was needed)
79
89
  - Recurring patterns across gaps
80
90
  - Initial gotcha candidates
91
+ - **Composition plan** — capability sentence, related skills, sub-skills to invoke, split or orchestrator decision, missing sub-skills to create
92
+ - **Description triggers** — capability stem tokens + trigger phrase list (not story prose)
81
93
 
82
94
  ### Assess degree of freedom
83
95
 
@@ -91,7 +103,15 @@ Use the template at `${CLAUDE_SKILL_DIR}/templates/gap-analysis.md`. Fill in:
91
103
 
92
104
  Record the assessment with reasoning.
93
105
 
94
- **Output:** Completed gap analysis, initial gotchas list, degree-of-freedom assessment.
106
+ ### Modularity gate
107
+
108
+ Copy the author checklist from `skill-modularity.md` and check every box. If the capability sentence needs an unrelated "and", stop and split scope with the user before Step 4.
109
+
110
+ ### Description gate
111
+
112
+ Draft the frontmatter description using the template in `description-field.md`. Copy the description checklist and check every box. Story prose fails the gate.
113
+
114
+ **Output:** Completed gap analysis (composition plan + description triggers), initial gotchas, degree-of-freedom assessment, modularity checklist, draft description.
95
115
 
96
116
  ---
97
117
 
@@ -101,7 +121,7 @@ Record the assessment with reasoning.
101
121
 
102
122
  Delegate to `/skill-writer` using the structured handoff from `${CLAUDE_SKILL_DIR}/references/delegation-map.md`.
103
123
 
104
- The handoff must include: skill type, folder structure, gap analysis, initial gotchas, degree of freedom, constraints.
124
+ The handoff must include: skill type, folder structure, gap analysis (composition plan + description triggers), initial gotchas, degree of freedom, constraints, sub-skills to name in SKILL.md, exact description string to put in frontmatter.
105
125
 
106
126
  After skill-writer produces the draft:
107
127
 
@@ -109,8 +129,10 @@ After skill-writer produces the draft:
109
129
  2. Verify SKILL.md body is under 500 lines.
110
130
  3. Verify all references are one level deep.
111
131
  4. Verify files over 100 lines have a TOC.
132
+ 5. Verify modularity: single capability, sub-skills table when composing, no silent reimplementation of inventoried skills.
133
+ 6. Verify description is a trigger catalog per `description-field.md` (not story prose).
112
134
 
113
- Fix structural issues before proceeding.
135
+ Fix structural, modularity, and description issues before proceeding.
114
136
 
115
137
  **Output:** Complete skill package at the target directory.
116
138
 
@@ -134,14 +156,16 @@ For an independent check, spawn a subagent to run the audit (see delegation-map.
134
156
 
135
157
  ## Step 6: Deliver
136
158
 
137
- **Goal:** Hand off the finished skill with full documentation.
159
+ **Goal:** Hand off the finished skill with full documentation. Prompt user if they want a PR up with the skill.
138
160
 
139
161
  Present to the user:
140
162
 
141
163
  1. **File map** — every file created, with its purpose.
142
164
  2. **Skill type** — classification and why it fits.
143
165
  3. **Degree of freedom** — assessment and reasoning.
144
- 4. **Gotchas seeded** — initial gotchas captured.
145
- 5. **Audit summary** — "All 38 items: N passed, M N/A."
146
- 6. **Maintenance notes** — what to watch for in future usage that might warrant iteration.
147
- 7. **Suggested first test** — a concrete task to try with Claude B.
166
+ 4. **Composition plan** — capability sentence, sub-skills invoked, any skills split out.
167
+ 5. **Description** — final frontmatter trigger catalog (paste the string).
168
+ 6. **Gotchas seeded** — initial gotchas captured.
169
+ 7. **Audit summary** — "All checklist items: N passed, M N/A."
170
+ 8. **Maintenance notes** — what to watch for in future usage that might warrant iteration.
171
+ 9. **Suggested first test** — a concrete task to try with Claude B.
@@ -10,70 +10,83 @@ Final optimization pass for a skill that is functionally complete.
10
10
 
11
11
  ---
12
12
 
13
- ## Step 1: Description Audit
13
+ ## Step 1: Description trigger-catalog audit
14
14
 
15
- **Goal:** Verify the description field is optimized for model discovery.
15
+ **Goal:** Rewrite the frontmatter `description` into a dense trigger catalog. Selection metadata only — not a story.
16
+
17
+ Read `${CLAUDE_SKILL_DIR}/references/description-field.md` and apply its checklist in full.
16
18
 
17
19
  > "The description is critical for skill selection: Claude uses it to choose the right Skill from potentially 100+ available Skills."
18
20
 
19
21
  > "The description field is not a summary — it's a description of when to trigger."
20
22
 
21
- Check each requirement:
23
+ ### Fail conditions (must rewrite)
24
+
25
+ - Multi-sentence narrative or benefits language ("helps you", "ensures reliable…")
26
+ - First or second person
27
+ - Process/implementation detail that belongs in the body
28
+ - Missing concrete trigger phrases
29
+ - Overlap with a sibling skill with no distinguishing tokens
30
+
31
+ ### Required shape
32
+
33
+ ```yaml
34
+ description: >-
35
+ <capability tokens>. Triggers: <phrase>, <phrase>, <slash>, <filetype>.
36
+ ```
22
37
 
23
- - [ ] **Third person.** "Processes Excel files" not "I can help you process Excel files."
24
- - [ ] **Includes what AND when.** Both the capability and trigger contexts.
25
- - [ ] **Specific trigger phrases.** Different phrasings of the same intent should all match.
26
- - [ ] **Under 1024 characters.** Hard limit.
27
- - [ ] **No XML tags.**
28
- - [ ] **Distinguishable from similar skills.** If two skills overlap, the descriptions must make the boundary clear.
38
+ ### Checklist
39
+
40
+ - [ ] **Third person** no I/you
41
+ - [ ] **Capability stem** what tokens, ≤20 words, no story
42
+ - [ ] **Triggers list** — concrete phrases / slash forms / file types
43
+ - [ ] **Under 1024 characters** (prefer much shorter; always-on context)
44
+ - [ ] **No XML tags**
45
+ - [ ] **Not a story** — no narrative, benefits, or process dump
46
+ - [ ] **Sibling boundary** — distinguishable from related skills
29
47
 
30
48
  ### Trigger phrase review
31
49
 
32
50
  Generate 10 variations of the user's intent:
51
+
33
52
  - Formal and casual phrasings
34
- - Cases where the user doesn't explicitly name the skill but clearly needs it
53
+ - Cases where the user doesn't name the skill but clearly needs it
35
54
  - Cases where this skill competes with another but should win
36
55
 
37
- For each, answer: would the current description cause Claude to select this skill?
56
+ For each: would the current description select this skill?
57
+ If you aren't sure of user's intent, present options to the user via askuserquestion for trigger phases.
38
58
 
39
- Also check 5 near-miss phrasings — adjacent domains where this skill should NOT trigger. Verify the description doesn't cause false activation.
59
+ Also check 5 near-miss phrasings — adjacent domains that must not activate. Adjust Triggers tokens only as needed for boundary.
40
60
 
41
- ### Fix issues
61
+ ### Fix
42
62
 
43
- If the description fails any check, revise it. Show before/after with the specific change and why it improves discovery.
63
+ If any check fails, rewrite. Show before/after. The after form must match `description-field.md` good examples.
44
64
 
45
- **Output:** Verified description (and revised version if changes were made).
65
+ **Output:** Final description string (trigger catalog).
46
66
 
47
67
  ---
48
68
 
49
- ## Step 2: Progressive Disclosure Audit
50
-
51
- **Goal:** Verify the file structure follows all progressive disclosure rules.
52
-
53
- > "Keep SKILL.md body under 500 lines."
69
+ ## Step 2: Progressive disclosure and modularity audit
54
70
 
55
- Check:
71
+ **Goal:** Verify within-skill structure and cross-skill modularity.
56
72
 
57
- - [ ] SKILL.md body under 500 lines.
58
- - [ ] All reference files link directly from SKILL.md (one level deep).
59
- - [ ] Every file over 100 lines has a table of contents.
60
- - [ ] File index in SKILL.md lists every companion file with its purpose.
61
- - [ ] Forward slashes only in all paths.
62
- - [ ] File names are descriptive (`form_validation_rules.md`, not `doc2.md`).
63
- - [ ] Scripts clearly marked as execute vs read-as-reference.
73
+ 1. Apply hard rules in `${CLAUDE_SKILL_DIR}/references/progressive-disclosure.md`.
74
+ 2. Apply modularity rules in `${CLAUDE_SKILL_DIR}/references/skill-modularity.md`.
75
+ 3. Cross-check matching items on `${CLAUDE_SKILL_DIR}/references/self-audit-checklist.md`.
64
76
 
65
- ### Fix structural issues
77
+ ### Common fixes
66
78
 
67
- If any check fails, restructure. Common fixes:
68
- - SKILL.md too long move sections to companion files, leave links.
69
- - Nested referencessurface all links to SKILL.md.
70
- - Missing TOCadd to files over 100 lines.
79
+ - SKILL.md too long → move sections to companion files, leave links
80
+ - Nested referencessurface all links on SKILL.md
81
+ - Missing TOCadd to files over 100 lines
82
+ - Multi-capability packagesplit or orchestrator + named sub-skills
83
+ - Silent reimplementation → invoke peer skill by name; add Sub-skills table
71
84
 
72
- **Output:** Verified file structure (and restructured files if changes were made).
85
+ **Output:** Verified structure and composition (and edits if needed).
73
86
 
74
87
  ---
75
88
 
76
- ## Step 3: Gotcha Freshness
89
+ ## Step 3: Gotcha freshness
77
90
 
78
91
  **Goal:** Ensure gotchas reflect current observations.
79
92
 
@@ -83,20 +96,22 @@ If any check fails, restructure. Common fixes:
83
96
  - Check against recent usage: are there new failure modes not yet captured?
84
97
  - Remove gotchas for issues that no longer occur (the skill fixed them).
85
98
  - Verify each gotcha is actionable — a reader should know what to avoid and why.
99
+ - Verify they are relevant by going over them 1 by 1 with the user via AskUserQuestion.
86
100
 
87
101
  **Output:** Updated gotchas section (and any new gotchas for skill-builder itself).
88
102
 
89
103
  ---
90
104
 
91
- ## Step 4: Full Self-Audit
105
+ ## Step 4: Full self-audit
92
106
 
93
- **Goal:** Complete 38-point checklist pass.
107
+ **Goal:** Complete checklist pass including description and modularity items.
94
108
 
95
109
  Same as new-skill Step 5 and improve-skill Step 5:
96
110
 
97
111
  1. Read `${CLAUDE_SKILL_DIR}/references/self-audit-checklist.md`.
98
112
  2. Check every item. Fix failures. Re-check.
99
113
  3. All items must be PASS or N/A.
114
+ 4. Description items and modularity items are never N/A for a delivered skill (sub-skills table alone may be N/A for pure leaf skills).
100
115
 
101
116
  **Output:** Completed checklist.
102
117
 
@@ -108,9 +123,10 @@ Same as new-skill Step 5 and improve-skill Step 5:
108
123
 
109
124
  Present to the user:
110
125
 
111
- 1. **Description** — final version, confirmed trigger phrases.
112
- 2. **File structure** — folder map with line counts.
113
- 3. **Gotchas** — current gotcha count and most recent additions.
114
- 4. **Audit summary** — "All 38 items: N passed, M N/A."
115
- 5. **Before/after** — description changes if any, structural changes if any.
116
- 6. **Maintenance notes** — what to watch for, when to re-audit.
126
+ 1. **Description** — final trigger-catalog string (paste it).
127
+ 2. **Composition** — sub-skills or leaf status.
128
+ 3. **File structure** — folder map with line counts.
129
+ 4. **Gotchas** — current gotcha count and most recent additions.
130
+ 5. **Audit summary** — "All checklist items: N passed, M N/A."
131
+ 6. **Before/after** — description rewrite and structural changes if any.
132
+ 7. **Maintenance notes** — what to watch for, when to re-audit.
@@ -29,21 +29,25 @@ the CLI fallback — using `team-advisor-agent` as the name and this session as
29
29
  the only consumer (skip the "who you are and your assignment" opener in each
30
30
  consult; a single-consumer session doesn't need it).
31
31
 
32
- **Grok host:** use the self-as-advisor path in the shared protocol: this
33
- session answers ENDORSE / CORRECTION / PLAN / STOP itself. Do not spawn a
34
- Claude `session-advisor` subagent and do not walk the Claude multi-tier
35
- ladder.
32
+ **Grok host:** bind a max-tier Claude advisor through the shared CLI Claude-chain
33
+ in the protocol (Fable high, then Opus max; `claude_chain_runner.py` walks
34
+ `~/.claude/claude-chain.json` for account usage failover). Consult via
35
+ `--resume <session_id>` on that bind. This session is the sole consumer of that
36
+ CLI advisor; skip the multi-consumer opener. When the chain cannot bind or
37
+ reply, fail closed and report to the user — do **not** answer ENDORSE /
38
+ CORRECTION / PLAN / STOP as this Grok session.
36
39
 
37
40
  ## Constraints
38
41
 
39
- - One `team-advisor-agent` per session, owned by this session for its whole
40
- lifecycle (spawn, drift-respawn, shutdown) see
42
+ - One advisor bind per session (`team-advisor-agent` on Claude; one CLI
43
+ `session_id` on Grok), owned by this session for its whole lifecycle
44
+ (spawn or CLI bind, drift re-bind, shutdown) — see
41
45
  [`_shared/advisor/advisor-protocol.md`](../../_shared/advisor/advisor-protocol.md).
42
- - Never spawn the warm agent, or its CLI fallback, at a tier below this
43
- session's own tier.
44
- - The warm agent (or its CLI equivalent) only answers. It never edits a
45
- file, never runs a build or test, and never posts anything on the
46
- session's behalf.
46
+ - Never bind the advisor, or its CLI path, at a tier below the protocol floor
47
+ for this host (Claude: this session's own tier; Grok: Opus floor with Fable
48
+ first).
49
+ - The advisor only answers. It never edits a file, never runs a build or
50
+ test, and never posts anything on the session's behalf.
47
51
 
48
52
  ## File Index
49
53