claude-dev-env 1.38.0 → 1.39.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 (271) hide show
  1. package/CLAUDE.md +10 -36
  2. package/_shared/pr-loop/audit-reply-template.md +147 -0
  3. package/_shared/pr-loop/fix-protocol.md +25 -4
  4. package/_shared/pr-loop/gh-payloads.md +37 -50
  5. package/_shared/pr-loop/scripts/code_rules_gate.py +0 -60
  6. package/_shared/pr-loop/scripts/config/post_audit_thread_constants.py +189 -0
  7. package/_shared/pr-loop/scripts/post_audit_thread.py +947 -0
  8. package/_shared/pr-loop/scripts/tests/test_code_rules_gate.py +0 -19
  9. package/_shared/pr-loop/scripts/tests/test_post_audit_thread.py +923 -0
  10. package/_shared/pr-loop/scripts/tests/test_post_audit_thread_constants.py +127 -0
  11. package/_shared/pr-loop/state-schema.md +1 -1
  12. package/agents/clean-coder.md +2 -2
  13. package/bin/install.mjs +6 -7
  14. package/bin/install.test.mjs +8 -0
  15. package/commands/doc-gist.md +16 -0
  16. package/commands/plan.md +0 -2
  17. package/commands/review-plan.md +1 -1
  18. package/docs/CODE_RULES.md +122 -2
  19. package/hooks/blocking/bot_mention_comment_blocker.py +75 -0
  20. package/hooks/blocking/code_rules_enforcer.py +1236 -161
  21. package/hooks/blocking/convergence_gate_blocker.py +130 -0
  22. package/hooks/blocking/destructive_command_blocker.py +74 -0
  23. package/hooks/blocking/gh_body_arg_blocker.py +30 -0
  24. package/hooks/blocking/md_to_html_blocker.py +119 -0
  25. package/hooks/blocking/test_bot_mention_comment_blocker.py +131 -0
  26. package/hooks/blocking/test_code_rules_enforcer.py +21 -0
  27. package/hooks/blocking/test_code_rules_enforcer_any_exempt_files.py +70 -0
  28. package/hooks/blocking/test_code_rules_enforcer_any_imports_and_cast.py +92 -0
  29. package/hooks/blocking/test_code_rules_enforcer_banned_import_alias.py +143 -0
  30. package/hooks/blocking/test_code_rules_enforcer_banned_prefixes.py +152 -0
  31. package/hooks/blocking/test_code_rules_enforcer_bare_except.py +120 -0
  32. package/hooks/blocking/test_code_rules_enforcer_boundary_types.py +175 -0
  33. package/hooks/blocking/test_code_rules_enforcer_cap_meta.py +0 -1
  34. package/hooks/blocking/test_code_rules_enforcer_collection_prefix.py +50 -0
  35. package/hooks/blocking/test_code_rules_enforcer_docstring_format.py +255 -0
  36. package/hooks/blocking/test_code_rules_enforcer_inline_tuple_string_magic.py +130 -0
  37. package/hooks/blocking/test_code_rules_enforcer_stub_implementations.py +141 -0
  38. package/hooks/blocking/test_code_rules_enforcer_test_branching.py +143 -0
  39. package/hooks/blocking/test_code_rules_enforcer_thin_wrapper_files.py +169 -0
  40. package/hooks/blocking/test_code_rules_enforcer_todo_markers.py +99 -0
  41. package/hooks/blocking/test_code_rules_enforcer_typed_dict_pairs.py +141 -0
  42. package/hooks/blocking/test_code_rules_enforcer_unused_imports.py +158 -0
  43. package/hooks/blocking/test_convergence_gate_blocker.py +63 -0
  44. package/hooks/blocking/test_destructive_command_blocker.py +146 -0
  45. package/hooks/blocking/test_destructive_command_blocker_no_verify.py +102 -0
  46. package/hooks/blocking/test_gh_body_arg_blocker.py +45 -0
  47. package/hooks/blocking/test_md_to_html_blocker.py +317 -0
  48. package/hooks/config/any_type_config.py +7 -0
  49. package/hooks/config/banned_identifiers_constants.py +11 -0
  50. package/hooks/config/blocking_check_limits.py +38 -0
  51. package/hooks/config/bot_mention_comment_blocker_constants.py +20 -0
  52. package/hooks/config/code_rules_enforcer_constants.py +53 -0
  53. package/hooks/config/convergence_branch_constants.py +9 -0
  54. package/hooks/config/doc_gist_auto_publish_constants.py +18 -0
  55. package/hooks/config/html_companion_constants.py +20 -0
  56. package/hooks/config/inline_tuple_string_magic_constants.py +22 -0
  57. package/hooks/config/test_banned_identifiers_constants.py +17 -0
  58. package/hooks/hooks.json +28 -20
  59. package/hooks/pyproject.toml +69 -0
  60. package/hooks/validators/mypy_integration.py +47 -1
  61. package/hooks/validators/run_all_validators.py +3 -3
  62. package/hooks/validators/test_mypy_integration.py +50 -1
  63. package/hooks/workflow/doc_gist_auto_publish.py +144 -0
  64. package/hooks/workflow/md_to_html_companion.py +365 -0
  65. package/hooks/workflow/test_doc_gist_auto_publish.py +117 -0
  66. package/hooks/workflow/test_md_to_html_companion.py +452 -0
  67. package/package.json +1 -1
  68. package/rules/gh-body-file.md +2 -0
  69. package/scripts/Install-SweepEmptyDirs.ps1 +111 -0
  70. package/scripts/check.ps1 +106 -0
  71. package/scripts/config/timing.py +11 -0
  72. package/scripts/sweep_empty_dirs.py +138 -0
  73. package/scripts/sync_to_cursor/rules.py +1 -1
  74. package/scripts/test_sweep_empty_dirs.py +183 -0
  75. package/skills/_shared/pr-loop/prompts/pr-consistency-audit.xml +323 -0
  76. package/skills/_shared/pr-loop/scripts/_cli_utils.py +22 -0
  77. package/skills/_shared/pr-loop/scripts/_path_resolver.py +165 -0
  78. package/skills/_shared/pr-loop/scripts/_xml_utils.py +20 -0
  79. package/skills/_shared/pr-loop/scripts/build_audit_prompt.py +182 -0
  80. package/skills/_shared/pr-loop/scripts/build_fix_prompt.py +185 -0
  81. package/skills/_shared/pr-loop/scripts/config/__init__.py +0 -0
  82. package/skills/_shared/pr-loop/scripts/config/path_resolver_constants.py +78 -0
  83. package/skills/_shared/pr-loop/scripts/init_loop_state.py +135 -0
  84. package/skills/_shared/pr-loop/scripts/teardown_worktrees.py +175 -0
  85. package/skills/_shared/pr-loop/scripts/write_audit_outcomes.py +182 -0
  86. package/skills/_shared/pr-loop/scripts/write_fix_outcomes.py +206 -0
  87. package/skills/bugteam/CONSTRAINTS.md +21 -22
  88. package/skills/bugteam/EXAMPLES.md +3 -3
  89. package/skills/bugteam/PROMPTS.md +227 -67
  90. package/skills/bugteam/SKILL.md +114 -455
  91. package/skills/bugteam/reference/README.md +1 -1
  92. package/skills/bugteam/reference/audit-and-teammates.md +112 -39
  93. package/skills/bugteam/reference/audit-contract.md +4 -22
  94. package/skills/bugteam/reference/copilot-gap-analysis.md +8 -5
  95. package/skills/bugteam/reference/design-rationale.md +2 -2
  96. package/skills/bugteam/reference/github-pr-reviews.md +50 -57
  97. package/skills/bugteam/reference/obstacles/audit-assign-ids.md +13 -0
  98. package/skills/bugteam/reference/obstacles/audit-capture-excerpts.md +13 -0
  99. package/skills/bugteam/reference/obstacles/audit-walk-categories.md +13 -0
  100. package/skills/bugteam/reference/obstacles/audit-write-xml.md +13 -0
  101. package/skills/bugteam/reference/obstacles/fix-append-summary.md +13 -0
  102. package/skills/bugteam/reference/obstacles/fix-apply-fixes.md +13 -0
  103. package/skills/bugteam/reference/obstacles/fix-git-add-commit.md +13 -0
  104. package/skills/bugteam/reference/obstacles/fix-git-push.md +13 -0
  105. package/skills/bugteam/reference/obstacles/fix-post-reply.md +13 -0
  106. package/skills/bugteam/reference/obstacles/fix-publish-summary.md +13 -0
  107. package/skills/bugteam/reference/obstacles/fix-py-compile.md +13 -0
  108. package/skills/bugteam/reference/obstacles/fix-read-files.md +13 -0
  109. package/skills/bugteam/reference/obstacles/fix-resolve-thread.md +13 -0
  110. package/skills/bugteam/reference/obstacles/fix-test-suite.md +13 -0
  111. package/skills/bugteam/reference/obstacles/fix-violation-count.md +13 -0
  112. package/skills/bugteam/reference/obstacles/fix-write-xml.md +13 -0
  113. package/skills/bugteam/reference/team-setup.md +106 -9
  114. package/skills/bugteam/reference/teardown-publish-permissions.md +39 -8
  115. package/skills/bugteam/scripts/README.md +60 -0
  116. package/skills/bugteam/scripts/_claude_permissions_common.py +358 -0
  117. package/skills/bugteam/scripts/bugteam_code_rules_gate.py +976 -0
  118. package/skills/bugteam/scripts/bugteam_fix_hookspath.py +375 -0
  119. package/skills/bugteam/scripts/bugteam_preflight.py +294 -0
  120. package/skills/bugteam/scripts/config/bugteam_code_rules_gate_constants.py +25 -0
  121. package/skills/bugteam/scripts/config/bugteam_fix_hookspath_constants.py +26 -0
  122. package/skills/bugteam/scripts/config/bugteam_preflight_constants.py +35 -0
  123. package/skills/bugteam/scripts/config/claude_permissions_common_constants.py +20 -0
  124. package/skills/bugteam/scripts/config/probe_code_rules_enforcer_check_constants.py +12 -0
  125. package/skills/bugteam/scripts/config/windows_safe_rmtree_constants.py +7 -0
  126. package/skills/bugteam/scripts/grant_project_claude_permissions.py +175 -0
  127. package/skills/bugteam/scripts/probe_code_rules_enforcer_check.py +107 -0
  128. package/skills/bugteam/scripts/revoke_project_claude_permissions.py +220 -0
  129. package/skills/bugteam/scripts/test__claude_permissions_common.py +112 -0
  130. package/skills/bugteam/scripts/test_bugteam_code_rules_gate.py +400 -0
  131. package/skills/bugteam/scripts/test_bugteam_fix_hookspath.py +384 -0
  132. package/skills/bugteam/scripts/test_bugteam_preflight.py +268 -0
  133. package/skills/bugteam/scripts/test_claude_permissions_common.py +195 -0
  134. package/skills/bugteam/scripts/test_grant_project_claude_permissions.py +55 -0
  135. package/skills/bugteam/scripts/test_probe_code_rules_enforcer_check.py +76 -0
  136. package/skills/bugteam/scripts/test_revoke_project_claude_permissions.py +55 -0
  137. package/skills/bugteam/scripts/test_windows_safe_rmtree.py +108 -0
  138. package/skills/bugteam/scripts/windows_safe_rmtree.py +100 -0
  139. package/skills/bugteam/test_skill_additions.py +1 -11
  140. package/skills/code/SKILL.md +176 -0
  141. package/skills/doc-gist/SKILL.md +99 -0
  142. package/skills/doc-gist/references/examples/01-exploration-code-approaches.html +453 -0
  143. package/skills/doc-gist/references/examples/02-exploration-visual-designs.html +515 -0
  144. package/skills/doc-gist/references/examples/03-code-review-pr.html +638 -0
  145. package/skills/doc-gist/references/examples/04-code-understanding.html +491 -0
  146. package/skills/doc-gist/references/examples/05-design-system.html +629 -0
  147. package/skills/doc-gist/references/examples/06-component-variants.html +605 -0
  148. package/skills/doc-gist/references/examples/07-prototype-animation.html +455 -0
  149. package/skills/doc-gist/references/examples/08-prototype-interaction.html +396 -0
  150. package/skills/doc-gist/references/examples/09-slide-deck.html +592 -0
  151. package/skills/doc-gist/references/examples/10-svg-illustrations.html +492 -0
  152. package/skills/doc-gist/references/examples/11-status-report.html +528 -0
  153. package/skills/doc-gist/references/examples/12-incident-report.html +596 -0
  154. package/skills/doc-gist/references/examples/13-flowchart-diagram.html +395 -0
  155. package/skills/doc-gist/references/examples/14-research-feature-explainer.html +381 -0
  156. package/skills/doc-gist/references/examples/15-research-concept-explainer.html +368 -0
  157. package/skills/doc-gist/references/examples/16-implementation-plan.html +702 -0
  158. package/skills/doc-gist/references/examples/17-pr-writeup.html +595 -0
  159. package/skills/doc-gist/references/examples/18-editor-triage-board.html +573 -0
  160. package/skills/doc-gist/references/examples/19-editor-feature-flags.html +663 -0
  161. package/skills/doc-gist/references/examples/20-editor-prompt-tuner.html +722 -0
  162. package/skills/doc-gist/references/examples/README.md +5 -0
  163. package/skills/doc-gist/scripts/config/__init__.py +0 -0
  164. package/skills/doc-gist/scripts/config/gist_upload_constants.py +16 -0
  165. package/skills/doc-gist/scripts/gist_upload.py +177 -0
  166. package/skills/doc-gist/scripts/test_gist_upload.py +51 -0
  167. package/skills/findbugs/SKILL.md +68 -2
  168. package/skills/monitor-open-prs/SKILL.md +13 -32
  169. package/skills/monitor-open-prs/test_skill_contract.py +0 -11
  170. package/skills/pr-consistency-audit/SKILL.md +112 -0
  171. package/skills/pr-consistency-audit/reference/detection-rules.md +96 -0
  172. package/skills/pr-consistency-audit/reference/illustrations.md +78 -0
  173. package/skills/pr-converge/SKILL.md +227 -23
  174. package/skills/pr-converge/config/__init__.py +0 -0
  175. package/skills/pr-converge/config/constants.py +62 -0
  176. package/skills/pr-converge/reference/convergence-gates.md +138 -44
  177. package/skills/pr-converge/reference/examples.md +43 -11
  178. package/skills/pr-converge/reference/fix-protocol.md +6 -5
  179. package/skills/pr-converge/reference/ground-rules.md +5 -3
  180. package/skills/pr-converge/reference/multi-pr-orchestration.md +44 -19
  181. package/skills/pr-converge/reference/obstacles/fix-post-replies.md +13 -0
  182. package/skills/pr-converge/reference/obstacles/fix-publish-summary.md +13 -0
  183. package/skills/pr-converge/reference/obstacles/fix-push.md +13 -0
  184. package/skills/pr-converge/reference/obstacles/fix-read-filelines.md +13 -0
  185. package/skills/pr-converge/reference/obstacles/fix-reset-state.md +13 -0
  186. package/skills/pr-converge/reference/obstacles/fix-resolve-threads.md +13 -0
  187. package/skills/pr-converge/reference/obstacles/fix-spawn-clean-coder.md +13 -0
  188. package/skills/pr-converge/reference/obstacles/fix-stage-commit.md +13 -0
  189. package/skills/pr-converge/reference/obstacles/fix-trigger-bugbot.md +13 -0
  190. package/skills/pr-converge/reference/obstacles/fix-write-test.md +13 -0
  191. package/skills/pr-converge/reference/per-tick.md +90 -31
  192. package/skills/pr-converge/reference/state-schema.md +22 -1
  193. package/skills/pr-converge/reference/stop-conditions.md +9 -7
  194. package/skills/pr-converge/scripts/README.md +34 -46
  195. package/skills/pr-converge/scripts/check_bugbot_ci.py +174 -0
  196. package/skills/pr-converge/scripts/check_convergence.py +497 -0
  197. package/skills/pr-converge/scripts/check_pending_reviews.py +154 -0
  198. package/skills/pr-converge/scripts/config/pr_converge_constants.py +118 -0
  199. package/skills/pr-converge/scripts/fetch_copilot_reviews.py +134 -0
  200. package/skills/pr-converge/scripts/post_fix_reply.py +168 -0
  201. package/skills/pr-converge/workflows/schedule-wakeup-loop.md +5 -12
  202. package/skills/qbug/SKILL.md +132 -27
  203. package/skills/session-log/SKILL.md +216 -114
  204. package/skills/session-tidy/SKILL.md +1 -1
  205. package/skills/skill-builder/SKILL.md +138 -56
  206. package/skills/skill-builder/references/delegation-map.md +72 -113
  207. package/skills/skill-builder/references/progressive-disclosure.md +122 -0
  208. package/skills/skill-builder/references/self-audit-checklist.md +92 -0
  209. package/skills/skill-builder/references/skill-types.md +228 -0
  210. package/skills/skill-builder/references/thariq-x-post-skills.json +33 -0
  211. package/skills/skill-builder/templates/gap-analysis.md +15 -8
  212. package/skills/skill-builder/workflows/improve-skill.md +86 -57
  213. package/skills/skill-builder/workflows/new-skill.md +80 -168
  214. package/skills/skill-builder/workflows/polish-skill.md +78 -54
  215. package/skills/structure-prompt/SKILL.md +50 -0
  216. package/skills/structure-prompt/reference/adversarial-tuning.md +62 -0
  217. package/skills/structure-prompt/reference/block-classification.md +27 -0
  218. package/skills/structure-prompt/reference/canonical-case.md +48 -0
  219. package/skills/structure-prompt/reference/citation-depth.md +70 -0
  220. package/skills/structure-prompt/reference/cleanup.md +33 -0
  221. package/skills/structure-prompt/reference/constraints.md +33 -0
  222. package/skills/structure-prompt/reference/directives.md +37 -0
  223. package/skills/structure-prompt/reference/examples.md +72 -0
  224. package/skills/structure-prompt/reference/instantiation.md +51 -0
  225. package/skills/structure-prompt/reference/output-contract.md +72 -0
  226. package/skills/structure-prompt/reference/per-category.md +23 -0
  227. package/skills/structure-prompt/reference/persona.md +38 -0
  228. package/skills/structure-prompt/reference/research.md +33 -0
  229. package/skills/structure-prompt/reference/structure.md +28 -0
  230. package/agents/code-standards-agent.md +0 -93
  231. package/agents/groq-coder.md +0 -113
  232. package/agents/plan-executor.md +0 -226
  233. package/agents/project-docs-analyzer.md +0 -53
  234. package/agents/project-structure-organizer-agent.md +0 -72
  235. package/agents/skill-to-agent-converter.md +0 -370
  236. package/agents/skill-writer-agent.md +0 -470
  237. package/agents/user-docs-writer.md +0 -67
  238. package/agents/workflow-visual-documenter.md +0 -82
  239. package/commands/readability-review.md +0 -20
  240. package/hooks/mypy.ini +0 -2
  241. package/hooks/notification/attention_needed_notify.py +0 -71
  242. package/hooks/notification/claude_notification_handler.py +0 -67
  243. package/hooks/notification/notification_utils.py +0 -267
  244. package/hooks/notification/subagent_complete_notify.py +0 -381
  245. package/hooks/notification/test_attention_needed_notify.py +0 -47
  246. package/hooks/notification/test_claude_notification_handler.py +0 -54
  247. package/hooks/notification/test_notification_utils.py +0 -91
  248. package/hooks/notification/test_subagent_complete_notify.py +0 -79
  249. package/scripts/config/groq_bugteam_config.py +0 -230
  250. package/scripts/config/test_groq_bugteam_config.py +0 -83
  251. package/scripts/config/test_spec_implementer_prompt.py +0 -32
  252. package/scripts/groq_bugteam.README.md +0 -131
  253. package/scripts/groq_bugteam.py +0 -647
  254. package/scripts/groq_bugteam_dotenv.py +0 -40
  255. package/scripts/groq_bugteam_spec.py +0 -226
  256. package/scripts/test_groq_bugteam.py +0 -529
  257. package/scripts/test_groq_bugteam_apply_fix_from_spec.py +0 -426
  258. package/scripts/test_groq_bugteam_dotenv.py +0 -66
  259. package/scripts/test_groq_bugteam_spec.py +0 -338
  260. package/skills/bugteam/SKILL_EVALS.md +0 -309
  261. package/skills/dream/SKILL.md +0 -118
  262. package/skills/ingest/SKILL.md +0 -40
  263. package/skills/npm-creator/SKILL.md +0 -187
  264. package/skills/readability-review/SKILL.md +0 -127
  265. package/skills/resume-review/SKILL.md +0 -261
  266. package/skills/rule-audit/SKILL.md +0 -307
  267. package/skills/rule-creator/SKILL.md +0 -150
  268. package/skills/searching-obsidian-vault/SKILL.md +0 -131
  269. package/skills/skill-writer/REFERENCE.md +0 -284
  270. package/skills/skill-writer/SKILL.md +0 -222
  271. package/skills/tdd-team/SKILL.md +0 -128
@@ -1,32 +1,44 @@
1
1
  ---
2
2
  name: skill-builder
3
3
  description: >-
4
- Orchestrates the complete skill-building lifecycle using evaluation-driven
5
- development. Routes through gap analysis, eval creation, skill writing (via
6
- skill-writer), subagent testing (via skill-creator infrastructure), and
7
- iterative refinement. Use when creating new skills, improving existing skills,
8
- or optimizing skill descriptions. Triggers: 'build a skill', 'new skill
9
- workflow', 'improve this skill', 'optimize skill description', 'skill
10
- development lifecycle'.
4
+ Orchestrates the complete skill-building lifecycle using best-practice-driven
5
+ development. Routes through type classification, folder scaffolding, skill
6
+ writing (via skill-writer), self-audit against a 38-point checklist, and
7
+ iterative refinement from real usage observations. Use when creating new
8
+ skills, improving existing skills, or optimizing skill descriptions.
9
+ Triggers: 'build a skill', 'new skill workflow', 'improve this skill',
10
+ 'optimize skill description', 'skill development lifecycle'.
11
11
  ---
12
12
 
13
- @${CLAUDE_SKILL_DIR}/references/eval-driven-flow.md
14
-
15
13
  # Skill Builder
16
14
 
17
- **Core principle:** Evaluation-driven development. Build evals BEFORE writing extensive documentation. This ensures skills solve real problems rather than documenting imagined ones.
15
+ **Core principle:** Best-practice-driven craftsman. Knows every proven pattern, applies them intentionally, self-audits after building. The expert that enforces craft standards.
16
+
17
+ Sources: [Anthropic best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices), [Lessons from Building Claude Code](references/thariq-x-post-skills.json), model skills (bugteam, pr-converge).
18
+
19
+ ## Gotchas
18
20
 
19
- Source: [Anthropic Skill Best Practices - Evaluation and Iteration](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices#evaluation-and-iteration)
21
+ Highest-signal content. Append a bullet each time a skill build fails in a new way.
22
+
23
+ > "The highest-signal content in any skill is the Gotchas section. These sections should be built up from common failure points that Claude runs into when using your skill."
20
24
 
21
25
  ## When this skill applies
22
26
 
23
- Trigger for requests to **build**, **improve**, or **polish** a skill through the full evaluation-driven lifecycle. This skill orchestrates the process -- it delegates writing to `/skill-writer` and evaluation infrastructure to the `skill-creator` plugin.
27
+ Trigger for requests to **build**, **improve**, or **polish** a skill. This skill orchestrates the process it classifies, scaffolds, gathers context, delegates writing to `/skill-writer`, and self-audits the result.
24
28
 
25
29
  For quick skill syntax questions or one-off SKILL.md edits, use `/skill-writer` directly instead.
26
30
 
27
- ## Routing
31
+ **Refusal cases — first match wins:**
32
+
33
+ - **No clear task or domain.** Respond exactly: `What should this skill do? Give me a one-sentence description of the capability.`
28
34
 
29
- Assess the user's intent from conversation context and existing artifacts. Route directly:
35
+ ## The Process
36
+
37
+ Each workflow file provides step-by-step instructions. After routing below, open the corresponding workflow file and follow it.
38
+
39
+ ### Routing
40
+
41
+ Assess the user’s intent:
30
42
 
31
43
  **Creating a new skill?**
32
44
  Read `${CLAUDE_SKILL_DIR}/workflows/new-skill.md` and follow it.
@@ -34,74 +46,144 @@ Read `${CLAUDE_SKILL_DIR}/workflows/new-skill.md` and follow it.
34
46
  **Improving an existing skill?**
35
47
  Read `${CLAUDE_SKILL_DIR}/workflows/improve-skill.md` and follow it.
36
48
 
37
- **Final polish only (description optimization, trigger eval)?**
49
+ **Final polish only (description optimization, trigger audit)?**
38
50
  Read `${CLAUDE_SKILL_DIR}/workflows/polish-skill.md` and follow it.
39
51
 
40
52
  **Ambiguous?** Ask: "Are you creating a new skill, improving an existing one, or doing a final polish pass?"
41
53
 
42
- ## The Claude A / Claude B Pattern
54
+ ### The Claude A / Claude B pattern
55
+
56
+ You and the user are **Claude A** — the expert who designs and refines the skill. Subagents running the built skill on real tasks are **Claude B** — the agent using the skill to perform actual work.
57
+
58
+ > "Work with one instance of Claude (‘Claude A’) to create a Skill that is used by other instances (‘Claude B’). Claude A helps you design and refine instructions, while Claude B tests them in real tasks."
59
+
60
+ The feedback loop: observe Claude B’s behavior, bring insights back, refine the skill, test again.
61
+
62
+ ## Skill type routing
63
+
64
+ > "After cataloging all of our skills, we noticed they cluster into a few recurring categories."
65
+
66
+ Classify the skill into one of 9 types. The type determines folder structure. See `${CLAUDE_SKILL_DIR}/references/skill-types.md` for full details.
67
+
68
+ | # | Type | Key folders |
69
+ |---|---|---|
70
+ | 1 | Library & API Reference | reference/, examples/ |
71
+ | 2 | Product Verification | scripts/, reference/ |
72
+ | 3 | Data Fetching & Analysis | reference/, scripts/ |
73
+ | 4 | Business Process & Team Automation | templates/, scripts/ |
74
+ | 5 | Code Scaffolding & Templates | templates/, scripts/ |
75
+ | 6 | Code Quality & Review | reference/, scripts/ |
76
+ | 7 | CI/CD & Deployment | workflows/, scripts/ |
77
+ | 8 | Runbooks | reference/, templates/ |
78
+ | 9 | Infrastructure Operations | reference/, scripts/ |
79
+
80
+ ## Principles
81
+
82
+ These are non-negotiable. Every skill must satisfy them. The self-audit checklist enforces them.
83
+
84
+ ### Concision and defaults
85
+
86
+ > "Default assumption: Claude is already very smart. Only add context Claude doesn’t already have."
87
+
88
+ > "Don’t State the Obvious — focus on information that pushes Claude out of its normal way of thinking."
89
+
90
+ Challenge each sentence: "Does Claude really need this?"
91
+
92
+ ### Degree of freedom
93
+
94
+ > "Match the level of specificity to the task’s fragility and variability."
95
+
96
+ High freedom (text guidance) for open fields. Low freedom (exact scripts, no parameters) for narrow bridges with cliffs.
97
+
98
+ > "Avoid Railroading Claude — give Claude the information it needs, but give it the flexibility to adapt."
99
+
100
+ ### Progressive disclosure
101
+
102
+ > "Keep SKILL.md body under 500 lines."
103
+
104
+ SKILL.md is a hub. Detail lives in reference/, scripts execute without being read into context. References one level deep. Files over 100 lines get a TOC. Forward slashes only.
105
+
106
+ See `${CLAUDE_SKILL_DIR}/references/progressive-disclosure.md` for the full specification.
107
+
108
+ ### Description field
109
+
110
+ > "Always write in third person. The description is critical for skill selection: Claude uses it to choose the right Skill from potentially 100+ available Skills."
111
+
112
+ Include what the skill does AND specific trigger phrases. Max 1024 chars.
113
+
114
+ > "The description field is not a summary — it’s a description of when to trigger."
115
+
116
+ ### Gotchas
117
+
118
+ > "Build a Gotchas Section — the highest-signal content in any skill."
119
+
120
+ Mandatory section. Built from real failure observations. Updated over time as new failure modes surface.
121
+
122
+ ### Templates and examples
43
123
 
44
- You and the user are **Claude A** -- the expert who designs and refines the skill. Subagents running the built skill on eval tasks are **Claude B** -- the agent using the skill to perform real work.
124
+ > "Provide templates for output format" and "Examples help Claude understand the desired style and level of detail more clearly than descriptions alone."
45
125
 
46
- > "Work with one instance of Claude ('Claude A') to create a Skill that is used by other instances ('Claude B'). Claude A helps you design and refine instructions, while Claude B tests them in real tasks."
126
+ Use the template pattern for structured outputs. Use the examples pattern (input/output pairs) for style-dependent work.
47
127
 
48
- The feedback loop: observe Claude B's behavior, bring insights back, refine the skill, test again.
128
+ ### Workflows and checklists
49
129
 
50
- ## Phase Overview
130
+ > "For particularly complex workflows, provide a checklist that Claude can copy into its response and check off as it progresses."
51
131
 
52
- | Phase | Purpose | Delegated To |
53
- |-------|---------|-------------|
54
- | 1. Identify gaps | Document what fails without the skill | This skill (guided conversation) |
55
- | 2. Build evals | Create 3+ scenarios testing the gaps | This skill (templates + user input) |
56
- | 3. Write skill | Minimal instructions addressing gaps | `/skill-writer` |
57
- | 4. Test | Subagent runs with/without skill, grade, benchmark | `skill-creator` eval infrastructure |
58
- | 5. Iterate | Review results, refine, re-test | This skill + `/skill-writer` + Phase 4 |
59
- | 6. Polish | Description optimization, trigger eval, final check | `skill-creator` description optimizer |
132
+ Multi-step processes get `[ ]` checklists. Quality-critical operations get feedback loops (run validator → fix → repeat).
60
133
 
61
- ## Ground-up skill package (required reference)
134
+ ### Scripts
62
135
 
63
- When building a **new** skill as a **full package** (architecture inventory, progressive disclosure files, `evals/`, **human checkpoint after each file**), treat the following as **mandatory** before implementation:
136
+ > "Handle error conditions rather than punting to Claude." "Make clear whether Claude should execute the script or read it as reference."
64
137
 
65
- - **Read:** the installed `@jl-cmd/prompt-generator` template `prompt-generator/templates/skill-from-ground-up.md` (upstream repository path: `skills/prompt-generator/templates/skill-from-ground-up.md` in [jl-cmd/prompt-generator](https://github.com/jl-cmd/prompt-generator)).
66
- - **Do:** Run `/prompt-generator` using that installed template with the file’s token table filled so the downstream session follows architecture-first sequencing, per-file review gates, and eval rows tied only to user-pasted or explicitly approved evidence.
138
+ > "One of the most powerful tools you can give Claude is code — letting Claude spend its turns on composition rather than reconstructing boilerplate."
67
139
 
68
- Use this **together with** gap-analysis and eval-scenario templates in this package; the ground-up template supplies the **orchestration contract** for the multi-file layout Anthropic recommends.
140
+ ### Setup and memory
69
141
 
70
- ## Refinement skill package (required reference)
142
+ > "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."
71
143
 
72
- When **improving** an existing skill as a **multi-file** or **checkpointed** package (baseline directory plus planned deltas, observation-grounded evals), treat the following as **mandatory** before Phase 2–6 file work in `improve-skill.md` or package-aware steps in `polish-skill.md`:
144
+ > "Data stored in the skill directory may be deleted when you upgrade the skill, so store persistent data in `${CLAUDE_PLUGIN_DATA}`."
73
145
 
74
- - **Read:** `prompt-generator/templates/skill-refinement-package.md` (repository path: `skills/prompt-generator/templates/skill-refinement-package.md` in [jl-cmd/prompt-generator](https://github.com/jl-cmd/prompt-generator)).
75
- - **Do:** Run `/prompt-generator` with that file’s token table filled (`[[BASELINE_SKILL_ROOT]]`, `[[WORKSPACE_ROOT]]`, observation gap path, evidence rule) so rollout stays architecture-first, delta-focused, and tied to real observation or approved excerpts.
146
+ ### Constraints and refusal cases
76
147
 
77
- Net-new packages without a baseline skill directory use `skill-from-ground-up.md` instead.
148
+ > bugteam pattern non-negotiables separated from guidance, with design rationale. Explicit "first match wins" refusal conditions.
78
149
 
79
- ## Principles (apply across all phases)
150
+ ### Anti-patterns
80
151
 
81
- 1. **Evals before documentation.** Never write extensive skill content without evaluation scenarios to validate it.
152
+ > 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.
82
153
 
83
- 2. **Minimal instructions first.** Write just enough to pass evaluations. Resist the urge to over-document.
154
+ ## Self-audit
84
155
 
85
- 3. **Generalize from feedback.** The skill will be used across many prompts. Do not overfit to test cases.
156
+ After every build, improvement, or polish pass, run the mandatory checklist at `${CLAUDE_SKILL_DIR}/references/self-audit-checklist.md`. Every item must pass before delivery. Fix failures, then re-audit.
86
157
 
87
- 4. **Explain the why.** Theory of mind beats rigid rules. Help the model understand reasoning, not just constraints.
158
+ ## Delegation to skill-writer
88
159
 
89
- 5. **Observe, do not assume.** Iterate based on what Claude B actually does, not what you think it should do.
160
+ skill-builder orchestrates; skill-writer authors. The handoff packet from Step 4 must include:
90
161
 
91
- ## Delegation Details
162
+ - Skill type and folder structure
163
+ - Gap analysis or observation findings
164
+ - Degree of freedom assessment
165
+ - Initial gotchas
166
+ - Any constraints
92
167
 
93
- See `${CLAUDE_SKILL_DIR}/references/delegation-map.md` for exact invocation patterns and integration points between this orchestrator, `/skill-writer`, and `skill-creator`.
168
+ See `${CLAUDE_SKILL_DIR}/references/delegation-map.md` for exact patterns.
94
169
 
95
- ## File Index
170
+ ## File index
96
171
 
97
172
  | File | Purpose |
98
173
  |------|---------|
99
- | `workflows/new-skill.md` | Full lifecycle for new skills (6 phases) |
100
- | `workflows/improve-skill.md` | Observation-first flow for existing skills |
101
- | `workflows/polish-skill.md` | Description optimization and final validation |
102
- | `references/eval-driven-flow.md` | Official Anthropic methodology with citations |
103
- | `references/delegation-map.md` | Integration map for skill-writer and skill-creator |
104
- | `templates/gap-analysis.md` | Template for Phase 1 gap documentation |
105
- | `templates/eval-scenario.json` | Eval template matching skill-creator schema |
106
- | `../prompt-generator/templates/skill-from-ground-up.md` | Required orchestration template for **net-new** full skill packages (architecture-first, checkpoints, evidence-backed evals) |
107
- | `../prompt-generator/templates/skill-refinement-package.md` | Required orchestration template for **existing-skill** multi-file refinements and package-aware polish (baseline + delta, checkpoints, evidence-backed evals) |
174
+ | `SKILL.md` | This hub principles, process, routing, file index |
175
+ | `references/skill-types.md` | 9-type taxonomy with folder structures per type |
176
+ | `references/progressive-disclosure.md` | Folder conventions, hub pattern, hard rules |
177
+ | `references/self-audit-checklist.md` | 38-point mandatory post-build audit |
178
+ | `references/delegation-map.md` | Subagent handoff patterns and transcript guidance |
179
+ | `workflows/new-skill.md` | Full lifecycle for new skills (6 steps) |
180
+ | `workflows/improve-skill.md` | Observation-first flow for existing skills (6 steps) |
181
+ | `workflows/polish-skill.md` | Description audit and final validation (5 steps) |
182
+ | `templates/gap-analysis.md` | Template for documenting skill gaps |
183
+
184
+ ## Folder map
185
+
186
+ - `SKILL.md` — hub.
187
+ - `references/` — best-practice specifications and the audit checklist.
188
+ - `workflows/` — step-by-step workflows for each lifecycle phase.
189
+ - `templates/` — reusable templates for skill artifacts.
@@ -1,153 +1,112 @@
1
1
  # Delegation Map
2
2
 
3
- How the skill-builder orchestrator integrates with external skills at each phase.
3
+ How skill-builder delegates work to subagents and `/skill-writer`.
4
4
 
5
- ## Phase 1: Identify Gaps -- This Orchestrator
5
+ ## Delegating to skill-writer (Step 4)
6
6
 
7
- No external delegation. The orchestrator guides a conversation with the user to document what fails without a skill.
7
+ skill-builder orchestrates; skill-writer authors the SKILL.md and companion files. The handoff must be structured so skill-writer has everything it needs.
8
8
 
9
- **Output:** `[skill-name]-workspace/gap-analysis.md` using the template at `templates/gap-analysis.md`.
10
-
11
- ## Phase 2: Build Evals -- This Orchestrator
12
-
13
- No external delegation. The orchestrator helps the user transform gaps into eval scenarios.
14
-
15
- **Output:** `[skill-name]-workspace/evals/evals.json` using the template at `templates/eval-scenario.json`.
16
-
17
- **Baseline runs:** Spawn subagents WITHOUT any skill for each eval scenario. These run as background Agent tasks.
18
-
19
- ## Phase 3: Write Skill -- Delegate to `/skill-writer`
20
-
21
- **Full package path:** If the user approved a package plan from `prompt-generator/templates/skill-from-ground-up.md` (net-new) or `prompt-generator/templates/skill-refinement-package.md` (existing baseline), paste the approved architecture summary, baseline inventory, planned deltas, and checkpoint list into the skill-writer handoff so file order and scope stay aligned.
22
-
23
- Invoke `/skill-writer` with the following context in your prompt:
9
+ ### New skill handoff
24
10
 
25
11
  ```
26
- Create a skill based on this gap analysis and eval scenarios.
27
-
28
- Gap analysis: [paste or reference gap-analysis.md]
29
- Eval scenarios: [paste or reference evals.json expected_output fields]
30
- Baseline failures: [summarize what Claude got wrong without the skill]
31
-
32
- Constraint: Write the minimum instructions needed to address these specific gaps.
33
- Do not over-document. Every line must serve a documented gap.
12
+ Create a skill with these parameters:
13
+
14
+ **Skill type:** [one of 9 types from skill-types.md]
15
+ **Folder structure:** [directories to create: reference/, scripts/, etc.]
16
+ **What it does:** [one-sentence capability description]
17
+ **Domain context:** [what Claude needs to know that it doesn't already]
18
+ **Initial gotchas:** [failure patterns to document from the start]
19
+ **Degree of freedom:** [high | medium | low with reasoning]
20
+ **Constraints:** [non-negotiables]
21
+
22
+ Produce:
23
+ 1. SKILL.md with hub layout (principle, gotchas, when-applies, process, file index, folder map)
24
+ 2. Companion files as needed (reference docs, workflow steps, templates)
25
+ 3. Every file under 500 lines; TOC on files over 100 lines
26
+ 4. File index listing every file and its purpose
34
27
  ```
35
28
 
36
- skill-writer handles: type classification, degree of freedom, frontmatter, body structure, progressive disclosure, self-check.
37
-
38
- **Output:** The skill's SKILL.md (and optional REFERENCE.md, scripts, etc.)
39
-
40
- ## Phase 4: Test -- Delegate to skill-creator Infrastructure
41
-
42
- The skill-creator plugin provides the eval infrastructure. Reference its components directly:
43
-
44
- ### Spawning test runs
29
+ ### Refine skill handoff
45
30
 
46
- For each eval, spawn TWO subagents in the SAME turn (parallel):
47
-
48
- **With-skill subagent:**
49
- ```
50
- Execute this task:
51
- - Read the skill at [path-to-skill]/SKILL.md and follow its instructions
52
- - Task: [eval prompt from evals.json]
53
- - Input files: [eval files if any]
54
- - Save all output files to: [workspace]/iteration-N/eval-[name]/with_skill/outputs/
55
- - Save a transcript of your complete work to: [workspace]/iteration-N/eval-[name]/with_skill/transcript.md
56
- - At the end, write a metrics.json with tool call counts and file list
57
31
  ```
32
+ Refine this existing skill:
58
33
 
59
- **Without-skill subagent** (baseline):
60
- For iteration-1, reuse baseline results from Phase 2 (iteration-0). For later iterations, the original baseline persists.
61
-
62
- ### Grading
63
-
64
- Read the grading agent instructions from the skill-creator plugin:
65
- `[skill-creator-plugin-path]/agents/grader.md`
66
-
67
- Spawn a grader subagent for each run with:
68
- - The expectations from evals.json
69
- - The transcript path
70
- - The outputs directory
71
-
72
- **Output:** `grading.json` in each run directory.
73
-
74
- ### Benchmarking
34
+ **Current SKILL.md:** [reference or paste]
35
+ **What was observed:** [specific failures from Claude B usage]
36
+ **What to change:** [specific instructions to add/remove/modify]
37
+ **New gotchas to add:** [failure patterns discovered]
38
+ **What to preserve:** [working content — do not touch]
75
39
 
76
- Run the aggregation script from the skill-creator plugin directory:
77
- ```bash
78
- cd [skill-creator-plugin-path] && python -m scripts.aggregate_benchmark [workspace]/iteration-N --skill-name [name]
40
+ Constraint: Only change what the observations demand. Do not reorganize working content.
79
41
  ```
80
42
 
81
- **Output:** `benchmark.json` and `benchmark.md` in the iteration directory.
43
+ ## Spawning a test subagent
82
44
 
83
- ### Eval Viewer
45
+ To observe how Claude B uses a skill on a real task:
84
46
 
85
- Launch the viewer from the skill-creator plugin:
86
- ```bash
87
- python [skill-creator-plugin-path]/eval-viewer/generate_review.py \
88
- [workspace]/iteration-N \
89
- --skill-name "[name]" \
90
- --benchmark [workspace]/iteration-N/benchmark.json
91
47
  ```
48
+ Agent(
49
+ subagent_type="general-purpose",
50
+ description="Test skill on real task",
51
+ prompt="Read the skill at [skill-path]/SKILL.md and follow its instructions.
92
52
 
93
- For iteration 2+, add: `--previous-workspace [workspace]/iteration-[N-1]`
53
+ Task: [realistic user prompt]
94
54
 
95
- If no browser/display available, add: `--static [workspace]/iteration-N/review.html`
55
+ Save a complete transcript of your work to: [workspace]/transcript.md"
56
+ )
57
+ ```
96
58
 
97
- **Output:** Browser-based reviewer where the user inspects outputs and leaves feedback.
59
+ Spawn with `run_in_background=true` for longer tasks. Read the transcript when the agent completes.
98
60
 
99
- ### Finding the skill-creator plugin path
61
+ ## Reading a transcript for observations
100
62
 
101
- The skill-creator plugin is installed at a path like:
102
- `~/.claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/`
63
+ > "Watch for unexpected exploration paths, missed connections, overreliance on certain sections, and ignored content."
103
64
 
104
- To find it dynamically, search for the skill-creator SKILL.md:
105
- ```bash
106
- find ~/.claude/plugins -name "SKILL.md" -path "*/skill-creator/*" 2>/dev/null | head -1
107
- ```
65
+ Scan the transcript for:
108
66
 
109
- Then derive the plugin root from that path.
67
+ 1. **File access order** — Did Claude read files in the expected order? Unexpected ordering means the structure is not intuitive.
68
+ 2. **Missed files** — Were any reference files never accessed? They might be unnecessary or poorly signaled.
69
+ 3. **Re-read files** — Did Claude re-read the same file multiple times? That content should be in SKILL.md.
70
+ 4. **Gotcha moments** — Where did Claude make a wrong choice? That's a gotcha candidate.
71
+ 5. **Script usage** — Did Claude execute scripts as expected, or did it try to read them instead?
72
+ 6. **Tool call errors** — Any "tool not found" or path errors? Fix references.
110
73
 
111
- ## Phase 5: Iterate -- This Orchestrator + `/skill-writer`
74
+ ## Delegating self-audit
112
75
 
113
- The orchestrator reads feedback.json and transcripts, synthesizes observations, then delegates refinement to `/skill-writer`:
76
+ After building, spawn a subagent to run the checklist independently:
114
77
 
115
78
  ```
116
- Refine this existing skill based on these observations from testing.
79
+ Agent(
80
+ subagent_type="general-purpose",
81
+ description="Self-audit skill against checklist",
82
+ prompt="Read the skill at [skill-path]/SKILL.md and all companion files.
117
83
 
118
- Current SKILL.md: [paste or reference]
119
- User feedback: [from feedback.json]
120
- Behavioral observations: [from transcript analysis]
84
+ Then read the self-audit checklist at [skill-builder-path]/references/self-audit-checklist.md.
121
85
 
122
- Specific issues to address:
123
- 1. [Issue from feedback]
124
- 2. [Issue from observation]
86
+ Check every item. For each: PASS, FAIL with specific file:line evidence and what to fix, or N/A with reason.
125
87
 
126
- Constraint: Only change what the feedback demands. Do not reorganize working content.
88
+ Report as:
89
+ ## Audit Results
90
+ [ ] Item 1: PASS
91
+ [ ] Item 2: FAIL — [file:line] — [what's wrong and how to fix]
92
+ ..."
93
+ )
127
94
  ```
128
95
 
129
- Then return to Phase 4 with the refined skill.
130
-
131
- ## Phase 6: Polish -- Delegate to skill-creator Description Optimizer
96
+ This gives an independent verification. Fix failures, then re-deliver to user.
132
97
 
133
- The skill-creator plugin includes a description optimization loop:
98
+ ## Testing across models
134
99
 
135
- ### Trigger eval generation
100
+ > "Test your Skill with all the models you plan to use it with."
136
101
 
137
- Generate 20 realistic eval queries (10 should-trigger, 10 should-not-trigger). Use the HTML review template from:
138
- `[skill-creator-plugin-path]/assets/eval_review.html`
102
+ If the skill will be used with Haiku, spawn a haiku test subagent:
139
103
 
140
- ### Optimization loop
141
-
142
- ```bash
143
- cd [skill-creator-plugin-path] && python -m scripts.run_loop \
144
- --eval-set [path-to-trigger-eval.json] \
145
- --skill-path [path-to-skill] \
146
- --model [current-model-id] \
147
- --max-iterations 5 \
148
- --verbose
104
+ ```
105
+ Agent(
106
+ subagent_type="general-purpose",
107
+ model="haiku",
108
+ ...
109
+ )
149
110
  ```
150
111
 
151
- ### Final validation
152
-
153
- Run the skill-writer self-check rubric (from skill-writer's Step 9) against the finished skill. All items must pass.
112
+ Haiku needs more explicit guidance than Opus. Observe whether the skill provides enough.
@@ -0,0 +1,122 @@
1
+ # Progressive Disclosure
2
+
3
+ Source A: [Anthropic — Skill authoring best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices)
4
+ Source B: [Lessons from Building Claude Code](thariq-x-post-skills.json)
5
+
6
+ ## Core concept
7
+
8
+ > Source A: "SKILL.md serves as an overview that points Claude to detailed materials as needed, like a table of contents in an onboarding guide."
9
+
10
+ > Source A: "At startup, only the metadata (name and description) from all Skills is pre-loaded. Claude reads SKILL.md only when the Skill becomes relevant, and reads additional files only as needed."
11
+
12
+ > Source B: "You should think of the entire file system as a form of context engineering and progressive disclosure."
13
+
14
+ ## Standard folder conventions
15
+
16
+ Every skill is a folder. These are the standard subdirectories, each with a specific role:
17
+
18
+ | Directory | Purpose | When to use |
19
+ |---|---|---|
20
+ | `SKILL.md` | Hub — overview, gotchas, process, file index | Always |
21
+ | `reference/` | Deep-dive reference material loaded on demand | Domain knowledge, API surfaces, schemas |
22
+ | `scripts/` | Executable scripts (executed, not read into context) | Deterministic operations, validators, helpers |
23
+ | `workflows/` | Multi-step sub-workflows for different scenarios | Complex branching processes |
24
+ | `templates/` | Output templates or file scaffolds to copy and fill | Structured output formats |
25
+ | `assets/` | Static data files, images, config templates | Reference data, configuration |
26
+ | `examples/` | Copy-pasteable examples and usage patterns | Library/API reference skills |
27
+
28
+ > Source A: "As your Skill grows, you can bundle additional content that Claude loads only when needed."
29
+
30
+ > Source B: "The simplest form of progressive disclosure is to point to other markdown files for Claude to use."
31
+
32
+ ## The hub pattern
33
+
34
+ SKILL.md is an index, not a textbook. It tells Claude what exists and when to read it.
35
+
36
+ Observed in model skills (bugteam, pr-converge), the proven layout:
37
+
38
+ 1. Core principle (one sentence)
39
+ 2. Gotchas (highest-signal content)
40
+ 3. When this skill applies (trigger + refusal)
41
+ 4. The Process (checklist)
42
+ 5. Skill type routing (if applicable)
43
+ 6. Principles / constraints
44
+ 7. File index (what every file does)
45
+ 8. Folder map (end of file)
46
+
47
+ > Source B: "Tell Claude what files are in your skill, and it will read them at appropriate times."
48
+
49
+ ## Three progressive disclosure patterns
50
+
51
+ ### Pattern 1: High-level guide with references
52
+
53
+ > Source A: "Claude loads FORMS.md, REFERENCE.md, or EXAMPLES.md only when needed."
54
+
55
+ ```markdown
56
+ ## Quick start
57
+ [essential content inline]
58
+
59
+ ## Advanced features
60
+ **Form filling**: See [FORMS.md](FORMS.md)
61
+ **API reference**: See [REFERENCE.md](REFERENCE.md)
62
+ **Examples**: See [EXAMPLES.md](EXAMPLES.md)
63
+ ```
64
+
65
+ ### Pattern 2: Domain-specific organization
66
+
67
+ > Source A: "When a user asks about sales metrics, Claude only needs to read sales-related schemas, not finance or marketing data."
68
+
69
+ ```markdown
70
+ **Finance**: Revenue, ARR → See [reference/finance.md](reference/finance.md)
71
+ **Sales**: Pipeline, accounts → See [reference/sales.md](reference/sales.md)
72
+ **Product**: API usage, features → See [reference/product.md](reference/product.md)
73
+ ```
74
+
75
+ ### Pattern 3: Conditional details
76
+
77
+ > Source A: "Show basic content, link to advanced content."
78
+
79
+ ```markdown
80
+ For simple edits, modify the XML directly.
81
+
82
+ **For tracked changes**: See [REDLINING.md](REDLINING.md)
83
+ **For OOXML details**: See [OOXML.md](OOXML.md)
84
+ ```
85
+
86
+ ## Hard rules
87
+
88
+ ### 500-line cap on SKILL.md body
89
+
90
+ > Source A: "Keep SKILL.md body under 500 lines for optimal performance. If your content exceeds this, split it into separate files."
91
+
92
+ ### One level deep
93
+
94
+ > Source A: "Keep references one level deep from SKILL.md. All reference files should link directly from SKILL.md."
95
+
96
+ > Source A: "Claude may partially read files when they're referenced from other referenced files. When encountering nested references, Claude might use commands like `head -100` to preview content rather than reading entire files, resulting in incomplete information."
97
+
98
+ **Bad:** `SKILL.md → advanced.md → details.md`
99
+ **Good:** `SKILL.md → advanced.md`, `SKILL.md → details.md`
100
+
101
+ ### TOC for files over 100 lines
102
+
103
+ > Source A: "For reference files longer than 100 lines, include a table of contents at the top. This ensures Claude can see the full scope of available information even when previewing with partial reads."
104
+
105
+ ### Forward slashes only
106
+
107
+ > Source A: "Always use forward slashes in file paths, even on Windows. Unix-style paths work across all platforms."
108
+
109
+ ## File naming conventions
110
+
111
+ > Source A: "Name files descriptively: Use names that indicate content: `form_validation_rules.md`, not `doc2.md`."
112
+
113
+ > Source A: "Organize for discovery: Structure directories by domain or feature. Good: `reference/finance.md`, `reference/sales.md`. Bad: `docs/file1.md`, `docs/file2.md`."
114
+
115
+ ## Scripts: execute vs read
116
+
117
+ > Source A: "Make clear in your instructions whether Claude should execute the script or read it as reference."
118
+
119
+ - **Execute:** "Run `analyze_form.py` to extract fields"
120
+ - **Read as reference:** "See `analyze_form.py` for the extraction algorithm"
121
+
122
+ > Source A: "For most utility scripts, execution is preferred because it's more reliable and efficient."