claude-dev-env 4.3.0 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (480) hide show
  1. package/.agents/agents/pr-description-writer.md +2 -2
  2. package/.agents/agents/test_agent_frontmatter.py +2 -2
  3. package/.agents/agents/test_pr_description_writer_style.py +1 -3
  4. package/.agents/skills/e-code-review/SKILL.md +12 -12
  5. package/.agents/skills/e-code-review/preflight-proposal.contract.test.mjs +20 -0
  6. package/.agents/skills/e-code-review/reference/fix.md +15 -17
  7. package/.agents/skills/e-code-review/reference/loop.md +35 -39
  8. package/.agents/skills/e-code-review/reference/mode-contract.test.mjs +2 -1
  9. package/.agents/skills/e-code-review/reference/preflight-proposal.md +44 -9
  10. package/.agents/skills/e-code-review/reference/runner-selection.md +13 -14
  11. package/.agents/skills/issue-tracker/SKILL.md +5 -4
  12. package/.agents/skills/pull-request/SKILL.md +11 -13
  13. package/.agents/skills/pull-request/reference/publication-tasks.md +3 -3
  14. package/.agents/skills/pull-request/scripts/github_pr_command_constants/config/constants.py +9 -1
  15. package/.agents/skills/pull-request/scripts/pull_request.py +35 -44
  16. package/.agents/skills/pull-request/scripts/test_github_pr_command_constants.py +9 -0
  17. package/.agents/skills/pull-request/scripts/test_pull_request.py +35 -3
  18. package/.agents/skills/session-continuity/README.md +189 -0
  19. package/.agents/skills/session-continuity/SKILL.md +114 -0
  20. package/.agents/skills/session-continuity/continuity.mjs +375 -0
  21. package/.agents/skills/session-continuity/continuity.test.mjs +303 -0
  22. package/.agents/skills/skill-builder/SKILL.md +3 -196
  23. package/.agents/skills/syncing-submodules/scripts/test_sync_parent_pointer.py +0 -7
  24. package/.agents/skills/windows-scheduled-task/SKILL.md +153 -0
  25. package/_shared/pr-loop/scripts/pr_loop_shared_constants/terminology_sweep_constants.py +6 -0
  26. package/_shared/pr-loop/scripts/terminology_sweep.py +64 -19
  27. package/_shared/pr-loop/scripts/tests/test_terminology_sweep.py +59 -0
  28. package/bin/cde.mjs +36 -8
  29. package/bin/cde.test.mjs +48 -0
  30. package/bin/ever-shipped-skills.mjs +2 -20
  31. package/bin/ever-shipped-skills.test.mjs +8 -0
  32. package/bin/expand_home_directory_tokens.mjs +4 -5
  33. package/bin/expand_home_directory_tokens.test.mjs +128 -0
  34. package/bin/git_hooks_installer.mjs +22 -3
  35. package/bin/git_hooks_installer.test.mjs +159 -5
  36. package/bin/install-session-continuity.mjs +78 -0
  37. package/bin/install-session-continuity.test.mjs +42 -0
  38. package/bin/install.agents-home.test.mjs +15 -13
  39. package/bin/install.codex-rules.test.mjs +5 -2
  40. package/bin/install.cursor-rules.test.mjs +5 -2
  41. package/bin/install.mjs +506 -63
  42. package/bin/install.policy-lint.test.mjs +130 -0
  43. package/bin/install.profiles.test.mjs +10 -0
  44. package/bin/install.prune.test.mjs +286 -37
  45. package/bin/install.pstack-plugin.test.mjs +114 -0
  46. package/bin/install.test.mjs +537 -120
  47. package/bin/install.transaction.test.mjs +3 -3
  48. package/bin/refresh-pstack-plugin-skills.test.mjs +211 -0
  49. package/docs/CODE_RULES.md +1 -1
  50. package/hooks/advisory/pr_done_reminder.py +342 -0
  51. package/hooks/advisory/test_pr_done_reminder.py +249 -0
  52. package/hooks/blocking/bash_post_call_dispatcher.py +53 -6
  53. package/hooks/blocking/code_rules_banned_identifiers.py +3 -0
  54. package/hooks/blocking/code_rules_paired_test.py +22 -15
  55. package/hooks/blocking/precommit_code_rules_gate.py +5 -8
  56. package/hooks/blocking/test_bash_dispatcher_interpreter_starts.py +7 -52
  57. package/hooks/blocking/test_bash_post_call_dispatcher.py +65 -4
  58. package/hooks/blocking/test_bash_pre_tool_use_dispatcher.py +0 -69
  59. package/hooks/blocking/test_code_rules_banned_identifiers.py +64 -0
  60. package/hooks/blocking/test_code_rules_enforcer_paired_test.py +36 -29
  61. package/hooks/blocking/test_code_rules_js_resume_task_enumeration.py +4 -4
  62. package/hooks/blocking/test_code_rules_js_returns_object_schemaless.py +5 -5
  63. package/hooks/blocking/test_pre_tool_use_dispatcher.py +43 -342
  64. package/hooks/blocking/test_pre_tool_use_dispatcher_native.py +20 -51
  65. package/hooks/blocking/test_shared_stdin_adoption.py +1 -47
  66. package/hooks/git-hooks/git_hooks_constants/staged_policy_lint.py +12 -0
  67. package/hooks/git-hooks/git_hooks_constants/verification_notice_constants.py +116 -0
  68. package/hooks/git-hooks/post_commit.py +33 -0
  69. package/hooks/git-hooks/pre_commit.py +18 -49
  70. package/hooks/git-hooks/pre_push.py +45 -541
  71. package/hooks/git-hooks/test_installed_policy_lint.py +208 -0
  72. package/hooks/git-hooks/test_native_hook_support.py +129 -0
  73. package/hooks/git-hooks/test_native_policy_commit.py +120 -0
  74. package/hooks/git-hooks/test_post_commit.py +43 -0
  75. package/hooks/git-hooks/test_pre_commit.py +38 -148
  76. package/hooks/git-hooks/test_pre_push.py +48 -1631
  77. package/hooks/git-hooks/test_verification_notice.py +60 -0
  78. package/hooks/git-hooks/test_verification_start.py +173 -0
  79. package/hooks/git-hooks/verification_notice.py +192 -0
  80. package/hooks/git-hooks/verification_notice_context.py +253 -0
  81. package/hooks/git-hooks/verification_notice_state.py +237 -0
  82. package/hooks/git-hooks/verification_start.py +100 -0
  83. package/hooks/hooks.json +1 -120
  84. package/hooks/hooks_constants/banned_identifiers_constants.py +4 -0
  85. package/hooks/hooks_constants/bash_post_call_dispatcher_constants.py +14 -1
  86. package/hooks/hooks_constants/bash_pre_tool_use_dispatcher_constants.py +1 -15
  87. package/hooks/hooks_constants/post_tool_use_dispatcher_constants.py +0 -4
  88. package/hooks/hooks_constants/pr_done_reminder_constants.py +98 -0
  89. package/hooks/hooks_constants/pre_tool_use_dispatcher_constants.py +10 -93
  90. package/hooks/hooks_constants/stop_dispatcher_constants.py +1 -4
  91. package/hooks/hooks_constants/test_bash_post_call_dispatcher_constants.py +19 -2
  92. package/hooks/hooks_constants/test_bash_pre_tool_use_dispatcher_constants.py +3 -66
  93. package/hooks/hooks_constants/test_pr_done_reminder_constants.py +40 -0
  94. package/hooks/hooks_constants/test_pre_tool_use_dispatcher_constants.py +46 -201
  95. package/hooks/hooks_constants/test_stop_dispatcher_constants.py +3 -25
  96. package/hooks/validation/test_post_tool_use_dispatcher.py +35 -298
  97. package/hooks/validators/run_all_validators.py +5 -1
  98. package/hooks/validators/security_checks.py +57 -2
  99. package/hooks/validators/test_hook_timing_harness.py +2 -5
  100. package/hooks/validators/test_run_all_validators_mutation_tool_parity.py +3 -11
  101. package/hooks/validators/test_run_all_validators_policy_lint.py +36 -0
  102. package/hooks/validators/test_security_checks.py +57 -0
  103. package/package.json +2 -2
  104. package/rules/confirm-implementation-forks.md +2 -0
  105. package/rules/durable-post-artifacts.md +2 -1
  106. package/rules/git-workflow.md +18 -6
  107. package/rules/pstack-host-mapping.md +48 -0
  108. package/rules/vault-context.md +3 -5
  109. package/rules/verify-runtime-state.md +7 -0
  110. package/scripts/audit-hooks-cli.mjs +5 -0
  111. package/scripts/audit-hooks.mjs +72 -16
  112. package/scripts/automatic_advisory/__init__.py +1 -0
  113. package/scripts/automatic_advisory/checkout.py +51 -0
  114. package/scripts/automatic_advisory/cli.py +334 -0
  115. package/scripts/automatic_advisory/config/__init__.py +1 -0
  116. package/scripts/automatic_advisory/config/constants.py +93 -0
  117. package/scripts/automatic_advisory/config/timing.py +4 -0
  118. package/scripts/automatic_advisory/configuration.py +197 -0
  119. package/scripts/automatic_advisory/execution.py +350 -0
  120. package/scripts/automatic_advisory/git.py +69 -0
  121. package/scripts/automatic_advisory/model.py +107 -0
  122. package/scripts/automatic_advisory/process_host.py +32 -0
  123. package/scripts/automatic_advisory/publisher.py +84 -0
  124. package/scripts/automatic_advisory/runner.py +399 -0
  125. package/scripts/automatic_advisory/state.py +116 -0
  126. package/scripts/automatic_advisory/window_flags.py +41 -0
  127. package/scripts/automatic_advisory/windows_job.py +122 -0
  128. package/scripts/check.ps1 +0 -1
  129. package/{.agents/skills/run-claude-dev-env/driver.mjs → scripts/ci/installer-lifecycle.mjs} +3 -28
  130. package/scripts/ci/installer-lifecycle.test.mjs +26 -0
  131. package/scripts/ci/windows-installer-lifecycle.ps1 +1 -11
  132. package/scripts/codex_compat_materializer.py +99 -13
  133. package/scripts/dev_env_scripts_constants/shared_tree_constants.py +4 -5
  134. package/{.agents/skills/_shared/pr-loop/scripts → scripts}/durable_post_lint.py +35 -43
  135. package/{.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/durable_post_lint_constants.py → scripts/durable_post_lint_config/config/constants.py} +10 -10
  136. package/{.agents/skills/_shared/pr-loop/scripts/test_durable_post_lint_constants.py → scripts/durable_post_lint_config/config/test_constants.py} +14 -1
  137. package/scripts/local_report_cli.py +184 -0
  138. package/scripts/local_report_core.py +247 -0
  139. package/scripts/local_report_publisher.py +12 -0
  140. package/scripts/local_report_validation.py +357 -0
  141. package/scripts/local_verification/__init__.py +23 -0
  142. package/scripts/local_verification/check_runner.py +364 -0
  143. package/scripts/local_verification/check_support.py +99 -0
  144. package/scripts/local_verification/cli.py +158 -0
  145. package/scripts/local_verification/command_runner.py +84 -0
  146. package/scripts/local_verification/config/__init__.py +1 -0
  147. package/scripts/local_verification/config/constants.py +89 -0
  148. package/scripts/local_verification/config/timing.py +1 -0
  149. package/scripts/local_verification/git_state.py +146 -0
  150. package/scripts/local_verification/manifest.py +224 -0
  151. package/scripts/local_verification/model.py +174 -0
  152. package/scripts/local_verification/runner.py +234 -0
  153. package/scripts/policy_lint/adapter_detectors.py +13 -6
  154. package/scripts/policy_lint/adapter_pairing.py +58 -3
  155. package/scripts/policy_lint/adapters.py +7 -4
  156. package/scripts/policy_lint/config/approved_test_pairs.py +323 -0
  157. package/scripts/policy_lint/config/constants.py +5 -0
  158. package/scripts/policy_lint/engine.py +48 -4
  159. package/scripts/policy_lint/model.py +1 -0
  160. package/scripts/policy_lint/registry.py +1 -1
  161. package/scripts/policy_lint/selection.py +2 -1
  162. package/scripts/policy_lint/selection_git.py +2 -0
  163. package/scripts/pr_verification/__init__.py +1 -0
  164. package/scripts/pr_verification/branch_refs.py +114 -0
  165. package/scripts/pr_verification/config/__init__.py +1 -0
  166. package/scripts/pr_verification/config/constants.py +84 -0
  167. package/scripts/pr_verification/config/timing.py +5 -0
  168. package/scripts/pr_verification/github.py +137 -0
  169. package/scripts/pr_verification/github_api.py +376 -0
  170. package/scripts/pr_verification/github_labels.py +88 -0
  171. package/scripts/pr_verification/github_parsing.py +182 -0
  172. package/scripts/pr_verification/github_transport.py +91 -0
  173. package/scripts/pr_verification/lock.py +122 -0
  174. package/scripts/pr_verification/model.py +43 -0
  175. package/scripts/pr_verification/requirements.txt +1 -0
  176. package/scripts/refresh_pstack_plugin_skills.mjs +200 -0
  177. package/scripts/shared_tree_paths.py +32 -3
  178. package/{.agents/skills/_shared/pr-loop/scripts → scripts}/test_durable_post_lint.py +97 -0
  179. package/scripts/test_shared_tree_paths.py +33 -0
  180. package/scripts/tests/test-audit-hooks-cli.mjs +150 -0
  181. package/scripts/tests/test-audit-hooks.mjs +94 -2
  182. package/scripts/tests/test_automatic_advisory.py +376 -0
  183. package/scripts/tests/test_automatic_advisory_job_cleanup.py +71 -0
  184. package/scripts/tests/test_automatic_advisory_polling.py +216 -0
  185. package/scripts/tests/test_automatic_advisory_recovery.py +320 -0
  186. package/scripts/tests/test_automatic_advisory_repairs.py +400 -0
  187. package/scripts/tests/test_automatic_advisory_settings.py +48 -0
  188. package/scripts/tests/test_automatic_advisory_window_flags.py +163 -0
  189. package/scripts/tests/test_closed_pr_label.py +157 -0
  190. package/scripts/tests/test_codex_compat_materializer.py +189 -6
  191. package/scripts/tests/test_github_labels.py +101 -0
  192. package/scripts/tests/test_github_transport.py +125 -0
  193. package/scripts/tests/test_local_report_publisher.py +396 -0
  194. package/scripts/tests/test_local_report_publisher_cli.py +85 -0
  195. package/scripts/tests/test_local_verification.py +348 -0
  196. package/scripts/tests/test_local_verification_cli.py +98 -0
  197. package/scripts/tests/test_policy_lint_rules_archive.py +120 -0
  198. package/scripts/tests/test_policy_lint_rules_engine.py +25 -4
  199. package/scripts/tests/test_policy_lint_rules_installed_loader.py +29 -0
  200. package/scripts/tests/test_policy_lint_rules_pairing.py +163 -0
  201. package/scripts/tests/test_policy_lint_rules_registry.py +227 -13
  202. package/scripts/tests/test_policy_lint_selection.py +25 -2
  203. package/scripts/tests/test_policy_lint_selection_native_index.py +30 -0
  204. package/scripts/tests/test_pr_verification_github.py +392 -0
  205. package/scripts/tests/test_pr_verification_lock.py +168 -0
  206. package/scripts/tests/test_rules.py +3 -7
  207. package/scripts/tests/test_verification_notice.py +347 -0
  208. package/.agents/skills/_shared/pr-loop/.claude/CLAUDE.md +0 -1
  209. package/.agents/skills/_shared/pr-loop/audit-contract.md +0 -5
  210. package/.agents/skills/_shared/pr-loop/audit-reply-template.md +0 -5
  211. package/.agents/skills/_shared/pr-loop/code-rules-gate.md +0 -5
  212. package/.agents/skills/_shared/pr-loop/fix-protocol.md +0 -5
  213. package/.agents/skills/_shared/pr-loop/gh-payloads.md +0 -5
  214. package/.agents/skills/_shared/pr-loop/portable-driver.md +0 -149
  215. package/.agents/skills/_shared/pr-loop/post-audit-thread-contract.md +0 -5
  216. package/.agents/skills/_shared/pr-loop/precatch-rubric.md +0 -5
  217. package/.agents/skills/_shared/pr-loop/preflight-proposal.contract.test.mjs +0 -119
  218. package/.agents/skills/_shared/pr-loop/preflight-proposal.md +0 -5
  219. package/.agents/skills/_shared/pr-loop/prompts/.claude/CLAUDE.md +0 -1
  220. package/.agents/skills/_shared/pr-loop/prompts/AGENTS.md +0 -1
  221. package/.agents/skills/_shared/pr-loop/prompts/pr-consistency-audit.xml +0 -324
  222. package/.agents/skills/_shared/pr-loop/scripts/.claude/CLAUDE.md +0 -1
  223. package/.agents/skills/_shared/pr-loop/scripts/AGENTS.md +0 -1
  224. package/.agents/skills/_shared/pr-loop/scripts/RUNTIME_SCRIPTS.md +0 -29
  225. package/.agents/skills/_shared/pr-loop/scripts/_cli_utils.py +0 -22
  226. package/.agents/skills/_shared/pr-loop/scripts/_path_resolver.py +0 -186
  227. package/.agents/skills/_shared/pr-loop/scripts/_xml_utils.py +0 -20
  228. package/.agents/skills/_shared/pr-loop/scripts/audit_category_schema.py +0 -355
  229. package/.agents/skills/_shared/pr-loop/scripts/build_audit_prompt.py +0 -289
  230. package/.agents/skills/_shared/pr-loop/scripts/build_converge_task_list.py +0 -310
  231. package/.agents/skills/_shared/pr-loop/scripts/build_fix_prompt.py +0 -292
  232. package/.agents/skills/_shared/pr-loop/scripts/init_loop_state.py +0 -134
  233. package/.agents/skills/_shared/pr-loop/scripts/portable_converge_driver.py +0 -1646
  234. package/.agents/skills/_shared/pr-loop/scripts/preflight_worktree.py +0 -392
  235. package/.agents/skills/_shared/pr-loop/scripts/select_converge_pacer.py +0 -215
  236. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/.claude/CLAUDE.md +0 -1
  237. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/AGENTS.md +0 -1
  238. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/__init__.py +0 -0
  239. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/audit_category_schema_constants.py +0 -37
  240. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/converge_task_list_constants.py +0 -56
  241. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/handoff_constants.py +0 -45
  242. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/pacer_constants.py +0 -47
  243. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/path_resolver_constants.py +0 -157
  244. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/portable_driver_constants.py +0 -177
  245. package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/preflight_constants.py +0 -70
  246. package/.agents/skills/_shared/pr-loop/scripts/teardown_worktrees.py +0 -172
  247. package/.agents/skills/_shared/pr-loop/scripts/test__path_resolver.py +0 -106
  248. package/.agents/skills/_shared/pr-loop/scripts/test_audit_category_schema.py +0 -94
  249. package/.agents/skills/_shared/pr-loop/scripts/test_build_audit_prompt.py +0 -499
  250. package/.agents/skills/_shared/pr-loop/scripts/test_build_converge_task_list.py +0 -140
  251. package/.agents/skills/_shared/pr-loop/scripts/test_build_fix_prompt.py +0 -262
  252. package/.agents/skills/_shared/pr-loop/scripts/test_init_loop_state.py +0 -71
  253. package/.agents/skills/_shared/pr-loop/scripts/test_portable_converge_driver.py +0 -1119
  254. package/.agents/skills/_shared/pr-loop/scripts/test_preflight_worktree.py +0 -287
  255. package/.agents/skills/_shared/pr-loop/scripts/test_select_converge_pacer.py +0 -207
  256. package/.agents/skills/_shared/pr-loop/scripts/test_teardown_worktrees.py +0 -59
  257. package/.agents/skills/_shared/pr-loop/scripts/test_write_handoff.py +0 -201
  258. package/.agents/skills/_shared/pr-loop/scripts/write_audit_outcomes.py +0 -182
  259. package/.agents/skills/_shared/pr-loop/scripts/write_fix_outcomes.py +0 -206
  260. package/.agents/skills/_shared/pr-loop/scripts/write_handoff.py +0 -309
  261. package/.agents/skills/_shared/pr-loop/state-schema.md +0 -5
  262. package/.agents/skills/_shared/pr-loop/worker-spawn.md +0 -5
  263. package/.agents/skills/autoconverge/.claude/CLAUDE.md +0 -1
  264. package/.agents/skills/autoconverge/AGENTS.md +0 -1
  265. package/.agents/skills/autoconverge/SKILL.md +0 -431
  266. package/.agents/skills/autoconverge/reference/.claude/CLAUDE.md +0 -1
  267. package/.agents/skills/autoconverge/reference/AGENTS.md +0 -1
  268. package/.agents/skills/autoconverge/reference/closing-report.md +0 -93
  269. package/.agents/skills/autoconverge/reference/convergence-gates.md +0 -31
  270. package/.agents/skills/autoconverge/reference/convergence.md +0 -219
  271. package/.agents/skills/autoconverge/reference/copilot-findings.md +0 -51
  272. package/.agents/skills/autoconverge/reference/gotchas.md +0 -66
  273. package/.agents/skills/autoconverge/reference/headless-safety.md +0 -44
  274. package/.agents/skills/autoconverge/reference/multi-pr.md +0 -128
  275. package/.agents/skills/autoconverge/reference/self-closing-loop.md +0 -84
  276. package/.agents/skills/autoconverge/reference/stop-conditions.md +0 -127
  277. package/.agents/skills/autoconverge/test_portable_pacer_gate.py +0 -54
  278. package/.agents/skills/autoconverge/workflow/.claude/CLAUDE.md +0 -1
  279. package/.agents/skills/autoconverge/workflow/AGENTS.md +0 -1
  280. package/.agents/skills/autoconverge/workflow/aggregate_runs.py +0 -371
  281. package/.agents/skills/autoconverge/workflow/autoconverge_report_constants/.claude/CLAUDE.md +0 -1
  282. package/.agents/skills/autoconverge/workflow/autoconverge_report_constants/AGENTS.md +0 -1
  283. package/.agents/skills/autoconverge/workflow/autoconverge_report_constants/__init__.py +0 -0
  284. package/.agents/skills/autoconverge/workflow/autoconverge_report_constants/render_report_constants.py +0 -250
  285. package/.agents/skills/autoconverge/workflow/converge.clean-audit.test.mjs +0 -665
  286. package/.agents/skills/autoconverge/workflow/converge.codex-gate.test.mjs +0 -472
  287. package/.agents/skills/autoconverge/workflow/converge.contract.test.mjs +0 -64
  288. package/.agents/skills/autoconverge/workflow/converge.copilot-gate.test.mjs +0 -1009
  289. package/.agents/skills/autoconverge/workflow/converge.fix-progress.test.mjs +0 -107
  290. package/.agents/skills/autoconverge/workflow/converge.fix-recovery.test.mjs +0 -33
  291. package/.agents/skills/autoconverge/workflow/converge.merge-conflict.test.mjs +0 -15
  292. package/.agents/skills/autoconverge/workflow/converge.mjs +0 -3132
  293. package/.agents/skills/autoconverge/workflow/converge.p2-advance.test.mjs +0 -202
  294. package/.agents/skills/autoconverge/workflow/converge.path-aware.test.mjs +0 -47
  295. package/.agents/skills/autoconverge/workflow/converge.precatch.test.mjs +0 -152
  296. package/.agents/skills/autoconverge/workflow/converge.run-input.test.mjs +0 -116
  297. package/.agents/skills/autoconverge/workflow/converge_multi.mjs +0 -169
  298. package/.agents/skills/autoconverge/workflow/converge_multi.run-input.test.mjs +0 -173
  299. package/.agents/skills/autoconverge/workflow/convergence_summary.py +0 -110
  300. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-a11d903476b803493.jsonl +0 -2
  301. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-a26213978adeef6fb.jsonl +0 -2
  302. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-a3def0d15ed9d9110.jsonl +0 -2
  303. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-a41f41b1b708ee3b7.jsonl +0 -2
  304. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-a758b880abecc3ff7.jsonl +0 -2
  305. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-a8897b89656b1bd16.jsonl +0 -2
  306. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-ab1c2d3e4f5a6b7c8.jsonl +0 -2
  307. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-abd463d744a1437bc.jsonl +0 -2
  308. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/subagents/workflows/wf_881252e6-700/agent-ad19d027ae8ee1816.jsonl +0 -2
  309. package/.agents/skills/autoconverge/workflow/fixtures/wf_run/workflows/wf_881252e6-700.json +0 -266
  310. package/.agents/skills/autoconverge/workflow/render_report.py +0 -1024
  311. package/.agents/skills/autoconverge/workflow/test_aggregate_runs.py +0 -134
  312. package/.agents/skills/autoconverge/workflow/test_convergence_summary.py +0 -149
  313. package/.agents/skills/autoconverge/workflow/test_render_report.py +0 -812
  314. package/.agents/skills/hitl/SKILL.md +0 -45
  315. package/.agents/skills/pr-cleanup/SKILL.md +0 -140
  316. package/.agents/skills/pr-cleanup/reference/process-inventory.md +0 -17
  317. package/.agents/skills/pr-cleanup/reference/task-seeds.md +0 -22
  318. package/.agents/skills/pr-name-by-capability/SKILL.md +0 -73
  319. package/.agents/skills/pr-name-by-capability/reference/fetch-commands.md +0 -29
  320. package/.agents/skills/pr-name-by-capability/reference/offense-examples.md +0 -32
  321. package/.agents/skills/pr-name-by-capability/reference/report-template.md +0 -29
  322. package/.agents/skills/pr-name-by-capability/reference/rule-checklist.md +0 -38
  323. package/.agents/skills/pr-name-by-capability/reference/task-seeds.md +0 -10
  324. package/.agents/skills/pr-plain-language-cleanup/SKILL.md +0 -93
  325. package/.agents/skills/pr-refinement/SKILL.md +0 -31
  326. package/.agents/skills/pr-shared-extraction/SKILL.md +0 -177
  327. package/.agents/skills/pr-shared-extraction/reference/examples.md +0 -46
  328. package/.agents/skills/pr-shared-extraction/reference/offense-taxonomy.md +0 -100
  329. package/.agents/skills/pr-small-cl/SKILL.md +0 -52
  330. package/.agents/skills/pr-title-description/SKILL.md +0 -96
  331. package/.agents/skills/prototype/SKILL.md +0 -85
  332. package/.agents/skills/prototype/reference/honest-limitations.md +0 -23
  333. package/.agents/skills/prototype/reference/promotion-tasks.md +0 -23
  334. package/.agents/skills/prototype/scripts/build_sandbox_settings.py +0 -249
  335. package/.agents/skills/prototype/scripts/conftest.py +0 -15
  336. package/.agents/skills/prototype/scripts/launch_sandbox.py +0 -205
  337. package/.agents/skills/prototype/scripts/probe_sandbox_safety.py +0 -311
  338. package/.agents/skills/prototype/scripts/prototype_scripts_constants/__init__.py +0 -1
  339. package/.agents/skills/prototype/scripts/prototype_scripts_constants/config/__init__.py +0 -0
  340. package/.agents/skills/prototype/scripts/prototype_scripts_constants/config/build_sandbox_settings_constants.py +0 -41
  341. package/.agents/skills/prototype/scripts/prototype_scripts_constants/config/launch_sandbox_constants.py +0 -23
  342. package/.agents/skills/prototype/scripts/prototype_scripts_constants/config/probe_sandbox_safety_constants.py +0 -45
  343. package/.agents/skills/prototype/scripts/prototype_scripts_constants/config/prototype_common_constants.py +0 -10
  344. package/.agents/skills/prototype/scripts/test_build_sandbox_settings.py +0 -275
  345. package/.agents/skills/prototype/scripts/test_launch_sandbox.py +0 -303
  346. package/.agents/skills/prototype/scripts/test_probe_sandbox_safety.py +0 -312
  347. package/.agents/skills/prototype/workflows/promotion.md +0 -25
  348. package/.agents/skills/prototype/workflows/sandbox.md +0 -35
  349. package/.agents/skills/rebase/.claude/CLAUDE.md +0 -1
  350. package/.agents/skills/rebase/AGENTS.md +0 -1
  351. package/.agents/skills/rebase/SKILL.md +0 -178
  352. package/.agents/skills/review-router/SKILL.md +0 -51
  353. package/.agents/skills/review-router/reference/route-policy.json +0 -7
  354. package/.agents/skills/review-router/reference/task-seeds.md +0 -1
  355. package/.agents/skills/review-router/scripts/conftest.py +0 -4
  356. package/.agents/skills/review-router/scripts/review_router.py +0 -50
  357. package/.agents/skills/review-router/scripts/review_router_cli.py +0 -211
  358. package/.agents/skills/review-router/scripts/review_router_constants/__init__.py +0 -1
  359. package/.agents/skills/review-router/scripts/review_router_constants/config/__init__.py +0 -0
  360. package/.agents/skills/review-router/scripts/review_router_constants/config/constants.py +0 -13
  361. package/.agents/skills/review-router/scripts/test_review_router.py +0 -23
  362. package/.agents/skills/review-router/scripts/test_review_router_cli.py +0 -47
  363. package/.agents/skills/review-tier/SKILL.md +0 -56
  364. package/.agents/skills/review-tier/reference/task-seeds.md +0 -1
  365. package/.agents/skills/review-tier/reference/tier-policy.json +0 -9
  366. package/.agents/skills/review-tier/scripts/conftest.py +0 -4
  367. package/.agents/skills/review-tier/scripts/review_tier.py +0 -359
  368. package/.agents/skills/review-tier/scripts/review_tier_constants/__init__.py +0 -1
  369. package/.agents/skills/review-tier/scripts/review_tier_constants/config/__init__.py +0 -0
  370. package/.agents/skills/review-tier/scripts/review_tier_constants/config/constants.py +0 -29
  371. package/.agents/skills/review-tier/scripts/test_generation.py +0 -159
  372. package/.agents/skills/review-tier/scripts/test_review_tier.py +0 -33
  373. package/.agents/skills/run-claude-dev-env/SKILL.md +0 -84
  374. package/.agents/skills/session-log/.claude/CLAUDE.md +0 -1
  375. package/.agents/skills/session-log/AGENTS.md +0 -1
  376. package/.agents/skills/session-log/SKILL.md +0 -170
  377. package/.agents/skills/session-log/templates/frontmatter.md +0 -40
  378. package/.agents/skills/session-tidy/.claude/CLAUDE.md +0 -1
  379. package/.agents/skills/session-tidy/AGENTS.md +0 -1
  380. package/.agents/skills/session-tidy/SKILL.md +0 -191
  381. package/.agents/skills/skill-builder/references/.claude/CLAUDE.md +0 -1
  382. package/.agents/skills/skill-builder/references/AGENTS.md +0 -1
  383. package/.agents/skills/skill-builder/references/delegation-map.md +0 -130
  384. package/.agents/skills/skill-builder/references/description-field.md +0 -111
  385. package/.agents/skills/skill-builder/references/deterministic-elements.md +0 -218
  386. package/.agents/skills/skill-builder/references/progressive-disclosure.md +0 -122
  387. package/.agents/skills/skill-builder/references/self-audit-checklist.md +0 -126
  388. package/.agents/skills/skill-builder/references/skill-modularity.md +0 -111
  389. package/.agents/skills/skill-builder/references/skill-types.md +0 -232
  390. package/.agents/skills/skill-builder/references/thariq-x-post-skills.json +0 -33
  391. package/.agents/skills/skill-builder/templates/.claude/CLAUDE.md +0 -1
  392. package/.agents/skills/skill-builder/templates/AGENTS.md +0 -1
  393. package/.agents/skills/skill-builder/templates/gap-analysis.md +0 -87
  394. package/.agents/skills/skill-builder/workflows/.claude/CLAUDE.md +0 -1
  395. package/.agents/skills/skill-builder/workflows/AGENTS.md +0 -1
  396. package/.agents/skills/skill-builder/workflows/improve-skill.md +0 -136
  397. package/.agents/skills/skill-builder/workflows/new-skill.md +0 -179
  398. package/.agents/skills/skill-builder/workflows/polish-skill.md +0 -139
  399. package/.agents/skills/source-command-sr-loop/SKILL.md +0 -82
  400. package/.agents/skills/update/.claude/CLAUDE.md +0 -1
  401. package/.agents/skills/update/AGENTS.md +0 -1
  402. package/.agents/skills/update/SKILL.md +0 -190
  403. package/_shared/pr-loop/AGENTS.md +0 -1
  404. package/_shared/pr-loop/audit-contract.md +0 -183
  405. package/_shared/pr-loop/audit-reply-template.md +0 -151
  406. package/_shared/pr-loop/code-rules-gate.md +0 -65
  407. package/_shared/pr-loop/fix-protocol.md +0 -60
  408. package/_shared/pr-loop/gh-payloads.md +0 -75
  409. package/_shared/pr-loop/post-audit-thread-contract.md +0 -51
  410. package/_shared/pr-loop/precatch-rubric.md +0 -66
  411. package/_shared/pr-loop/preflight-proposal.md +0 -56
  412. package/_shared/pr-loop/scripts/post_audit_thread.py +0 -1242
  413. package/_shared/pr-loop/scripts/pr_loop_shared_constants/post_audit_thread_constants.py +0 -199
  414. package/_shared/pr-loop/scripts/tests/test_post_audit_thread.py +0 -1115
  415. package/_shared/pr-loop/scripts/tests/test_post_audit_thread_constants.py +0 -129
  416. package/_shared/pr-loop/state-schema.md +0 -45
  417. package/_shared/pr-loop/worker-spawn.md +0 -189
  418. package/hooks/blocking/ask_user_question_shape_blocker.py +0 -83
  419. package/hooks/blocking/bot_mention_comment_blocker.py +0 -76
  420. package/hooks/blocking/claude_md_orphan_file_blocker.py +0 -129
  421. package/hooks/blocking/cursor_cli_python_misfire_blocker.py +0 -108
  422. package/hooks/blocking/destructive_command_blocker.py +0 -2073
  423. package/hooks/blocking/fable_spawn_gate.py +0 -187
  424. package/hooks/blocking/luna_fast_mode_gate.py +0 -160
  425. package/hooks/blocking/nas_ssh_binary_enforcer.py +0 -163
  426. package/hooks/blocking/orchestrator_refresh_reschedule_gate.py +0 -260
  427. package/hooks/blocking/package_inventory_stale_blocker.py +0 -107
  428. package/hooks/blocking/pii_prevention_blocker.py +0 -365
  429. package/hooks/blocking/piped_pytest_blocker.py +0 -1223
  430. package/hooks/blocking/question_to_user_enforcer.py +0 -130
  431. package/hooks/blocking/send_user_file_open_locally_blocker.py +0 -71
  432. package/hooks/blocking/sensitive_file_protector.py +0 -167
  433. package/hooks/blocking/session_edit_stage_gate.py +0 -684
  434. package/hooks/blocking/session_handoff_blocker.py +0 -182
  435. package/hooks/blocking/shell_substitution_blocker.py +0 -350
  436. package/hooks/blocking/test_ask_user_question_shape.py +0 -69
  437. package/hooks/blocking/test_bot_mention_comment_blocker.py +0 -131
  438. package/hooks/blocking/test_claude_md_orphan_file_blocker.py +0 -1277
  439. package/hooks/blocking/test_cursor_cli_python_misfire_blocker.py +0 -208
  440. package/hooks/blocking/test_destructive_command_blocker.py +0 -2024
  441. package/hooks/blocking/test_destructive_command_blocker_deny_mode.py +0 -105
  442. package/hooks/blocking/test_destructive_command_blocker_no_verify.py +0 -122
  443. package/hooks/blocking/test_destructive_command_blocker_patterns.py +0 -133
  444. package/hooks/blocking/test_fable_spawn_gate.py +0 -381
  445. package/hooks/blocking/test_inventory_deadlock_resolution.py +0 -154
  446. package/hooks/blocking/test_luna_fast_mode_gate.py +0 -211
  447. package/hooks/blocking/test_nas_ssh_binary_enforcer.py +0 -225
  448. package/hooks/blocking/test_orchestrator_refresh_reschedule_gate.py +0 -231
  449. package/hooks/blocking/test_package_inventory_stale_blocker.py +0 -382
  450. package/hooks/blocking/test_pii_prevention_blocker.py +0 -1222
  451. package/hooks/blocking/test_pii_prevention_windows_git_path.py +0 -41
  452. package/hooks/blocking/test_pii_write_surface_ephemeral.py +0 -221
  453. package/hooks/blocking/test_piped_pytest_blocker.py +0 -587
  454. package/hooks/blocking/test_precommit_code_rules_gate_native_owner.py +0 -233
  455. package/hooks/blocking/test_question_to_user_enforcer.py +0 -169
  456. package/hooks/blocking/test_send_user_file_open_locally_blocker.py +0 -118
  457. package/hooks/blocking/test_sensitive_file_protector.py +0 -365
  458. package/hooks/blocking/test_session_edit_stage_gate.py +0 -537
  459. package/hooks/blocking/test_session_edit_stage_gate_staging.py +0 -64
  460. package/hooks/blocking/test_session_edit_stage_gate_support.py +0 -204
  461. package/hooks/blocking/test_session_edit_stage_gate_tracker.py +0 -116
  462. package/hooks/blocking/test_session_handoff_blocker.py +0 -318
  463. package/hooks/blocking/test_shell_substitution_blocker.py +0 -298
  464. package/hooks/blocking/test_unscoped_search_blocker.py +0 -102
  465. package/hooks/blocking/test_write_existing_file_blocker.py +0 -122
  466. package/hooks/blocking/tests/test_pii_prevention_blocker.py +0 -259
  467. package/hooks/blocking/unscoped_search_blocker.py +0 -391
  468. package/hooks/blocking/write_existing_file_blocker.py +0 -124
  469. package/hooks/hooks_constants/bot_mention_comment_blocker_constants.py +0 -19
  470. package/hooks/hooks_constants/cursor_cli_python_misfire_blocker_constants.py +0 -79
  471. package/hooks/hooks_constants/fable_spawn_gate_constants.py +0 -61
  472. package/hooks/hooks_constants/luna_fast_mode_gate_constants.py +0 -45
  473. package/hooks/hooks_constants/nas_ssh_binary_enforcer_constants.py +0 -20
  474. package/hooks/hooks_constants/orchestrator_refresh_reschedule_gate_constants.py +0 -57
  475. package/hooks/hooks_constants/send_user_file_open_locally_blocker_constants.py +0 -17
  476. package/hooks/hooks_constants/sensitive_file_protector_constants.py +0 -40
  477. package/hooks/hooks_constants/session_handoff_blocker_constants.py +0 -10
  478. package/hooks/hooks_constants/shell_substitution_blocker_constants.py +0 -80
  479. /package/.agents/skills/{_shared/pr-loop → session-continuity}/AGENTS.md +0 -0
  480. /package/{_shared/pr-loop → .agents/skills/session-continuity}/CLAUDE.md +0 -0
@@ -1,111 +0,0 @@
1
- # Skill modularity and composition
2
-
3
- Source: [Lessons from Building Claude Code](thariq-x-post-skills.json) — Composing Skills; skill type notes on skill dependencies; Anthropic progressive disclosure (within-skill layering).
4
-
5
- ## Two modularity layers
6
-
7
- | Layer | What it controls | Where enforced |
8
- |---|---|---|
9
- | **Within skill** | SKILL.md stays a hub; detail lives in companion files | `progressive-disclosure.md`, self-audit line-cap items |
10
- | **Across skills** | One skill = one capability; multi-step work invokes sibling skills by name | This file, self-audit modularity items, new/improve workflows |
11
-
12
- Both layers apply. Progressive disclosure alone does not make a multi-capability skill modular.
13
-
14
- ## Core rules
15
-
16
- ### One capability per skill
17
-
18
- A skill owns **one** clear job a user can name in one sentence. Signals it is too large:
19
-
20
- - Description needs "and" for unrelated jobs
21
- - Process has independent branches that never share gotchas or scripts
22
- - Claude B only ever needs half the package for a typical task
23
- - Gotchas cluster into two or more unrelated failure domains
24
-
25
- When those hold, split or restructure as an orchestrator + sub-skills (below).
26
-
27
- ### Compose by name (sub-skills)
28
-
29
- > "You can just reference other skills by name, and the model will invoke them if they are installed."
30
-
31
- There is no native dependency installer. Composition works by:
32
-
33
- 1. Naming the sibling skill (`/skill-name` or the skill's trigger description).
34
- 2. Stating **when** to invoke it (which process step).
35
- 3. Stating **what** it must produce for the next step.
36
- 4. Stating what to do if it is missing (refuse, degrade, or ask the user).
37
-
38
- **Sub-skill** means a focused skill another skill invokes — not a nested folder inside the parent package. Sub-skills are peer skills in the skill library.
39
-
40
- ### Prefer invoke over reimplement
41
-
42
- When an existing skill already owns a step (PR scope resolve, self-audit handoff pattern, commit protocol, etc.), the new skill **names and invokes** that skill. It does not paste a second copy of that process into its own SKILL.md.
43
-
44
- Exception: the existing skill is wrong for this domain, and the gap analysis records why a local procedure is required.
45
-
46
- ### Orchestrator skills
47
-
48
- Some capabilities are multi-step by nature (lifecycle skills, PR loops). The modular shape is:
49
-
50
- ```
51
- orchestrator-skill/ # thin: routing, order, refusal, handoff packets
52
- SKILL.md # invokes named sub-skills at each step
53
- sibling-skill-a/ # one capability
54
- sibling-skill-b/ # one capability
55
- ```
56
-
57
- The orchestrator owns sequence and gates. Sub-skills own domain detail. skill-builder itself follows this shape: it orchestrates and delegates writing to the `skill-writer-agent` agent (spawned via the Agent tool).
58
-
59
- ### Within-skill vs split
60
-
61
- | Situation | Choice |
62
- |---|---|
63
- | One capability, large reference surface | Stay one skill; use progressive disclosure |
64
- | Two capabilities that users invoke separately | Two skills |
65
- | Multi-step workflow that always runs end-to-end | Orchestrator skill + named sub-skills for reusable steps |
66
- | Overlap with an existing skill | Shrink the new skill; invoke the existing one; tighten both descriptions |
67
-
68
- ## Composition plan (required before write)
69
-
70
- Every new skill and every improve pass that changes scope records a composition plan in the gap analysis:
71
-
72
- 1. **Capability sentence** — one job.
73
- 2. **Related skills inventory** — existing skills that touch the same domain (scan installed skills and the package tree).
74
- 3. **Reuse** — which steps invoke which skills.
75
- 4. **Split** — if more than one capability, list the skills to create or keep separate.
76
- 5. **Missing** — sub-skills that do not exist yet (build them first or as sibling packages in the same change).
77
-
78
- ## How to document sub-skills in SKILL.md
79
-
80
- In Process or a dedicated **Sub-skills** section:
81
-
82
- ```markdown
83
- ## Sub-skills
84
-
85
- | Skill | When | Produces |
86
- |---|---|---|
87
- | `/reviewer-gates` | Step 1 — gate external reviewers | opt-out, Copilot quota, Bugbot trigger decisions |
88
-
89
- If a listed skill is not installed, respond: `[exact refusal or degrade line]`.
90
- ```
91
-
92
- Self-audit requires this table (or equivalent) whenever the skill composes others. skill-builder itself delegates SKILL.md authoring to the `skill-writer-agent` agent, spawned via the Agent tool.
93
-
94
- ## Anti-patterns
95
-
96
- - **Monolith skill** — one package that reimplements commit, review, deploy, and logging under one description.
97
- - **Silent reimplementation** — copy-pasted steps from another skill with no name reference.
98
- - **Folder nesting as composition** — burying a second skill's content under `workflows/` instead of a real sibling skill the model can select.
99
- - **Vague dependency** — "use other skills as needed" with no names, when, or outputs.
100
- - **Redundant twin** — a new skill whose description overlaps an existing one without a refusal boundary.
101
-
102
- ## Task seeds for authors
103
-
104
- Register each item as a session task during new-skill Gather and improve Diagnose (`TaskCreate` / `TodoWrite`). Complete with evidence. Do not track as markdown checkboxes.
105
-
106
- - Capability fits one sentence without an unrelated "and"
107
- - Related skills scanned; inventory written
108
- - Reusable steps map to named skills (or justify local procedure)
109
- - Multi-capability work is split or is an orchestrator with sub-skills
110
- - SKILL.md will name each sub-skill with when + produces + missing behavior
111
-
@@ -1,232 +0,0 @@
1
- # Skill Types
2
-
3
- Source: [Lessons from Building Claude Code: How We Use Skills](thariq-x-post-skills.json)
4
-
5
- > "After cataloging all of our skills, we noticed they cluster into a few recurring categories. The best skills fit cleanly into one; the more confusing ones straddle several."
6
-
7
- ## Type taxonomy
8
-
9
- For each type: what it is, recommended folder structure, primary needs.
10
-
11
- ### 1. Library & API Reference
12
-
13
- Skills that explain how to correctly use a library, CLI, or SDK.
14
-
15
- > "These could be both for internal libraries or common libraries that Claude Code sometimes has trouble with."
16
-
17
- **Examples:** `billing-lib` (internal billing library: edge cases, footguns), `internal-platform-cli` (every subcommand with usage examples), `frontend-design` (design system guidance)
18
-
19
- **Folder structure:**
20
- ```
21
- skill-name/
22
- ├── SKILL.md # Quick start + gotchas
23
- ├── reference/ # API surface, method signatures
24
- │ └── api.md
25
- └── examples/ # Copy-pasteable code snippets
26
- └── snippets.md
27
- ```
28
-
29
- **Primary needs:** Reference docs, gotchas, code examples.
30
-
31
- ---
32
-
33
- ### 2. Product Verification
34
-
35
- Skills that describe how to test or verify that code is working.
36
-
37
- > "Verification skills are extremely useful for ensuring Claude's output is correct. It can be worth having an engineer spend a week just making your verification skills excellent."
38
-
39
- **Examples:** `signup-flow-driver`, `checkout-verifier`, `tmux-cli-driver`
40
-
41
- **Folder structure:**
42
- ```
43
- skill-name/
44
- ├── SKILL.md # Verification workflow + checklists
45
- ├── scripts/ # Verification scripts, assertions
46
- │ ├── verify.py
47
- │ └── assert_state.py
48
- └── reference/ # Expected states, test data
49
- └── expected-behavior.md
50
- ```
51
-
52
- **Primary needs:** Scripts for verification, assertion libraries, state-checking patterns.
53
-
54
- ---
55
-
56
- ### 3. Data Fetching & Analysis
57
-
58
- Skills that connect to data and monitoring stacks.
59
-
60
- > "These skills might include libraries to fetch your data with credentials, specific dashboard ids, etc. as well as instructions on common workflows or ways to get data."
61
-
62
- **Examples:** `funnel-query`, `cohort-compare`, `grafana`
63
-
64
- **Folder structure:**
65
- ```
66
- skill-name/
67
- ├── SKILL.md # Common queries + gotchas
68
- ├── reference/ # Table schemas, dashboard IDs, query patterns
69
- │ ├── schemas.md
70
- │ └── dashboards.md
71
- └── scripts/ # Data fetching helpers
72
- └── query_helpers.py
73
- ```
74
-
75
- **Primary needs:** Schema references, query patterns, credential setup instructions.
76
-
77
- ---
78
-
79
- ### 4. Business Process & Team Automation
80
-
81
- Skills that automate repetitive workflows into one command.
82
-
83
- > "For these skills, saving previous results in log files can help the model stay consistent and reflect on previous executions of the workflow."
84
-
85
- **Examples:** `standup-post`, `create-<ticket>-ticket`, `weekly-recap`
86
-
87
- **Folder structure:**
88
- ```
89
- skill-name/
90
- ├── SKILL.md # Workflow steps + templates
91
- ├── templates/ # Output templates
92
- │ └── post-template.md
93
- └── scripts/ # Automation helpers
94
- └── fetch_activity.py
95
- ```
96
-
97
- **Primary needs:** Workflow steps, output templates, state persistence.
98
-
99
- ---
100
-
101
- ### 5. Code Scaffolding & Templates
102
-
103
- Skills that generate framework boilerplate.
104
-
105
- > "They are especially useful when your scaffolding has natural language requirements that can't be purely covered by code."
106
-
107
- **Examples:** `new-workflow`, `new-migration`, `create-app`
108
-
109
- **Folder structure:**
110
- ```
111
- skill-name/
112
- ├── SKILL.md # Scaffolding workflow
113
- ├── templates/ # File templates (copy + fill)
114
- │ ├── handler.py.tmpl
115
- │ └── test.py.tmpl
116
- └── scripts/ # Scaffolding scripts
117
- └── scaffold.py
118
- ```
119
-
120
- **Primary needs:** Templates, naming conventions, file placement rules.
121
-
122
- ---
123
-
124
- ### 6. Code Quality & Review
125
-
126
- Skills that enforce code quality and help review code.
127
-
128
- > "These can include deterministic scripts or tools for maximum robustness. You may want to run these skills automatically as part of hooks or inside of a GitHub Action."
129
-
130
- **Examples:** `adversarial-review`, `code-style`, `testing-practices`
131
-
132
- **Folder structure:**
133
- ```
134
- skill-name/
135
- ├── SKILL.md # Review protocol + severity rubric
136
- ├── reference/ # Category definitions, examples
137
- │ └── categories.md
138
- └── scripts/ # Deterministic validators
139
- └── lint_check.py
140
- ```
141
-
142
- **Primary needs:** Rubrics, scripts for deterministic checks, severity classification.
143
-
144
- ---
145
-
146
- ### 7. CI/CD & Deployment
147
-
148
- Skills that help fetch, push, and deploy code.
149
-
150
- > "These skills may reference other skills to collect data."
151
-
152
- Compose peer skills by name (see `skill-modularity.md`). Do not paste those peers' procedures into this package.
153
-
154
- **Examples:** `babysit-pr`, `deploy-<service>`, `cherry-pick-prod`
155
-
156
- **Folder structure:**
157
- ```
158
- skill-name/
159
- ├── SKILL.md # Deployment workflow + safety gates
160
- ├── workflows/ # Sub-workflows for different scenarios
161
- │ └── rollback.md
162
- └── scripts/ # Deployment scripts
163
- ├── smoke_test.py
164
- └── rollout.py
165
- ```
166
-
167
- **Primary needs:** Safety gates, rollback procedures, step-by-step checklists.
168
-
169
- ---
170
-
171
- ### 8. Runbooks
172
-
173
- Skills that take a symptom and walk through investigation.
174
-
175
- > "Skills that take a symptom (such as a Slack thread, alert, or error signature), walk through a multi-tool investigation, and produce a structured report."
176
-
177
- **Examples:** `<service>-debugging`, `oncall-runner`, `log-correlator`
178
-
179
- **Folder structure:**
180
- ```
181
- skill-name/
182
- ├── SKILL.md # Symptom → investigation mapping
183
- ├── reference/ # Query patterns, known issues
184
- │ ├── query-patterns.md
185
- │ └── known-issues.md
186
- └── templates/ # Report template
187
- └── finding-template.md
188
- ```
189
-
190
- **Primary needs:** Symptom-to-query mapping, known issues catalog, report format.
191
-
192
- ---
193
-
194
- ### 9. Infrastructure Operations
195
-
196
- Skills that perform routine maintenance and operational procedures.
197
-
198
- > "Some of which involve destructive actions that benefit from guardrails. These make it easier for engineers to follow best practices in critical operations."
199
-
200
- **Examples:** `<resource>-orphans`, `dependency-management`, `cost-investigation`
201
-
202
- **Folder structure:**
203
- ```
204
- skill-name/
205
- ├── SKILL.md # Operation steps + safety confirmations
206
- ├── reference/ # Resource naming patterns, policies
207
- │ └── resources.md
208
- └── scripts/ # Cleanup/investigation scripts
209
- └── find_orphans.py
210
- ```
211
-
212
- **Primary needs:** Safety guardrails, confirmation gates, resource identification patterns.
213
-
214
- ---
215
-
216
- ## Routing table
217
-
218
- | User says... | Likely type |
219
- |---|---|
220
- | "Claude keeps using the wrong API" | 1. Library & API Reference |
221
- | "I need to verify Claude's output" | 2. Product Verification |
222
- | "Claude needs to query our data" | 3. Data Fetching & Analysis |
223
- | "Automate this repetitive workflow" | 4. Business Process & Team Automation |
224
- | "Generate boilerplate for new X" | 5. Code Scaffolding & Templates |
225
- | "Enforce code quality / review PRs" | 6. Code Quality & Review |
226
- | "Deploy / push / merge automation" | 7. CI/CD & Deployment |
227
- | "Investigate / debug when X happens" | 8. Runbooks |
228
- | "Manage infrastructure / cleanup" | 9. Infrastructure Operations |
229
-
230
- When the skill straddles multiple types, pick the dominant one for folder structure and note the secondary influence.
231
-
232
- If it straddles **capabilities** (not just types), split into separate skills or a thin orchestrator plus sub-skills — see `skill-modularity.md`. Frontmatter `description` stays a trigger catalog for whichever package owns the job — see `description-field.md`.
@@ -1,33 +0,0 @@
1
- {
2
- "post": {
3
- "url": "https://x.com/trq212/status/2033949937936085378",
4
- "author": {
5
- "name": "Thariq",
6
- "handle": "@trq212",
7
- "profile_image": "https://pbs.twimg.com/profile_images/1976939058741039104/r3GgzqRh_bigger.jpg"
8
- },
9
- "title": "Lessons from Building Claude Code: How We Use Skills",
10
- "date": "12:53 PM · Mar 17, 2026",
11
- "metrics": {
12
- "replies": 383,
13
- "reposts": "2.8K",
14
- "likes": "16K",
15
- "views": "6.8M",
16
- "bookmarks": "44K"
17
- },
18
- "content": "Lessons from Building Claude Code: How We Use Skills\n\nSkills have become one of the most used extension points in Claude Code. They're flexible, easy to make, and simple to distribute.\n\nBut this flexibility also makes it hard to know what works best. What type of skills are worth making? What's the secret to writing a good skill? When do you share them with others?\n\nWe've been using skills in Claude Code extensively at Anthropic with hundreds of them in active use. These are the lessons we've learned about using skills to accelerate our development.\n\nWhat are Skills?\nIf you're new to skills, I'd recommend reading our docs or watching our newest course on new Skilljar on Agent Skills, this post will assume you already have some familiarity with skills.\n\nA common misconception we hear about skills is that they are \"just markdown files\", but the most interesting part of skills is that they're not just text files. They're folders that can include scripts, assets, data, etc. that the agent can discover, explore and manipulate.\n\nIn Claude Code, skills also have a wide variety of configuration options including registering dynamic hooks.\n\nWe've found that some of the most interesting skills in Claude Code use these configuration options and folder structure creatively.\n\nTypes of Skills\nAfter cataloging all of our skills, we noticed they cluster into a few recurring categories. The best skills fit cleanly into one; the more confusing ones straddle several. This isn't a definitive list, but it is a good way to think about if you're missing any inside of your org.\n\n1. Library & API Reference\nSkills that explain how to correctly use a library, CLI, or SDKs. These could be both for internal libraries or common libraries that Claude Code sometimes has trouble with. These skills often included a folder of reference code snippets and a list of gotchas for Claude to avoid when writing a script.\nExamples:\n- billing-lib — your internal billing library: edge cases, footguns, etc.\n- internal-platform-cli — every subcommand of your internal CLI wrapper with examples on when to use them\n- frontend-design — make Claude better at your design system\n\n2. Product Verification\nSkills that describe how to test or verify that your code is working. These are often paired with an external tool like playwright, tmux, etc. for doing the verification.\nVerification skills are extremely useful for ensuring Claude's output is correct. It can be worth having an engineer spend a week just making your verification skills excellent.\nConsider techniques like having Claude record a video of its output so you can see exactly what it tested, or enforcing programmatic assertions on state at each step. These are often done by including a variety of scripts in the skill.\nExamples:\n- signup-flow-driver — runs through signup → email verify → onboarding in a headless browser, with hooks for asserting state at each step\n- checkout-verifier — drives the checkout UI with Stripe test cards, verifies the invoice actually lands in the right state\n- tmux-cli-driver — for interactive CLI testing where the thing you're verifying needs a TTY\n\n3. Data Fetching & Analysis\nSkills that connect to your data and monitoring stacks. These skills might include libraries to fetch your data with credentials, specific dashboard ids, etc. as well as instructions on common workflows or ways to get data.\nExamples:\n- funnel-query — \"which events do I join to see signup → activation → paid\" plus the table that actually has the canonical user_id\n- cohort-compare — compare two cohorts' retention or conversion, flag statistically significant deltas, link to the segment definitions\n- grafana — datasource UIDs, cluster names, problem → dashboard lookup table\n\n4. Business Process & Team Automation\nSkills that automate repetitive workflows into one command. These skills are usually fairly simple instructions but might have more complicated dependencies on other skills or MCPs. For these skills, saving previous results in log files can help the model stay consistent and reflect on previous executions of the workflow.\nExamples:\n- standup-post — aggregates your ticket tracker, GitHub activity, and prior Slack → formatted standup, delta-only\n- create-<ticket-system>-ticket — enforces schema (valid enum values, required fields) plus post-creation workflow (ping reviewer, link in Slack)\n- weekly-recap — merged PRs + closed tickets + deploys → formatted recap post\n\n5. Code Scaffolding & Templates\nSkills that generate framework boilerplate for a specific function in codebase. You might combine these skills with scripts that can be composed. They are especially useful when your scaffolding has natural language requirements that can't be purely covered by code.\nExamples:\n- new-<framework>-workflow — scaffolds a new service/workflow/handler with your annotations\n- new-migration — your migration file template plus common gotchas\n- create-app — new internal app with your auth, logging, and deploy config pre-wired\n\n6. Code Quality & Review\nSkills that enforce code quality inside of your org and help review code. These can include deterministic scripts or tools for maximum robustness. You may want to run these skills automatically as part of hooks or inside of a GitHub Action.\n- adversarial-review — spawns a fresh-eyes subagent to critique, implements fixes, iterates until findings degrade to nitpicks\n- code-style — enforces code style, especially styles that Claude does not do well by default.\n- testing-practices — instructions on how to write tests and what to test.\n\n7. CI/CD & Deployment\nSkills that help you fetch, push, and deploy code inside of your codebase. These skills may reference other skills to collect data.\nExamples:\n- babysit-pr — monitors a PR → retries flaky CI → resolves merge conflicts → enables auto-merge\n- deploy-<service> — build → smoke test → gradual traffic rollout with error-rate comparison → auto-rollback on regression\n- cherry-pick-prod — isolated worktree → cherry-pick → conflict resolution → PR with template\n\n8. Runbooks\nSkills that take a symptom (such as a Slack thread, alert, or error signature), walk through a multi-tool investigation, and produce a structured report.\nExamples:\n- <service>-debugging — maps symptoms → tools → query patterns for your highest-traffic services\n- oncall-runner — fetches the alert → checks the usual suspects → formats a finding\n- log-correlator — given a request ID, pulls matching logs from every system that might have touched it\n\n9. Infrastructure Operations\nSkills that perform routine maintenance and operational procedures — some of which involve destructive actions that benefit from guardrails. These make it easier for engineers to follow best practices in critical operations.\nExamples:\n- <resource>-orphans — finds orphaned pods/volumes → posts to Slack → soak period → user confirms → cascading cleanup\n- dependency-management — your org's dependency approval workflow\n- cost-investigation — \"why did our storage/egress bill spike\" with the specific buckets and query patterns\n\nTips for Making Skills\nOnce you've decided on the skill to make, how do you write it? These are some of the best practices, tips, and tricks we've found.\nWe also recently released Skill Creator to make it easier to create skills in Claude Code.\n\nDon't State the Obvious\nClaude Code knows a lot about your codebase, and Claude knows a lot about coding, including many default opinions. If you're publishing a skill that is primarily about knowledge, try to focus on information that pushes Claude out of its normal way of thinking.\nThe frontend design skill is a great example — it was built by one of the engineers at Anthropic by iterating with customers on improving Claude's design taste, avoiding classic patterns like the Inter font and purple gradients.\n\nBuild a Gotchas Section\nThe 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. Ideally, you will update your skill over time to capture these gotchas.\n\nUse the File System & Progressive Disclosure\nLike we said earlier, a skill is a folder, not just a markdown file. You should think of the entire file system as a form of context engineering and progressive disclosure. Tell Claude what files are in your skill, and it will read them at appropriate times.\nThe simplest form of progressive disclosure is to point to other markdown files for Claude to use. For example, you may split detailed function signatures and usage examples into references/api.md.\nAnother example: if your end output is a markdown file, you might include a template file for it in assets/ to copy and use.\nYou can have folders of references, scripts, examples, etc., which help Claude work more effectively.\n\nAvoid Railroading Claude\nClaude will generally try to stick to your instructions, and because Skills are so reusable you'll want to be careful of being too specific in your instructions. Give Claude the information it needs, but give it the flexibility to adapt to the situation.\n\nThink through the Setup\nSome skills may need to be set up with context from the user. For example, if you are making a skill that posts your standup to Slack, you may want Claude to ask which Slack channel to post it in.\nA good pattern to do this is to store this setup information in a config.json file in the skill directory like the above example. If the config is not set up, the agent can then ask the user for information.\nIf you want the agent to present structured, multiple choice questions you can instruct Claude to use the AskUserQuestion tool.\n\nThe Description Field Is For the Model\nWhen Claude Code starts a session, it builds a listing of every available skill with its description. This listing is what Claude scans to decide \"is there a skill for this request?\" Which means the description field is not a summary — it's a description of when to trigger this PR.\n\nMemory & Storing Data\nSome skills can include a form of memory by storing data within them. You could store data in anything as simple as an append only text log file or JSON files, or as complicated as a SQLite database.\nFor example, a standup-post skill might keep a standups.log with every post it's written, which means the next time you run it, Claude reads its own history and can tell what's changed since yesterday.\nData stored in the skill directory may be deleted when you upgrade the skill, so you should store this in a stable folder, as of today we provide `${CLAUDE_PLUGIN_DATA}` as a stable folder per plugin to store data in.\n\nStore Scripts & Generate Code\nOne of the most powerful tools you can give Claude is code. Giving Claude scripts and libraries lets Claude spend its turns on composition, deciding what to do next rather than reconstructing boilerplate.\nFor example, in your data science skill you might have a library of functions to fetch data from your event source. In order for Claude to do complex analysis, you could give it a set of helper functions like so:\nClaude can then generate scripts on the fly to compose this functionality to do more advanced analysis for prompts like \"What happened on Tuesday?\"\n\nOn Demand Hooks\nSkills can include hooks that are only activated when the skill is called, and last for the duration of the session. Use this for more opinionated hooks that you don't want to run all the time, but are extremely useful sometimes.\nFor example:\n- /careful — blocks rm -rf, DROP TABLE, force-push, kubectl delete via PreToolUse matcher on Bash. You only want this when you know you're touching prod — having it always on would drive you insane\n- /freeze — blocks any Edit/Write that's not in a specific directory. Useful when debugging: \"I want to add logs but I keep accidentally 'fixing' unrelated\"\n\nDistributing Skills\nOne of the biggest benefits of Skills is that you can share them with the rest of your team.\nThere are two ways you might to share skills with others:\n- check your skills into your repo (under ./.claude/skills)\n- make a plugin and have a Claude Code Plugin marketplace where users can upload and install plugins (read more on the documentation here)\nFor smaller teams working across relatively few repos, checking your skills into repos works well. But every skill that is checked in also adds a little bit to the context of the model. As you scale, an internal plugin marketplace allows you to distribute skills and let your team decide which ones to install.\n\nManaging a Marketplace\nHow do you decide which skills go in a marketplace? How do people submit them?\nWe don't have a centralized team that decides; instead we try and find the most useful skills organically. If you have a skill that you want people to try out, you can upload it to a sandbox folder in GitHub and point people to it in Slack or other forums.\nOnce a skill has gotten traction (which is up to the skill owner to decide), they can put in a PR to move it into the marketplace.\nA note of warning, it can be quite easy to create bad or redundant skills, so making sure you have some method of curation before release is important.\n\nComposing Skills\nYou may want to have skills that depend on each other. For example, you may have a file upload skill that uploads a file, and a CSV generation skill that makes a CSV and uploads it. This sort of dependency management is not natively built into marketplaces or skills yet, but you can just reference other skills by name, and the model will invoke them if they are installed.\n\nMeasuring Skills\nTo understand how a skill is doing, we use a PreToolUse hook that lets us log skill usage within the company (example code here). This means we can find skills that are popular or are undertriggering compared to our expectations.\n\nConclusion\nSkills are incredibly powerful, flexible tools for agents, but it's still early and we're all figuring out how to use them best.\nThink of this more as a grab bag of useful tips that we've seen work than a definitive guide. The best way to understand skills is to get started, experiment, and see what works for you. Most of ours began as a few lines and a single gotcha, and got better because people kept adding to them as Claude hit new edge cases.\nI hope this was helpful, let me know if you have any questions.",
19
- "images": [
20
- "https://x.com/trq212/article/2033949937936085378/media/2033787061128581120",
21
- "https://x.com/trq212/article/2033949937936085378/media/2033778969078861826",
22
- "https://x.com/trq212/article/2033949937936085378/media/2033949742137544704",
23
- "https://x.com/trq212/article/2033949937936085378/media/2033779922590961669",
24
- "https://x.com/trq212/article/2033949937936085378/media/2033780423952896002",
25
- "https://x.com/trq212/article/2033949937936085378/media/2033780654052413443",
26
- "https://x.com/trq212/article/2033949937936085378/media/2033780772872851462",
27
- "https://x.com/trq212/article/2033949937936085378/media/2033780836705964036",
28
- "https://x.com/trq212/article/2033949937936085378/media/2033947639721693189",
29
- "https://x.com/trq212/article/2033949937936085378/media/2033781427637293056",
30
- "https://x.com/trq212/article/2033949937936085378/media/2033781485233491968"
31
- ]
32
- }
33
- }
@@ -1 +0,0 @@
1
- @../AGENTS.md
@@ -1,87 +0,0 @@
1
- # Gap Analysis: [Skill Name]
2
-
3
- ## Skill Type
4
-
5
- [One of the 9 types from skill-types.md. Determines folder structure.]
6
-
7
- ## Task Description
8
-
9
- [One capability sentence — the single job this skill owns]
10
-
11
- ## Degree of Freedom
12
-
13
- [High | Medium | Low] — [Reasoning based on task fragility and variability]
14
-
15
- ## Composition Plan
16
-
17
- See `references/skill-modularity.md`.
18
-
19
- - **Capability sentence:** [one job, no unrelated "and"]
20
- - **Related skills inventory:** [skill → keep separate | invoke as sub-skill | absorb + reason]
21
- - **Sub-skills to invoke:** [name → when → produces → missing behavior]
22
- - **Split or orchestrator:** [one leaf skill | several skills | thin orchestrator + peers]
23
- - **Missing sub-skills to create:** [names to build first or as siblings]
24
-
25
- ## Description Triggers
26
-
27
- See `references/description-field.md`. Not story prose.
28
-
29
- - **Capability stem tokens:** [5–20 words]
30
- - **Trigger phrases:** [comma-separated phrases, slash forms, file types]
31
- - **Near-miss exclusions:** [tokens that must not select this skill]
32
- - **Draft description string:**
33
-
34
- ```yaml
35
- description: >-
36
- <stem>. Triggers: <phrases>.
37
- ```
38
-
39
- ## Deterministic Elements Inventory
40
-
41
- See `references/deterministic-elements.md`. Required before Write.
42
-
43
- | Step | Class (`deterministic` / `judgment` / `borderline`) | Home path | Evidence (one line) | Paired test (if code) |
44
- |---|---|---|---|---|
45
- | [step name] | [class] | [`scripts/…` / `workflow/…` / `templates/…` / `reference/…` / `SKILL.md`] | [why this class] | [`test_…` / N/A + reason] |
46
-
47
- Rules:
48
-
49
- - Every `deterministic` row has a real path under `scripts/`, `workflow/`, `templates/`, `reference/`, or `task-seed:…` — not prose-only.
50
- - Every code path has a paired test path (or a one-line pure-data reason).
51
- - Every required multi-step work list uses `task-seed:…` plus a body seed instruction (no markdown `- [ ]` board).
52
- - A `borderline` row kept in prose has a one-line why it stays in the body.
53
-
54
- ## Gaps Identified
55
-
56
- ### Gap 1: [Descriptive Name]
57
-
58
- - **What happened:** [Description of the failure or missing context when working without a skill]
59
- - **What was needed:** [The specific context, instruction, or knowledge that would fix it]
60
- - **Frequency:** [How often this comes up in real usage]
61
- - **Example task:** [A concrete task that exposes this gap]
62
-
63
- ### Gap 2: [Descriptive Name]
64
-
65
- - **What happened:** [Description]
66
- - **What was needed:** [Context/instruction needed]
67
- - **Frequency:** [Frequency]
68
- - **Example task:** [Concrete example]
69
-
70
- ### Gap 3: [Descriptive Name]
71
-
72
- - **What happened:** [Description]
73
- - **What was needed:** [Context/instruction needed]
74
- - **Frequency:** [Frequency]
75
- - **Example task:** [Concrete example]
76
-
77
- ## Patterns
78
-
79
- - [Recurring themes across gaps — e.g., "Claude consistently lacks knowledge about X"]
80
- - [Common failure modes — e.g., "Without guidance, Claude chooses library A when library B is required"]
81
- - [Context that was repeatedly provided manually]
82
-
83
- ## Initial Gotcha Candidates
84
-
85
- - [Failure pattern distilled to one line — "Claude will try to use X when it should use Y"]
86
- - [Another failure pattern — "Without explicit instruction, Claude skips the validation step"]
87
- - [Edge case that could become a gotcha]
@@ -1 +0,0 @@
1
- @../AGENTS.md
@@ -1,136 +0,0 @@
1
- # Improve Skill Workflow
2
-
3
- Observation-first flow for iterating on an existing skill.
4
-
5
- ## Prerequisites
6
-
7
- - An existing skill that needs improvement
8
- - The skill has been used at least once (or the user has observed specific issues)
9
-
10
- ---
11
-
12
- ## Step 1: Observe
13
-
14
- **Goal:** Document what’s wrong with the current skill by watching it in action or gathering user reports.
15
-
16
- > "Use the Skill in real workflows: Give Claude B (with the Skill loaded) actual tasks, not test scenarios."
17
-
18
- ### Option A: User has observed issues
19
-
20
- Ask:
21
- - "What specific issue did you observe?"
22
- - "Can you give me a concrete task where the skill underperformed?"
23
- - "Is this a triggering issue (skill doesn’t activate), a quality issue (skill activates but produces poor results), or a scope issue (skill does the wrong thing)?"
24
-
25
- ### Option B: No observations yet — spawn a test
26
-
27
- Spawn a subagent with the existing skill on a real task (see delegation-map.md for the spawn pattern). Read the transcript when complete.
28
-
29
- ### Transcript analysis
30
-
31
- Follow **Reading a transcript for observations** in `${CLAUDE_SKILL_DIR}/references/delegation-map.md`. Note what worked, what failed, and which gotcha would have prevented each failure.
32
-
33
- **Output:** Observation notes with specific failure examples.
34
-
35
- ---
36
-
37
- ## Step 2: Diagnose
38
-
39
- **Goal:** Classify each failure so you know which best practice to apply.
40
-
41
- Failure classification:
42
-
43
- | Symptom | Diagnosis | Apply |
44
- |---|---|---|
45
- | Skill never activates when it should | Description missing trigger phrases, story prose, or too vague | `description-field.md` trigger catalog |
46
- | Skill activates when it shouldn’t | Description too broad / story; no refusal boundary | Description triggers + Constraints / when-this-applies |
47
- | Description is multi-sentence narrative | Description used as summary/story | Rewrite per `description-field.md` |
48
- | Skill owns unrelated jobs | Monolith / multi-capability | `skill-modularity.md` — split or orchestrator + sub-skills |
49
- | Skill reimplements another skill’s steps | Silent reimplementation | Compose by name; sub-skills table |
50
- | Claude reads wrong files first | Structure not intuitive, hub doesn’t guide well | Progressive disclosure |
51
- | Claude ignores a companion file | File not signaled in SKILL.md or poorly linked | File index, hub pattern |
52
- | Claude over-explains basics | Skill states what Claude already knows | Principles: Concision |
53
- | Claude follows instructions too rigidly | Skill railroads instead of guiding | Principles: Degree of freedom |
54
- | Claude makes same mistake repeatedly | Missing gotcha | Principles: Gotchas |
55
- | Claude errors on script execution | Script doesn’t handle errors, missing deps | Principles: Scripts + `deterministic-elements.md` CODE_RULES bar |
56
- | Output format is wrong | Missing template or examples | Principles: Templates and examples |
57
- | Mechanical sequence only in markdown | Deterministic work left as prose | `deterministic-elements.md` — extract to scripts/workflow |
58
- | Detection/validation is a giant one-liner in body | Executable logic not in `scripts/` | `deterministic-elements.md` |
59
- | Fenced Python/JS in SKILL.md is the real implementation | Code not shipped as a file | Extract to `scripts/` or `workflow/` + paired test |
60
- | Script has magic literals / no tests | CODE_RULES bar missed | `deterministic-elements.md` + CODE_RULES |
61
- | Skill uses `- [ ]` for agent progress | Work list not on task tool | Task-seed catalog + seed instruction (`deterministic-elements.md`) |
62
- | "Copy checklist into response" protocol | Markdown as tracker | Switch to TaskCreate / TodoWrite seeding |
63
-
64
- When scope, activation, or deterministic placement is in play, re-read `${CLAUDE_SKILL_DIR}/references/skill-modularity.md`, `${CLAUDE_SKILL_DIR}/references/description-field.md`, and `${CLAUDE_SKILL_DIR}/references/deterministic-elements.md`.
65
-
66
- **Output:** Diagnosis per failure — which best practice was violated.
67
-
68
- ---
69
-
70
- ## Step 3: Apply Patterns
71
-
72
- **Goal:** Fix each diagnosed failure by applying the specific best practice that addresses it.
73
-
74
- > "Only change what the feedback demands. Do not reorganize working content."
75
-
76
- For each diagnosis from Step 2:
77
-
78
- 1. Read the matching reference (`description-field.md`, `skill-modularity.md`, `deterministic-elements.md`, `progressive-disclosure.md`, or SKILL.md principles).
79
- 2. Make the minimum change that addresses the failure.
80
- 3. For description failures: rewrite frontmatter into a trigger catalog (capability stem + Triggers list); strip story prose.
81
- 4. For modularity failures: add sub-skills table, split packages, or thin the orchestrator; do not paste peer skill procedures.
82
- 5. For deterministic failures: extract mechanical work to `scripts/` / `workflow/` / `templates/` / `reference/`; body only points and handles exit codes; apply CODE_RULES + paired tests to new code.
83
- 6. For checkbox/tracker failures: replace markdown `- [ ]` boards with a plain task-seed list and a seed instruction (`TaskCreate` / `TodoWrite`).
84
- 7. Verify the fix doesn’t break anything that was working.
85
-
86
- Spawn the `skill-writer-agent` agent for larger rewrites, using the refine-skill handoff from delegation-map.md.
87
-
88
- **Output:** Modified skill files with targeted fixes.
89
-
90
- ---
91
-
92
- ## Step 4: Capture Gotchas
93
-
94
- **Goal:** Every observation is a gotcha candidate. Accumulate them.
95
-
96
- > "Ideally, you will update your skill over time to capture these gotchas."
97
-
98
- For each failure observed in Step 1:
99
-
100
- 1. Distill it to a one-line gotcha: what went wrong and the signal that should have prevented it.
101
- 2. Add it to the skill’s Gotchas section.
102
- 3. If the failure mode is about skill-builder itself (not the skill being improved), add it to skill-builder’s own Gotchas section.
103
-
104
- **Output:** Updated gotchas in the skill’s SKILL.md (and potentially skill-builder’s SKILL.md).
105
-
106
- ---
107
-
108
- ## Step 5: Self-Audit
109
-
110
- **Goal:** Re-verify the modified skill against all best practices.
111
-
112
- Same process as new-skill Step 5:
113
-
114
- 1. Read `${CLAUDE_SKILL_DIR}/references/self-audit-checklist.md`.
115
- 2. Register every bullet as a session task; complete with evidence. Fix failures. Re-complete those tasks.
116
- 3. Pay special attention to items that overlap with the diagnosis from Step 2 — those were the failures; confirm they’re now fixed.
117
-
118
- **Output:** Audit summary; all PASS or N/A.
119
-
120
- ---
121
-
122
- ## Step 6: Deliver
123
-
124
- **Goal:** Hand off the improved skill with delta summary.
125
-
126
- Present to the user:
127
-
128
- 1. **What was observed** — summary of failures from Step 1.
129
- 2. **What was diagnosed** — which best practices were violated.
130
- 3. **What changed** — delta summary (files modified, lines added/removed).
131
- 4. **Description** — final frontmatter if rewritten (paste the trigger catalog).
132
- 5. **Composition** — sub-skills or splits if modularity changed.
133
- 6. **Deterministic extracts** — scripts/workflows/templates added or moved out of prose.
134
- 7. **New gotchas added** — list of gotchas captured.
135
- 8. **Audit summary** — post-fix audit results.
136
- 9. **Suggested re-test** — a concrete task to verify the fix with Claude B.