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,222 +0,0 @@
1
- ---
2
- name: skill-writer
3
- description: >-
4
- Write, create, or improve Claude Code skills (SKILL.md files) with correct
5
- frontmatter, progressive disclosure, and prompt-engineering principles.
6
- Covers workflow skills, enforcement rules, advisory guidance, reference
7
- lookups, and automation scripts.
8
- ---
9
- @packages/claude-dev-env/skills/skill-writer/REFERENCE.md
10
-
11
- # Skill writer
12
-
13
- **Core principle:** A skill is a prompt -- the SKILL.md body is injected into Claude's context when triggered. The same principles that make prompts effective make skills effective.
14
-
15
- **Canonical source:** https://platform.claude.com/docs/en/claude-code/skills -- the official reference for skill structure, frontmatter fields, progressive disclosure, and string substitutions.
16
-
17
- ## Skill-only output rule (overrides all other delivery instructions)
18
-
19
- This skill produces skill artifacts. It does not perform the underlying task the skill would automate.
20
-
21
- When this skill is active, your response contains exactly one of:
22
- 1. **Clarifying questions** to gather information needed to write a better skill (Step 3) -- then stop and wait.
23
- 2. **The skill artifact** in fenced code blocks (SKILL.md and optionally REFERENCE.md) -- then stop.
24
-
25
- Prohibited responses: executing the task the skill would automate, proposing implementation changes unrelated to skill authoring, explaining what *you would do* to accomplish the underlying task.
26
-
27
- ## When this skill applies
28
-
29
- Trigger for any request to **author**, **refine**, or **restructure** a Claude Code skill: SKILL.md files, skill frontmatter, skill body content, reference files, or skill directory structure.
30
-
31
- Use this skill when the user needs a structured skill artifact; for quick answers about skill syntax, answer directly in plain text.
32
-
33
- When invoked with arguments (e.g. `/skill-writer improve this: [paste]`), treat `$ARGUMENTS` as the skill content to refine.
34
-
35
- ### Ground-up multi-file packages (required)
36
-
37
- When the user is creating a **new** skill as a **package** (workspace with `ARCHITECTURE.md`, `REFERENCE.md`, `EXAMPLES.md`, `WORKFLOWS.md`, `evals/*.json`, per-file human review), **before** drafting `SKILL.md`:
38
-
39
- 1. Read `prompt-generator/templates/skill-from-ground-up.md` (installed layout: sibling folder under the same `skills/` parent; repository path: `skills/prompt-generator/templates/skill-from-ground-up.md` in [jl-cmd/prompt-generator](https://github.com/jl-cmd/prompt-generator)).
40
- 2. Ensure `/prompt-generator` has run with that template filled so architecture-first steps, checkpoint gates, and eval evidence rules are already agreed.
41
-
42
- If the task is **only** editing an existing `SKILL.md` or a small single-file tweak, this subsection does not apply.
43
-
44
- ### Refinement multi-file packages (required)
45
-
46
- When the user is **refining** an existing skill as a **package** (baseline skill directory, `ARCHITECTURE.md` with planned deltas, checkpointed updates to REFERENCE / EXAMPLES / WORKFLOWS / `evals/`), **before** rewriting multiple files:
47
-
48
- 1. Read `prompt-generator/templates/skill-refinement-package.md` (installed layout: under the same `skills/` parent; repository path: `skills/prompt-generator/templates/skill-refinement-package.md` in [jl-cmd/prompt-generator](https://github.com/jl-cmd/prompt-generator)).
49
- 2. Ensure `/prompt-generator` has run with that template filled so baseline root, workspace root, observation inputs, and evidence rules are fixed before edits proceed.
50
-
51
- If the change set is a **small single-file** tweak, this subsection does not apply.
52
-
53
- ## Workflow (run in order)
54
-
55
- ### 1. Classify the skill type
56
-
57
- Pick one primary:
58
-
59
- | Type | Purpose | Example |
60
- |------|---------|---------|
61
- | `workflow` | Multi-step process with sequential phases | TDD enforcement, plan review, PR submission |
62
- | `enforcement` | Rules that constrain behavior | Code standards, comment preservation, commit rules |
63
- | `advisory` | Guidance where multiple approaches are valid | Best practices, design patterns, optimization tips |
64
- | `reference` | Lookup material loaded on demand | API docs, field mappings, configuration tables |
65
- | `automation` | Script-driven with tool calls | PDF form filling, browser automation, file processing |
66
-
67
- ### 2. Set degree of freedom
68
-
69
- Match specificity to task fragility:
70
-
71
- - **High:** Multiple valid approaches; use numbered goals and acceptance criteria. The skill states *what* to achieve, not *how*.
72
- - **Medium:** Preferred pattern exists; use structured steps with room for adaptation. The skill states a recommended approach but allows deviation when justified.
73
- - **Low:** Fragile or safety-critical; use exact steps, exact field names, and boundary constraints. The skill states precisely what to do and what not to do.
74
-
75
- ### 3. Collect missing facts
76
-
77
- Ask 1-3 short questions if needed. Focus on:
78
- - What capability does the skill provide? (one skill = one capability)
79
- - When should the skill trigger? (specific phrases, file patterns, workflow position)
80
- - What tools does the skill need? (Bash, Read, Grep, MCP tools)
81
- - What does the skill produce? (output format, files created, state changes)
82
- - Where does it fit in existing workflows? (before/after other skills)
83
-
84
- ### 4. Choose location
85
-
86
- **Personal skills** (`~/.claude/skills/` or package-managed):
87
- - Individual workflows, experimental skills, cross-project utilities
88
-
89
- **Project skills** (`.claude/skills/`):
90
- - Team conventions, project-specific expertise, committed to git
91
-
92
- ### 5. Write frontmatter
93
-
94
- Apply official constraints from the canonical source:
95
-
96
- ```yaml
97
- ---
98
- name: skill-name-here
99
- description: >-
100
- [What it does] in third person. [When to use it].
101
- Triggers: '[phrase 1]', '[phrase 2]', '[phrase 3]'.
102
- ---
103
- ```
104
-
105
- **Name:** lowercase, hyphens, numbers only. Max 64 chars. No `anthropic` or `claude`. Must match directory name.
106
-
107
- **Description:** max 1024 chars. Third person. No XML tags. Include trigger phrases that match how users naturally ask for this capability.
108
-
109
- **Optional fields** -- include only when needed:
110
- - `allowed-tools` -- when the skill requires specific tools (e.g., `Bash(node *), Read`)
111
- - `argument-hint` -- when the skill accepts arguments (e.g., `[filename] [format]`)
112
- - `paths` -- when the skill applies only to certain file types (e.g., `"*.py"` or `["*.ts", "*.tsx"]`)
113
- - `context: fork` -- when the skill needs isolated execution without conversation history
114
- - `disable-model-invocation: true` -- when the skill should only trigger via explicit `/name` invocation
115
- - `effort` -- when the skill benefits from a specific thinking depth (`low`, `medium`, `high`, `max`)
116
-
117
- See REFERENCE.md for the complete field table with types, defaults, and constraints.
118
-
119
- ### 6. Build the skill body
120
-
121
- Apply prompt-engineering principles -- a skill body is a prompt. Source: https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices
122
-
123
- **Structure with XML section tags** where content mixes instructions, context, and examples. Anthropic: "Use consistent, descriptive tag names across your prompts. Nest tags when content has a natural hierarchy." For skills under ~20 lines, use concise plain structure instead.
124
-
125
- **Set a role** when the skill benefits from focused behavior. Anthropic: "Setting a role in the system prompt focuses Claude's behavior and tone for your use case. Even a single sentence makes a difference."
126
-
127
- **Add motivation behind constraints.** Anthropic: "Providing context or motivation behind your instructions... can help Claude better understand your goals and deliver more targeted responses." State *why* a rule exists, not just *what* it forbids.
128
-
129
- **Frame positively.** State the desired behavior directly. Anthropic: "Your response should be composed of smoothly flowing prose paragraphs" provides clearer guidance than a prohibition-only instruction. Write "validate field names before filling" rather than "never guess field names."
130
-
131
- **Emotion-informed framing.** Anthropic's emotion concepts research (2026) found internal activation patterns that causally influence output quality. Apply to skill writing: (1) provide clear success criteria and escape routes; (2) use collaborative framing; (3) frame tasks as interesting problems; (4) invite transparency -- include "say so if you're unsure" when appropriate; (5) use constructive, forward-looking tone.
132
-
133
- **Golden rule check.** Anthropic: "Show your prompt to a colleague with minimal context on the task and ask them to follow it. If they'd be confused, Claude will be too." Apply the same test to the skill body.
134
-
135
- **Progressive disclosure.** Keep the SKILL.md body under 500 lines. Move heavy content (field tables, long examples, lookup data, scripts) into REFERENCE.md or separate files that load only when referenced.
136
-
137
- #### Body structure template
138
-
139
- ```markdown
140
- # Skill Name
141
-
142
- **Core principle:** [One sentence capturing the essential insight]
143
-
144
- ## When this skill applies
145
- [Trigger conditions, workflow position]
146
-
147
- ## The Process
148
-
149
- ### Step 1: [First Action]
150
- [Instructions -- narrative, not verbose checklists]
151
-
152
- ### Step 2: [Second Action]
153
- [Continue with clear sequential steps]
154
-
155
- ## Output Format
156
- [What the skill produces -- be specific]
157
-
158
- ## Examples
159
- [3-5 concrete scenarios with inputs and expected outputs]
160
- ```
161
-
162
- ### 7. Control output format
163
-
164
- If the skill produces structured output, specify the format explicitly. Use XML format indicators when the skill should produce tagged sections. Match the formatting style in the skill body to the desired output style -- Anthropic notes the prompt's own formatting influences the response.
165
-
166
- ### 8. Add examples
167
-
168
- Include 3-5 concrete examples showing the skill in action. Wrap in `<example>` tags with diverse, representative inputs. Anthropic: "Include 3-5 examples for best results. You can also ask Claude to evaluate your examples for relevance and diversity."
169
-
170
- Examples should cover:
171
- - A typical use case
172
- - An edge case or boundary condition
173
- - A case where the skill should decline or ask for clarification
174
-
175
- ### 9. Self-check
176
-
177
- Before delivering, verify against this rubric:
178
-
179
- - [ ] Description is third person with trigger phrases
180
- - [ ] Under 500 lines
181
- - [ ] States what to do in positive terms (not prohibition-heavy)
182
- - [ ] Degree of freedom matches task fragility
183
- - [ ] Progressive disclosure used (heavy content in REFERENCE.md)
184
- - [ ] No time-sensitive claims unless clearly dated
185
- - [ ] Examples are concrete, not abstract
186
- - [ ] Frontmatter fields are valid per official docs
187
- - [ ] If tools needed: specifies `allowed-tools`
188
- - [ ] If arguments expected: includes `argument-hint`
189
- - [ ] Workflow steps are sequential and numbered
190
- - [ ] Golden rule: a colleague could follow this skill without extra context
191
- - [ ] Motivation provided for constraints (why, not just what)
192
- - [ ] One skill = one capability (not a bundle of loosely related features)
193
- - [ ] String substitutions used correctly (`$ARGUMENTS`, `${CLAUDE_SKILL_DIR}`, etc.)
194
-
195
- ### 10. Deliver
196
-
197
- Final artifact as **fenced code blocks** the user can paste as-is: one block for SKILL.md, optionally one for REFERENCE.md. The fenced blocks are your entire response -- no surrounding commentary or explanation.
198
-
199
- ## Claude 4.6 considerations
200
-
201
- When writing skills for current Claude models, apply these patterns:
202
-
203
- - **Overtriggering:** Dial back aggressive language. Anthropic: "Where you might have said 'CRITICAL: You MUST use this tool when...', you can use more normal prompting like 'Use this tool when...'." Skills that shout get ignored or cause erratic behavior -- write in a direct, conversational tone.
204
- - **Overeagerness:** Include scope constraints. Anthropic: "Claude Opus 4.5 and Claude Opus 4.6 have a tendency to overengineer by creating extra files, adding unnecessary abstractions, or building in flexibility that wasn't requested." Skills should state their boundary clearly.
205
- - **Overthinking:** Anthropic: "Replace blanket defaults with more targeted instructions. Instead of 'Default to using [tool],' add guidance like 'Use [tool] when it would enhance your understanding of the problem.'" Write conditional triggers, not blanket rules.
206
- - **Conservative vs proactive action:** For skills that should act, use explicit language. For skills that should advise, include: "Default to providing information and recommendations. Proceed with changes only when the user explicitly requests them."
207
-
208
- ## Autonomy and safety pattern
209
-
210
- For `automation` and `enforcement` skill types, include reversibility guidance. Anthropic provides this pattern:
211
-
212
- ```text
213
- Consider the reversibility and potential impact of your actions. You are encouraged to take local, reversible actions like editing files or running tests, but for actions that are hard to reverse, affect shared systems, or could be destructive, ask the user before proceeding.
214
- ```
215
-
216
- ## Conflict resolution
217
-
218
- When skill-writing guidance conflicts across sources, defer to the authority tier:
219
-
220
- 1. **Tier 1 (primary):** Anthropic -- the model provider's own documentation is authoritative for Claude behavior
221
- 2. **Tier 2 (strong secondary):** OpenAI, Google DeepMind, Microsoft Research -- major lab guidance often transfers across models
222
- 3. **Tier 3 (supplementary):** Community resources, courses, individual blogs -- valuable for patterns and intuition, not authoritative on model specifics
@@ -1,128 +0,0 @@
1
- ---
2
- name: tdd-team
3
- description: "Spawn an orchestrated TDD agent team (planner, tester, implementer, validator) to build features or fix bugs via Red-Green-Refactor. Use when the user says /tdd-team, 'TDD team', 'agent team for this', 'have a team build this', or describes a non-trivial implementation task they want done with test-driven development and parallel agents. Also triggers on 'agentically', 'orchestrated team', or 'planner implementer tester validator'."
4
- ---
5
-
6
- # TDD Team
7
-
8
- Spawn an orchestrated team of 4 agents that implements a feature or fix using strict Test-Driven Development: Plan -> RED (failing tests) -> GREEN (minimum code to pass) -> Validate.
9
-
10
- ## When to use
11
-
12
- - Non-trivial features requiring 3+ files changed
13
- - Bug fixes where the fix needs tests proving the bug exists first
14
- - Any task where the user says "TDD" and "team" or "agentically"
15
-
16
- ## Arguments
17
-
18
- The full task description follows the command. Example:
19
- ```
20
- /tdd-team fix proportional split distribution when item prices exceed order total
21
- ```
22
-
23
- ## Workflow
24
-
25
- ### Phase 1: Setup
26
-
27
- 1. **Create team** via TeamCreate with a name derived from the task (kebab-case, max 30 chars)
28
- 2. **Create tasks** with dependencies:
29
- - #1 PLAN — blocked by nothing
30
- - #2-N RED — blocked by #1
31
- - #N+1 GREEN — blocked by all RED tasks
32
- - #LAST VALIDATE — blocked by GREEN task
33
- 3. **Spawn 4 agents** (all at once for parallel startup):
34
- - `planner` (team-lead) — reads code, designs the approach, defines file ownership so agents work independently, and messages teammates with clear assignments
35
- - `tester` (team-implementer) — writes failing tests that define the expected behavior before implementation exists, establishing the contract the code must satisfy
36
- - `implementer` (team-implementer) — writes the minimum production code to satisfy the test contracts, keeping scope tight to keep all behavior tested
37
- - `validator` (team-reviewer) — runs the full test suite to catch regressions across files, and verifies the feature works end-to-end
38
-
39
- ### Phase 2: Orchestrate
40
-
41
- As the team lead, your job is to:
42
- - **Nudge blocked agents** when upstream tasks complete (send messages)
43
- - **Shutdown idle agents** when all their tasks are done (send shutdown_request)
44
- - **Report progress** to the user at milestones (plan done, tests written, implementation done, validation complete)
45
- - **Fix coordination issues** (e.g., tester waiting for planner who already finished)
46
-
47
- ### Phase 3: Cleanup
48
-
49
- After validator reports success:
50
- 1. Shutdown all remaining agents
51
- 2. Clean up any temporary files, scripts, or helper files created during iteration
52
- 3. Delete the team via TeamDelete
53
- 4. Run `python -m pytest tests/ -q` to confirm final count
54
- 5. Commit with descriptive message
55
- 6. Report summary to user
56
-
57
- ## Agent Prompts
58
-
59
- Each agent receives a structured prompt containing:
60
-
61
- ### Common context (all agents get this)
62
- - The task description from the user
63
- - Working directory path
64
- - Code rules reminder: no magic values, no abbreviations, complete type hints, no new inline comments, imports at top, constants in config/
65
- - Collaboration guidance: flag ambiguity or uncertainty to teammates and use [PLACEHOLDER] for values you have not verified. Your role contributes to a specific phase of the TDD cycle — the separation between phases is what makes TDD effective.
66
- - Anti-test-fixation: write general solutions that work for all valid inputs, not just the specific test cases. Tests verify correctness -- they do not define the solution. If a test seems incorrect, flag it rather than working around it.
67
- - Commit-and-execute: choose an approach and commit to it. Avoid revisiting decisions unless new information directly contradicts your reasoning. Course-correct later if needed.
68
-
69
- ### Planner-specific
70
- - Read the relevant source files before designing
71
- - Design the implementation with function signatures and return types
72
- - Define file ownership boundaries (tester owns test files, implementer owns production files)
73
- - Create the task breakdown with specific test cases to write
74
- - Mark task complete and message teammates with assignments
75
- - If the scope is unclear or requirements are ambiguous, flag this to the orchestrator and propose assumptions for confirmation
76
- - Commit to an approach and communicate it clearly to teammates -- avoid revisiting architectural decisions unless implementation reveals a fundamental problem
77
-
78
- ### Tester-specific
79
- - Wait for planner to complete (check TaskList)
80
- - Write FAILING tests that reproduce the desired behavior
81
- - Use existing test patterns from the project (read test files first)
82
- - Mock external calls, use patch.dict for env vars
83
- - Tests must FAIL before implementation — that's the point
84
- - Mark each task complete, check TaskList for next work
85
- - If a test case from the plan is ambiguous about expected behavior, ask the planner for clarification — a clear test is the most valuable deliverable
86
-
87
- ### Implementer-specific
88
- - Wait for tester to complete (check TaskList)
89
- - Read the failing tests to understand expected behavior
90
- - Write MINIMUM code to make tests pass — no extras
91
- - Run the specific test file to verify green
92
- - Mark task complete, check TaskList for next work
93
- - Write general solutions that work for all valid inputs -- never hard-code values or create implementations that only satisfy specific test assertions
94
- - If a failing test seems to test the wrong behavior or has a bug in the test itself, flag it to the validator for review
95
-
96
- ### Validator-specific
97
- - Wait for implementer to complete (check TaskList)
98
- - Run full test suite (`python -m pytest tests/ -q`)
99
- - Fix test regressions from the new code (e.g., unmocked new functions in existing tests)
100
- - Verify new functions exist and are wired correctly
101
- - Verify the implementation fully captures the planner's design (all planned functions exist, signatures match, edge cases covered)
102
- - Verify the implementation follows project code rules (centralized config, complete type hints, full-word naming, self-documenting code)
103
- - Report: test count, pass/fail, regressions found and fixed, plan coverage assessment, code rules compliance
104
- - If regressions trace to a design issue, report the root cause to the orchestrator for a targeted follow-up task
105
-
106
- ## Task Sizing
107
-
108
- The planner decides how many RED tasks to create based on the scope:
109
- - **Small fix** (1 function): 1 RED task, 1 GREEN task
110
- - **Medium feature** (2-3 functions): 2-3 RED tasks (can be parallel), 1-2 GREEN tasks
111
- - **Large feature** (4+ functions across files): 3-5 RED tasks, 2-3 GREEN tasks with dependencies
112
-
113
- ## Error Recovery
114
-
115
- - If tester writes tests that import non-existent constants, that's expected (RED phase)
116
- - If implementer's code breaks existing tests, validator fixes the regressions
117
- - If validator finds issues, create a new fix task and assign to implementer
118
- - If an agent goes idle repeatedly without progress, send a message with specific instructions
119
- - When encountering obstacles, use standard tools and approaches -- do not create helper scripts or workarounds to bypass problems; flag the issue for resolution
120
-
121
- ## Ownership Boundaries
122
-
123
- Each agent owns its phase — this separation ensures the TDD cycle produces reliable results:
124
-
125
- - The tester writes tests; the implementer writes production code. This separation ensures tests define behavior independently of implementation.
126
- - Failing tests exist before any production code. This is the core of TDD — the test proves the requirement, then the code satisfies it.
127
- - The validator runs after implementation. It catches regressions across files that are invisible to agents working on individual files.
128
- - Shut down agents after their tasks complete. Idle agents consume context; active agents produce value.