claude-agent-skills 1.3.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 (153) hide show
  1. package/README.md +65 -0
  2. package/bundled-skills/ask-matt/SKILL.md +61 -0
  3. package/bundled-skills/brainstorming/SKILL.md +159 -0
  4. package/bundled-skills/brainstorming/scripts/frame-template.html +213 -0
  5. package/bundled-skills/brainstorming/scripts/helper.js +167 -0
  6. package/bundled-skills/brainstorming/scripts/server.cjs +723 -0
  7. package/bundled-skills/brainstorming/scripts/start-server.sh +209 -0
  8. package/bundled-skills/brainstorming/scripts/stop-server.sh +120 -0
  9. package/bundled-skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  10. package/bundled-skills/brainstorming/visual-companion.md +298 -0
  11. package/bundled-skills/cavecrew/README.md +41 -0
  12. package/bundled-skills/cavecrew/SKILL.md +82 -0
  13. package/bundled-skills/caveman/README.md +48 -0
  14. package/bundled-skills/caveman/SKILL.md +78 -0
  15. package/bundled-skills/caveman-commit/README.md +44 -0
  16. package/bundled-skills/caveman-commit/SKILL.md +65 -0
  17. package/bundled-skills/caveman-compress/README.md +163 -0
  18. package/bundled-skills/caveman-compress/SECURITY.md +31 -0
  19. package/bundled-skills/caveman-compress/SKILL.md +111 -0
  20. package/bundled-skills/caveman-compress/scripts/__init__.py +9 -0
  21. package/bundled-skills/caveman-compress/scripts/__main__.py +3 -0
  22. package/bundled-skills/caveman-compress/scripts/benchmark.py +80 -0
  23. package/bundled-skills/caveman-compress/scripts/cli.py +85 -0
  24. package/bundled-skills/caveman-compress/scripts/compress.py +342 -0
  25. package/bundled-skills/caveman-compress/scripts/detect.py +121 -0
  26. package/bundled-skills/caveman-compress/scripts/validate.py +213 -0
  27. package/bundled-skills/caveman-help/README.md +38 -0
  28. package/bundled-skills/caveman-help/SKILL.md +63 -0
  29. package/bundled-skills/caveman-review/README.md +33 -0
  30. package/bundled-skills/caveman-review/SKILL.md +55 -0
  31. package/bundled-skills/caveman-stats/README.md +30 -0
  32. package/bundled-skills/caveman-stats/SKILL.md +10 -0
  33. package/bundled-skills/codebase-design/DEEPENING.md +37 -0
  34. package/bundled-skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
  35. package/bundled-skills/codebase-design/SKILL.md +114 -0
  36. package/bundled-skills/council/SKILL.md +77 -0
  37. package/bundled-skills/diagnosing-bugs/SKILL.md +134 -0
  38. package/bundled-skills/diagnosing-bugs/scripts/hitl-loop.template.sh +41 -0
  39. package/bundled-skills/dispatching-parallel-agents/SKILL.md +185 -0
  40. package/bundled-skills/domain-modeling/ADR-FORMAT.md +47 -0
  41. package/bundled-skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
  42. package/bundled-skills/domain-modeling/SKILL.md +74 -0
  43. package/bundled-skills/edit-article/SKILL.md +15 -0
  44. package/bundled-skills/executing-plans/SKILL.md +70 -0
  45. package/bundled-skills/finishing-a-development-branch/SKILL.md +241 -0
  46. package/bundled-skills/git-guardrails-claude-code/SKILL.md +95 -0
  47. package/bundled-skills/git-guardrails-claude-code/scripts/block-dangerous-git.sh +25 -0
  48. package/bundled-skills/grill-me/SKILL.md +7 -0
  49. package/bundled-skills/grill-with-docs/SKILL.md +7 -0
  50. package/bundled-skills/grilling/SKILL.md +10 -0
  51. package/bundled-skills/handoff/SKILL.md +16 -0
  52. package/bundled-skills/i-am-dumb/SKILL.md +57 -0
  53. package/bundled-skills/implement/SKILL.md +15 -0
  54. package/bundled-skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
  55. package/bundled-skills/improve-codebase-architecture/SKILL.md +66 -0
  56. package/bundled-skills/migrate-to-shoehorn/SKILL.md +118 -0
  57. package/bundled-skills/obsidian-vault/SKILL.md +59 -0
  58. package/bundled-skills/ponytail/SKILL.md +117 -0
  59. package/bundled-skills/ponytail-audit/SKILL.md +50 -0
  60. package/bundled-skills/ponytail-debt/SKILL.md +59 -0
  61. package/bundled-skills/ponytail-gain/SKILL.md +51 -0
  62. package/bundled-skills/ponytail-help/SKILL.md +43 -0
  63. package/bundled-skills/ponytail-review/SKILL.md +51 -0
  64. package/bundled-skills/prototype/LOGIC.md +79 -0
  65. package/bundled-skills/prototype/SKILL.md +31 -0
  66. package/bundled-skills/prototype/UI.md +112 -0
  67. package/bundled-skills/receiving-code-review/SKILL.md +213 -0
  68. package/bundled-skills/requesting-code-review/SKILL.md +103 -0
  69. package/bundled-skills/requesting-code-review/code-reviewer.md +172 -0
  70. package/bundled-skills/resolving-merge-conflicts/SKILL.md +14 -0
  71. package/bundled-skills/scaffold-exercises/SKILL.md +106 -0
  72. package/bundled-skills/setup-matt-pocock-skills/SKILL.md +127 -0
  73. package/bundled-skills/setup-matt-pocock-skills/domain.md +51 -0
  74. package/bundled-skills/setup-matt-pocock-skills/issue-tracker-github.md +34 -0
  75. package/bundled-skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +35 -0
  76. package/bundled-skills/setup-matt-pocock-skills/issue-tracker-local.md +19 -0
  77. package/bundled-skills/setup-matt-pocock-skills/triage-labels.md +15 -0
  78. package/bundled-skills/setup-pre-commit/SKILL.md +91 -0
  79. package/bundled-skills/subagent-driven-development/SKILL.md +418 -0
  80. package/bundled-skills/subagent-driven-development/implementer-prompt.md +139 -0
  81. package/bundled-skills/subagent-driven-development/scripts/review-package +44 -0
  82. package/bundled-skills/subagent-driven-development/scripts/sdd-workspace +22 -0
  83. package/bundled-skills/subagent-driven-development/scripts/task-brief +40 -0
  84. package/bundled-skills/subagent-driven-development/task-reviewer-prompt.md +188 -0
  85. package/bundled-skills/systematic-debugging/CREATION-LOG.md +119 -0
  86. package/bundled-skills/systematic-debugging/SKILL.md +296 -0
  87. package/bundled-skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  88. package/bundled-skills/systematic-debugging/condition-based-waiting.md +115 -0
  89. package/bundled-skills/systematic-debugging/defense-in-depth.md +122 -0
  90. package/bundled-skills/systematic-debugging/find-polluter.sh +63 -0
  91. package/bundled-skills/systematic-debugging/root-cause-tracing.md +169 -0
  92. package/bundled-skills/systematic-debugging/test-academic.md +14 -0
  93. package/bundled-skills/systematic-debugging/test-pressure-1.md +58 -0
  94. package/bundled-skills/systematic-debugging/test-pressure-2.md +68 -0
  95. package/bundled-skills/systematic-debugging/test-pressure-3.md +69 -0
  96. package/bundled-skills/tdd/SKILL.md +108 -0
  97. package/bundled-skills/tdd/mocking.md +59 -0
  98. package/bundled-skills/tdd/refactoring.md +10 -0
  99. package/bundled-skills/tdd/tests.md +61 -0
  100. package/bundled-skills/teach/GLOSSARY-FORMAT.md +35 -0
  101. package/bundled-skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
  102. package/bundled-skills/teach/MISSION-FORMAT.md +31 -0
  103. package/bundled-skills/teach/RESOURCES-FORMAT.md +32 -0
  104. package/bundled-skills/teach/SKILL.md +140 -0
  105. package/bundled-skills/test-driven-development/SKILL.md +371 -0
  106. package/bundled-skills/test-driven-development/testing-anti-patterns.md +299 -0
  107. package/bundled-skills/to-issues/SKILL.md +84 -0
  108. package/bundled-skills/to-prd/SKILL.md +75 -0
  109. package/bundled-skills/triage/AGENT-BRIEF.md +207 -0
  110. package/bundled-skills/triage/OUT-OF-SCOPE.md +105 -0
  111. package/bundled-skills/triage/SKILL.md +112 -0
  112. package/bundled-skills/using-git-worktrees/SKILL.md +202 -0
  113. package/bundled-skills/using-superpowers/SKILL.md +121 -0
  114. package/bundled-skills/using-superpowers/references/antigravity-tools.md +96 -0
  115. package/bundled-skills/using-superpowers/references/claude-code-tools.md +50 -0
  116. package/bundled-skills/using-superpowers/references/codex-tools.md +72 -0
  117. package/bundled-skills/using-superpowers/references/copilot-tools.md +49 -0
  118. package/bundled-skills/using-superpowers/references/gemini-tools.md +63 -0
  119. package/bundled-skills/using-superpowers/references/pi-tools.md +28 -0
  120. package/bundled-skills/verification-before-completion/SKILL.md +139 -0
  121. package/bundled-skills/writing-great-skills/GLOSSARY.md +195 -0
  122. package/bundled-skills/writing-great-skills/SKILL.md +82 -0
  123. package/bundled-skills/writing-plans/SKILL.md +174 -0
  124. package/bundled-skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  125. package/bundled-skills/writing-skills/SKILL.md +689 -0
  126. package/bundled-skills/writing-skills/anthropic-best-practices.md +1150 -0
  127. package/bundled-skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  128. package/bundled-skills/writing-skills/graphviz-conventions.dot +172 -0
  129. package/bundled-skills/writing-skills/persuasion-principles.md +187 -0
  130. package/bundled-skills/writing-skills/render-graphs.js +168 -0
  131. package/bundled-skills/writing-skills/testing-skills-with-subagents.md +384 -0
  132. package/commands/add.js +97 -0
  133. package/commands/check.js +54 -0
  134. package/commands/exportSkills.js +30 -0
  135. package/commands/hub.js +52 -0
  136. package/commands/importSkills.js +68 -0
  137. package/commands/list.js +37 -0
  138. package/commands/remove.js +59 -0
  139. package/commands/sync.js +66 -0
  140. package/commands/update.js +70 -0
  141. package/index.js +100 -0
  142. package/lib/banner.js +108 -0
  143. package/lib/constants.js +10 -0
  144. package/lib/deps.js +51 -0
  145. package/lib/hash.js +26 -0
  146. package/lib/install.js +31 -0
  147. package/lib/lockfile.js +37 -0
  148. package/lib/prompts.js +50 -0
  149. package/lib/scope.js +19 -0
  150. package/lib/summary.js +108 -0
  151. package/lib/theme.js +11 -0
  152. package/package.json +43 -0
  153. package/skills.json +164 -0
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: executing-plans
3
+ description: Use when you have a written implementation plan to execute in a separate session with review checkpoints
4
+ ---
5
+
6
+ # Executing Plans
7
+
8
+ ## Overview
9
+
10
+ Load plan, review critically, execute all tasks, report when complete.
11
+
12
+ **Announce at start:** "I'm using the executing-plans skill to implement this plan."
13
+
14
+ **Note:** Tell your human partner that Superpowers works much better with access to subagents. The quality of its work will be significantly higher if run on a platform with subagent support (Claude Code, Codex CLI, Codex App, Copilot CLI, and Gemini CLI all qualify; see the per-platform tool refs in `../using-superpowers/references/`). If subagents are available, use superpowers:subagent-driven-development instead of this skill.
15
+
16
+ ## The Process
17
+
18
+ ### Step 1: Load and Review Plan
19
+ 1. Read plan file
20
+ 2. Review critically - identify any questions or concerns about the plan
21
+ 3. If concerns: Raise them with your human partner before starting
22
+ 4. If no concerns: Create todos for the plan items and proceed
23
+
24
+ ### Step 2: Execute Tasks
25
+
26
+ For each task:
27
+ 1. Mark as in_progress
28
+ 2. Follow each step exactly (plan has bite-sized steps)
29
+ 3. Run verifications as specified
30
+ 4. Mark as completed
31
+
32
+ ### Step 3: Complete Development
33
+
34
+ After all tasks complete and verified:
35
+ - Announce: "I'm using the finishing-a-development-branch skill to complete this work."
36
+ - **REQUIRED SUB-SKILL:** Use superpowers:finishing-a-development-branch
37
+ - Follow that skill to verify tests, present options, execute choice
38
+
39
+ ## When to Stop and Ask for Help
40
+
41
+ **STOP executing immediately when:**
42
+ - Hit a blocker (missing dependency, test fails, instruction unclear)
43
+ - Plan has critical gaps preventing starting
44
+ - You don't understand an instruction
45
+ - Verification fails repeatedly
46
+
47
+ **Ask for clarification rather than guessing.**
48
+
49
+ ## When to Revisit Earlier Steps
50
+
51
+ **Return to Review (Step 1) when:**
52
+ - Partner updates the plan based on your feedback
53
+ - Fundamental approach needs rethinking
54
+
55
+ **Don't force through blockers** - stop and ask.
56
+
57
+ ## Remember
58
+ - Review plan critically first
59
+ - Follow plan steps exactly
60
+ - Don't skip verifications
61
+ - Reference skills when plan says to
62
+ - Stop when blocked, don't guess
63
+ - Never start implementation on main/master branch without explicit user consent
64
+
65
+ ## Integration
66
+
67
+ **Required workflow skills:**
68
+ - **superpowers:using-git-worktrees** - Ensures isolated workspace (creates one or verifies existing)
69
+ - **superpowers:writing-plans** - Creates the plan this skill executes
70
+ - **superpowers:finishing-a-development-branch** - Complete development after all tasks
@@ -0,0 +1,241 @@
1
+ ---
2
+ name: finishing-a-development-branch
3
+ description: Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
4
+ ---
5
+
6
+ # Finishing a Development Branch
7
+
8
+ ## Overview
9
+
10
+ Guide completion of development work by presenting clear options and handling chosen workflow.
11
+
12
+ **Core principle:** Verify tests → Detect environment → Present options → Execute choice → Clean up.
13
+
14
+ **Announce at start:** "I'm using the finishing-a-development-branch skill to complete this work."
15
+
16
+ ## The Process
17
+
18
+ ### Step 1: Verify Tests
19
+
20
+ **Before presenting options, verify tests pass:**
21
+
22
+ ```bash
23
+ # Run project's test suite
24
+ npm test / cargo test / pytest / go test ./...
25
+ ```
26
+
27
+ **If tests fail:**
28
+ ```
29
+ Tests failing (<N> failures). Must fix before completing:
30
+
31
+ [Show failures]
32
+
33
+ Cannot proceed with merge/PR until tests pass.
34
+ ```
35
+
36
+ Stop. Don't proceed to Step 2.
37
+
38
+ **If tests pass:** Continue to Step 2.
39
+
40
+ ### Step 2: Detect Environment
41
+
42
+ **Determine workspace state before presenting options:**
43
+
44
+ ```bash
45
+ GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
46
+ GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
47
+ ```
48
+
49
+ This determines which menu to show and how cleanup works:
50
+
51
+ | State | Menu | Cleanup |
52
+ |-------|------|---------|
53
+ | `GIT_DIR == GIT_COMMON` (normal repo) | Standard 4 options | No worktree to clean up |
54
+ | `GIT_DIR != GIT_COMMON`, named branch | Standard 4 options | Provenance-based (see Step 6) |
55
+ | `GIT_DIR != GIT_COMMON`, detached HEAD | Reduced 3 options (no merge) | No cleanup (externally managed) |
56
+
57
+ ### Step 3: Determine Base Branch
58
+
59
+ ```bash
60
+ # Try common base branches
61
+ git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null
62
+ ```
63
+
64
+ Or ask: "This branch split from main - is that correct?"
65
+
66
+ ### Step 4: Present Options
67
+
68
+ **Normal repo and named-branch worktree — present exactly these 4 options:**
69
+
70
+ ```
71
+ Implementation complete. What would you like to do?
72
+
73
+ 1. Merge back to <base-branch> locally
74
+ 2. Push and create a Pull Request
75
+ 3. Keep the branch as-is (I'll handle it later)
76
+ 4. Discard this work
77
+
78
+ Which option?
79
+ ```
80
+
81
+ **Detached HEAD — present exactly these 3 options:**
82
+
83
+ ```
84
+ Implementation complete. You're on a detached HEAD (externally managed workspace).
85
+
86
+ 1. Push as new branch and create a Pull Request
87
+ 2. Keep as-is (I'll handle it later)
88
+ 3. Discard this work
89
+
90
+ Which option?
91
+ ```
92
+
93
+ **Don't add explanation** - keep options concise.
94
+
95
+ ### Step 5: Execute Choice
96
+
97
+ #### Option 1: Merge Locally
98
+
99
+ ```bash
100
+ # Get main repo root for CWD safety
101
+ MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
102
+ cd "$MAIN_ROOT"
103
+
104
+ # Merge first — verify success before removing anything
105
+ git checkout <base-branch>
106
+ git pull
107
+ git merge <feature-branch>
108
+
109
+ # Verify tests on merged result
110
+ <test command>
111
+
112
+ # Only after merge succeeds: cleanup worktree (Step 6), then delete branch
113
+ ```
114
+
115
+ Then: Cleanup worktree (Step 6), then delete branch:
116
+
117
+ ```bash
118
+ git branch -d <feature-branch>
119
+ ```
120
+
121
+ #### Option 2: Push and Create PR
122
+
123
+ ```bash
124
+ # Push branch
125
+ git push -u origin <feature-branch>
126
+ ```
127
+
128
+ **Do NOT clean up worktree** — user needs it alive to iterate on PR feedback.
129
+
130
+ #### Option 3: Keep As-Is
131
+
132
+ Report: "Keeping branch <name>. Worktree preserved at <path>."
133
+
134
+ **Don't cleanup worktree.**
135
+
136
+ #### Option 4: Discard
137
+
138
+ **Confirm first:**
139
+ ```
140
+ This will permanently delete:
141
+ - Branch <name>
142
+ - All commits: <commit-list>
143
+ - Worktree at <path>
144
+
145
+ Type 'discard' to confirm.
146
+ ```
147
+
148
+ Wait for exact confirmation.
149
+
150
+ If confirmed:
151
+ ```bash
152
+ MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
153
+ cd "$MAIN_ROOT"
154
+ ```
155
+
156
+ Then: Cleanup worktree (Step 6), then force-delete branch:
157
+ ```bash
158
+ git branch -D <feature-branch>
159
+ ```
160
+
161
+ ### Step 6: Cleanup Workspace
162
+
163
+ **Only runs for Options 1 and 4.** Options 2 and 3 always preserve the worktree.
164
+
165
+ ```bash
166
+ GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
167
+ GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
168
+ WORKTREE_PATH=$(git rev-parse --show-toplevel)
169
+ ```
170
+
171
+ **If `GIT_DIR == GIT_COMMON`:** Normal repo, no worktree to clean up. Done.
172
+
173
+ **If worktree path is under `.worktrees/` or `worktrees/`:** Superpowers created this worktree — we own cleanup.
174
+
175
+ ```bash
176
+ MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
177
+ cd "$MAIN_ROOT"
178
+ git worktree remove "$WORKTREE_PATH"
179
+ git worktree prune # Self-healing: clean up any stale registrations
180
+ ```
181
+
182
+ **Otherwise:** The host environment (harness) owns this workspace. Do NOT remove it. If your platform provides a workspace-exit tool, use it. Otherwise, leave the workspace in place.
183
+
184
+ ## Quick Reference
185
+
186
+ | Option | Merge | Push | Keep Worktree | Cleanup Branch |
187
+ |--------|-------|------|---------------|----------------|
188
+ | 1. Merge locally | yes | - | - | yes |
189
+ | 2. Create PR | - | yes | yes | - |
190
+ | 3. Keep as-is | - | - | yes | - |
191
+ | 4. Discard | - | - | - | yes (force) |
192
+
193
+ ## Common Mistakes
194
+
195
+ **Skipping test verification**
196
+ - **Problem:** Merge broken code, create failing PR
197
+ - **Fix:** Always verify tests before offering options
198
+
199
+ **Open-ended questions**
200
+ - **Problem:** "What should I do next?" is ambiguous
201
+ - **Fix:** Present exactly 4 structured options (or 3 for detached HEAD)
202
+
203
+ **Cleaning up worktree for Option 2**
204
+ - **Problem:** Remove worktree user needs for PR iteration
205
+ - **Fix:** Only cleanup for Options 1 and 4
206
+
207
+ **Deleting branch before removing worktree**
208
+ - **Problem:** `git branch -d` fails because worktree still references the branch
209
+ - **Fix:** Merge first, remove worktree, then delete branch
210
+
211
+ **Running git worktree remove from inside the worktree**
212
+ - **Problem:** Command fails silently when CWD is inside the worktree being removed
213
+ - **Fix:** Always `cd` to main repo root before `git worktree remove`
214
+
215
+ **Cleaning up harness-owned worktrees**
216
+ - **Problem:** Removing a worktree the harness created causes phantom state
217
+ - **Fix:** Only clean up worktrees under `.worktrees/` or `worktrees/`
218
+
219
+ **No confirmation for discard**
220
+ - **Problem:** Accidentally delete work
221
+ - **Fix:** Require typed "discard" confirmation
222
+
223
+ ## Red Flags
224
+
225
+ **Never:**
226
+ - Proceed with failing tests
227
+ - Merge without verifying tests on result
228
+ - Delete work without confirmation
229
+ - Force-push without explicit request
230
+ - Remove a worktree before confirming merge success
231
+ - Clean up worktrees you didn't create (provenance check)
232
+ - Run `git worktree remove` from inside the worktree
233
+
234
+ **Always:**
235
+ - Verify tests before offering options
236
+ - Detect environment before presenting menu
237
+ - Present exactly 4 options (or 3 for detached HEAD)
238
+ - Get typed confirmation for Option 4
239
+ - Clean up worktree for Options 1 & 4 only
240
+ - `cd` to main repo root before worktree removal
241
+ - Run `git worktree prune` after removal
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: git-guardrails-claude-code
3
+ description: Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.
4
+ ---
5
+
6
+ # Setup Git Guardrails
7
+
8
+ Sets up a PreToolUse hook that intercepts and blocks dangerous git commands before Claude executes them.
9
+
10
+ ## What Gets Blocked
11
+
12
+ - `git push` (all variants including `--force`)
13
+ - `git reset --hard`
14
+ - `git clean -f` / `git clean -fd`
15
+ - `git branch -D`
16
+ - `git checkout .` / `git restore .`
17
+
18
+ When blocked, Claude sees a message telling it that it does not have authority to access these commands.
19
+
20
+ ## Steps
21
+
22
+ ### 1. Ask scope
23
+
24
+ Ask the user: install for **this project only** (`.claude/settings.json`) or **all projects** (`~/.claude/settings.json`)?
25
+
26
+ ### 2. Copy the hook script
27
+
28
+ The bundled script is at: [scripts/block-dangerous-git.sh](scripts/block-dangerous-git.sh)
29
+
30
+ Copy it to the target location based on scope:
31
+
32
+ - **Project**: `.claude/hooks/block-dangerous-git.sh`
33
+ - **Global**: `~/.claude/hooks/block-dangerous-git.sh`
34
+
35
+ Make it executable with `chmod +x`.
36
+
37
+ ### 3. Add hook to settings
38
+
39
+ Add to the appropriate settings file:
40
+
41
+ **Project** (`.claude/settings.json`):
42
+
43
+ ```json
44
+ {
45
+ "hooks": {
46
+ "PreToolUse": [
47
+ {
48
+ "matcher": "Bash",
49
+ "hooks": [
50
+ {
51
+ "type": "command",
52
+ "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/block-dangerous-git.sh"
53
+ }
54
+ ]
55
+ }
56
+ ]
57
+ }
58
+ }
59
+ ```
60
+
61
+ **Global** (`~/.claude/settings.json`):
62
+
63
+ ```json
64
+ {
65
+ "hooks": {
66
+ "PreToolUse": [
67
+ {
68
+ "matcher": "Bash",
69
+ "hooks": [
70
+ {
71
+ "type": "command",
72
+ "command": "~/.claude/hooks/block-dangerous-git.sh"
73
+ }
74
+ ]
75
+ }
76
+ ]
77
+ }
78
+ }
79
+ ```
80
+
81
+ If the settings file already exists, merge the hook into existing `hooks.PreToolUse` array — don't overwrite other settings.
82
+
83
+ ### 4. Ask about customization
84
+
85
+ Ask if user wants to add or remove any patterns from the blocked list. Edit the copied script accordingly.
86
+
87
+ ### 5. Verify
88
+
89
+ Run a quick test:
90
+
91
+ ```bash
92
+ echo '{"tool_input":{"command":"git push origin main"}}' | <path-to-script>
93
+ ```
94
+
95
+ Should exit with code 2 and print a BLOCKED message to stderr.
@@ -0,0 +1,25 @@
1
+ #!/bin/bash
2
+
3
+ INPUT=$(cat)
4
+ COMMAND=$(echo "$INPUT" | jq -r '.tool_input.command')
5
+
6
+ DANGEROUS_PATTERNS=(
7
+ "git push"
8
+ "git reset --hard"
9
+ "git clean -fd"
10
+ "git clean -f"
11
+ "git branch -D"
12
+ "git checkout \."
13
+ "git restore \."
14
+ "push --force"
15
+ "reset --hard"
16
+ )
17
+
18
+ for pattern in "${DANGEROUS_PATTERNS[@]}"; do
19
+ if echo "$COMMAND" | grep -qE "$pattern"; then
20
+ echo "BLOCKED: '$COMMAND' matches dangerous pattern '$pattern'. The user has prevented you from doing this." >&2
21
+ exit 2
22
+ fi
23
+ done
24
+
25
+ exit 0
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: grill-me
3
+ description: A relentless interview to sharpen a plan or design.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Run a `/grilling` session.
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: grill-with-docs
3
+ description: A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Run a `/grilling` session, using the `/domain-modeling` skill.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: grilling
3
+ description: Interview the user relentlessly about a plan or design. Use when the user wants to stress-test a plan before building, or uses any 'grill' trigger phrases.
4
+ ---
5
+
6
+ Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
7
+
8
+ Ask the questions one at a time, waiting for feedback on each question before continuing. Asking multiple questions at once is bewildering.
9
+
10
+ If a question can be answered by exploring the codebase, explore the codebase instead.
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: handoff
3
+ description: Compact the current conversation into a handoff document for another agent to pick up.
4
+ argument-hint: "What will the next session be used for?"
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save to the temporary directory of the user's OS - not the current workspace.
9
+
10
+ Include a "suggested skills" section in the document, which suggests skills that the agent should invoke.
11
+
12
+ Do not duplicate content already captured in other artifacts (PRDs, plans, ADRs, issues, commits, diffs). Reference them by path or URL instead.
13
+
14
+ Redact any sensitive information, such as API keys, passwords, or personally identifiable information.
15
+
16
+ If the user passed arguments, treat them as a description of what the next session will focus on and tailor the doc accordingly.
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: i-am-dumb
3
+ disable-model-invocation: true
4
+ description: >-
5
+ Explain any concept in extreme detail as if teaching a junior developer.
6
+ Use when user says "i am dumb", "explain like I'm dumb", "explain this
7
+ to me simply", or invokes /i-am-dumb.
8
+ ---
9
+
10
+ # I Am Dumb
11
+
12
+ The user wants something explained in extreme detail. They are not
13
+ actually dumb — they just want the full picture without assumptions
14
+ about what they already know.
15
+
16
+ ## How to explain
17
+
18
+ 1. **Start with the "why"** — before explaining what something is or
19
+ how it works, explain why it exists. What problem does it solve?
20
+ What was life like before it?
21
+
22
+ 2. **Use a real-world analogy** — pick one concrete analogy and carry
23
+ it through the explanation. Don't switch analogies mid-stream.
24
+
25
+ 3. **Build from zero** — assume no prior knowledge of this specific
26
+ topic. Define every term the first time you use it. If concept B
27
+ depends on concept A, explain A first.
28
+
29
+ 4. **Show, don't just tell** — include short, runnable code examples
30
+ or concrete scenarios. Annotate each line or step. Prefer a
31
+ working 5-line example over a theoretical 20-line one.
32
+
33
+ 5. **One layer at a time** — start with the simplest correct mental
34
+ model, then add complexity in clearly labeled layers:
35
+ - **Simple version**: the 80% mental model
36
+ - **More accurate version**: the nuances and edge cases
37
+ - **Full picture**: the internals, tradeoffs, and gotchas
38
+
39
+ 6. **Anticipate follow-ups** — after the explanation, list 2-3
40
+ questions the user is likely to think of next and briefly answer
41
+ them.
42
+
43
+ ## What to avoid
44
+
45
+ - Don't skip steps because they seem "obvious"
46
+ - Don't use jargon without defining it first
47
+ - Don't say "simply" or "just" — nothing is simple when you're
48
+ learning it
49
+ - Don't give a wall of text — use headers, bullets, and code blocks
50
+ to break things up
51
+ - Don't be condescending — be thorough, not patronizing
52
+
53
+ ## Applies to anything
54
+
55
+ This is not limited to code. The user may ask about architecture,
56
+ DevOps, system design, networking, databases, math, or any other
57
+ topic. Apply the same explanation style regardless of domain.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: implement
3
+ description: "Implement a piece of work based on a PRD or set of issues."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Implement the work described by the user in the PRD or issues.
8
+
9
+ Use /tdd where possible, at pre-agreed seams.
10
+
11
+ Run typechecking regularly, single test files regularly, and the full test suite once at the end.
12
+
13
+ Once done, use /review to review the work.
14
+
15
+ Commit your work to the current branch.
@@ -0,0 +1,123 @@
1
+ # HTML Report Format
2
+
3
+ The architectural review is rendered as a single self-contained HTML file in the OS temp directory. Tailwind and Mermaid both come from CDNs. Mermaid handles graph-shaped diagrams reliably; hand-built divs and inline SVG handle the more editorial visuals (mass diagrams, cross-sections). Mix the two — don't lean on Mermaid for everything, it'll start to look generic.
4
+
5
+ ## Scaffold
6
+
7
+ ```html
8
+ <!doctype html>
9
+ <html lang="en">
10
+ <head>
11
+ <meta charset="utf-8" />
12
+ <title>Architecture review — {{repo name}}</title>
13
+ <script src="https://cdn.tailwindcss.com"></script>
14
+ <script type="module">
15
+ import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs";
16
+ mermaid.initialize({ startOnLoad: true, theme: "neutral", securityLevel: "loose" });
17
+ </script>
18
+ <style>
19
+ /* small custom layer for things Tailwind doesn't cover cleanly:
20
+ dashed seam lines, hand-drawn-feeling arrow heads, etc. */
21
+ .seam { stroke-dasharray: 4 4; }
22
+ .leak { stroke: #dc2626; }
23
+ .deep { background: linear-gradient(135deg, #0f172a, #1e293b); }
24
+ </style>
25
+ </head>
26
+ <body class="bg-stone-50 text-slate-900 font-sans">
27
+ <main class="max-w-5xl mx-auto px-6 py-12 space-y-12">
28
+ <header>...</header>
29
+ <section id="candidates" class="space-y-10">...</section>
30
+ <section id="top-recommendation">...</section>
31
+ </main>
32
+ </body>
33
+ </html>
34
+ ```
35
+
36
+ ## Header
37
+
38
+ Repo name, date, and a compact legend: solid box = module, dashed line = seam, red arrow = leakage, thick dark box = deep module. No introduction paragraph — straight into the candidates.
39
+
40
+ ## Candidate card
41
+
42
+ The diagrams carry the weight. Prose is sparse, plain, and uses the glossary terms (from the `/codebase-design` skill) without ceremony.
43
+
44
+ Each candidate is one `<article>`:
45
+
46
+ - **Title** — short, names the deepening (e.g. "Collapse the Order intake pipeline").
47
+ - **Badge row** — recommendation strength (`Strong` = emerald, `Worth exploring` = amber, `Speculative` = slate), plus a tag for the dependency category (`in-process`, `local-substitutable`, `ports & adapters`, `mock`).
48
+ - **Files** — monospaced list, `font-mono text-sm`.
49
+ - **Before / After diagram** — the centrepiece. Two columns, side by side. See patterns below.
50
+ - **Problem** — one sentence. What hurts.
51
+ - **Solution** — one sentence. What changes.
52
+ - **Wins** — bullets, ≤6 words each. e.g. "Tests hit one interface", "Pricing logic stops leaking", "Delete 4 shallow wrappers".
53
+ - **ADR callout** (if applicable) — one line in an amber-tinted box.
54
+
55
+ No paragraphs of explanation. If the diagram needs a paragraph to be understood, redraw the diagram.
56
+
57
+ ## Diagram patterns
58
+
59
+ Pick the pattern that fits the candidate. Mix them. Don't make every diagram look the same — variety is part of the point.
60
+
61
+ ### Mermaid graph (the workhorse for dependencies / call flow)
62
+
63
+ Use a Mermaid `flowchart` or `graph` when the point is "X calls Y calls Z, and look at the mess." Wrap it in a Tailwind-styled card so it doesn't feel parachuted in. Style with classDef to colour leakage edges red and the deep module dark. Sequence diagrams work well for "before: 6 round-trips; after: 1."
64
+
65
+ ```html
66
+ <div class="rounded-lg border border-slate-200 bg-white p-4">
67
+ <pre class="mermaid">
68
+ flowchart LR
69
+ A[OrderHandler] --> B[OrderValidator]
70
+ B --> C[OrderRepo]
71
+ C -.leak.-> D[PricingClient]
72
+ classDef leak stroke:#dc2626,stroke-width:2px;
73
+ class C,D leak
74
+ </pre>
75
+ </div>
76
+ ```
77
+
78
+ ### Hand-built boxes-and-arrows (when Mermaid's layout fights you)
79
+
80
+ Modules as `<div>`s with borders and labels. Arrows as inline SVG `<line>` or `<path>` elements positioned absolutely over a relative container. Reach for this when you want the "after" diagram to feel like one thick-bordered deep module with greyed-out internals — Mermaid won't render that with the right weight.
81
+
82
+ ### Cross-section (good for layered shallowness)
83
+
84
+ Stack horizontal bands (`h-12 border-l-4`) to show layers a call passes through. Before: 6 thin layers each doing nothing. After: 1 thick band labelled with the consolidated responsibility.
85
+
86
+ ### Mass diagram (good for "interface as wide as implementation")
87
+
88
+ Two rectangles per module — one for interface surface area, one for implementation. Before: interface rectangle is nearly as tall as the implementation rectangle (shallow). After: interface rectangle is short, implementation rectangle is tall (deep).
89
+
90
+ ### Call-graph collapse
91
+
92
+ Before: a tree of function calls rendered as nested boxes. After: the same tree collapsed into one box, with the now-internal calls shown faded inside it.
93
+
94
+ ## Style guidance
95
+
96
+ - Lean editorial, not corporate-dashboard. Generous whitespace. Serif optional for headings (`font-serif` works well with stone/slate).
97
+ - Colour sparingly: one accent (emerald or indigo) plus red for leakage and amber for warnings.
98
+ - Keep diagrams ~320px tall so before/after sits comfortably side by side without scrolling.
99
+ - Use `text-xs uppercase tracking-wider` for module labels inside diagrams — they should read as schematic, not as UI.
100
+ - The only scripts are the Tailwind CDN and the Mermaid ESM import. The report is otherwise static — no app code, no interactivity beyond Mermaid's own rendering.
101
+
102
+ ## Top recommendation section
103
+
104
+ One larger card. Candidate name, one sentence on why, anchor link to its card. That's it.
105
+
106
+ ## Tone
107
+
108
+ Plain English, concise — but the architectural nouns and verbs come straight from the `/codebase-design` skill. Concision is not an excuse to drift.
109
+
110
+ **Use exactly:** module, interface, implementation, depth, deep, shallow, seam, adapter, leverage, locality.
111
+
112
+ **Never substitute:** component, service, unit (for module) · API, signature (for interface) · boundary (for seam) · layer, wrapper (for module, when you mean module).
113
+
114
+ **Phrasings that fit the style:**
115
+
116
+ - "Order intake module is shallow — interface nearly matches the implementation."
117
+ - "Pricing leaks across the seam."
118
+ - "Deepen: one interface, one place to test."
119
+ - "Two adapters justify the seam: HTTP in prod, in-memory in tests."
120
+
121
+ **Wins bullets** name the gain in glossary terms: *"locality: bugs concentrate in one module"*, *"leverage: one interface, N call sites"*, *"interface shrinks; implementation absorbs the wrappers"*. Don't write *"easier to maintain"* or *"cleaner code"* — those terms aren't in the glossary and don't earn their place.
122
+
123
+ No hedging, no throat-clearing, no "it's worth noting that…". If a sentence could be a bullet, make it a bullet. If a bullet could be cut, cut it. If a term isn't in the `/codebase-design` glossary, reach for one that is before inventing a new one.