@ia-ccun/code-agent-cli 0.0.3 → 0.0.4-8.beta.1

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 (189) hide show
  1. package/README.md +92 -11
  2. package/bin/cli.js +212 -59
  3. package/config/agent/APPEND_SYSTEM.md +46 -5
  4. package/config/agent/bin/fd +0 -0
  5. package/config/agent/bin/rg +0 -0
  6. package/config/agent/dangerous-patterns.json +106 -0
  7. package/config/agent/extensions/aicode-tips.ts +191 -0
  8. package/config/agent/extensions/bash-check.ts +227 -0
  9. package/config/agent/extensions/context-monitor.ts +275 -0
  10. package/config/agent/extensions/context.ts +1 -0
  11. package/config/agent/extensions/custom-footer.ts +33 -2
  12. package/config/agent/extensions/custom.ts +24 -91
  13. package/config/agent/extensions/error-monitor.ts +142 -0
  14. package/config/agent/extensions/msg-debug.ts +185 -0
  15. package/config/agent/extensions/review.ts +4 -0
  16. package/config/agent/extensions/working-msg.ts +39 -20
  17. package/config/agent/mcp.json +4 -0
  18. package/config/agent/models.json +16 -43
  19. package/config/agent/prompts/code-simplifier.md +51 -0
  20. package/config/agent/prompts/feat.md +2 -2
  21. package/config/agent/prompts/git-commit.md +9 -15
  22. package/config/agent/prompts/init-project.md +2 -1
  23. package/config/agent/prompts/workflow.md +3 -2
  24. package/config/agent/settings.json +17 -5
  25. package/config/agent/skills/brainstorming/SKILL.md +167 -0
  26. package/config/agent/skills/brainstorming/scripts/frame-template.html +214 -0
  27. package/config/agent/skills/brainstorming/scripts/helper.js +88 -0
  28. package/config/agent/skills/brainstorming/scripts/server.cjs +338 -0
  29. package/config/agent/skills/brainstorming/scripts/start-server.sh +153 -0
  30. package/config/agent/skills/brainstorming/scripts/stop-server.sh +55 -0
  31. package/config/agent/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  32. package/config/agent/skills/brainstorming/visual-companion.md +286 -0
  33. package/config/agent/skills/code-review/SKILL.md +4 -2
  34. package/config/agent/skills/commit/SKILL.md +10 -5
  35. package/config/agent/skills/csv-data-summarizer/SKILL.md +2 -1
  36. package/config/agent/skills/design-md/README.md +34 -0
  37. package/config/agent/skills/design-md/SKILL.md +172 -0
  38. package/config/agent/skills/design-md/examples/DESIGN.md +154 -0
  39. package/config/agent/skills/dispatching-parallel-agents/SKILL.md +185 -0
  40. package/config/agent/skills/executing-plans/SKILL.md +73 -0
  41. package/config/agent/skills/find-skills/SKILL.md +5 -1
  42. package/config/agent/skills/finishing-a-development-branch/SKILL.md +204 -0
  43. package/config/agent/skills/fireworks-tech-graph/LICENSE +21 -0
  44. package/config/agent/skills/fireworks-tech-graph/README.md +528 -0
  45. package/config/agent/skills/fireworks-tech-graph/README.zh.md +499 -0
  46. package/config/agent/skills/fireworks-tech-graph/SKILL.md +537 -0
  47. package/config/agent/skills/fireworks-tech-graph/agentloop-core.svg +101 -0
  48. package/config/agent/skills/fireworks-tech-graph/agents/openai.yaml +4 -0
  49. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style1-flat.png +0 -0
  50. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style2-dark.png +0 -0
  51. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style3-blueprint.png +0 -0
  52. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style4-notion.png +0 -0
  53. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style5-glass.png +0 -0
  54. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style6-claude.png +0 -0
  55. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style7-openai.png +0 -0
  56. package/config/agent/skills/fireworks-tech-graph/fixtures/agent-memory-types-style4.json +181 -0
  57. package/config/agent/skills/fireworks-tech-graph/fixtures/api-flow-style7.json +40 -0
  58. package/config/agent/skills/fireworks-tech-graph/fixtures/mem0-style1.json +297 -0
  59. package/config/agent/skills/fireworks-tech-graph/fixtures/microservices-style3.json +64 -0
  60. package/config/agent/skills/fireworks-tech-graph/fixtures/multi-agent-style5.json +45 -0
  61. package/config/agent/skills/fireworks-tech-graph/fixtures/system-architecture-style6.json +48 -0
  62. package/config/agent/skills/fireworks-tech-graph/fixtures/tool-call-style2.json +182 -0
  63. package/config/agent/skills/fireworks-tech-graph/package.json +42 -0
  64. package/config/agent/skills/fireworks-tech-graph/references/icons.md +406 -0
  65. package/config/agent/skills/fireworks-tech-graph/references/style-1-flat-icon.md +108 -0
  66. package/config/agent/skills/fireworks-tech-graph/references/style-2-dark-terminal.md +107 -0
  67. package/config/agent/skills/fireworks-tech-graph/references/style-3-blueprint.md +113 -0
  68. package/config/agent/skills/fireworks-tech-graph/references/style-4-notion-clean.md +94 -0
  69. package/config/agent/skills/fireworks-tech-graph/references/style-5-glassmorphism.md +125 -0
  70. package/config/agent/skills/fireworks-tech-graph/references/style-6-claude-official.md +209 -0
  71. package/config/agent/skills/fireworks-tech-graph/references/style-7-openai.md +215 -0
  72. package/config/agent/skills/fireworks-tech-graph/references/style-diagram-matrix.md +135 -0
  73. package/config/agent/skills/fireworks-tech-graph/references/svg-layout-best-practices.md +100 -0
  74. package/config/agent/skills/fireworks-tech-graph/scripts/README.md +244 -0
  75. package/config/agent/skills/fireworks-tech-graph/scripts/generate-diagram.sh +157 -0
  76. package/config/agent/skills/fireworks-tech-graph/scripts/generate-from-template.py +1556 -0
  77. package/config/agent/skills/fireworks-tech-graph/scripts/test-all-styles.sh +135 -0
  78. package/config/agent/skills/fireworks-tech-graph/scripts/validate-svg.sh +292 -0
  79. package/config/agent/skills/fireworks-tech-graph/templates/agent-architecture.svg +28 -0
  80. package/config/agent/skills/fireworks-tech-graph/templates/architecture.svg +23 -0
  81. package/config/agent/skills/fireworks-tech-graph/templates/comparison-matrix.svg +14 -0
  82. package/config/agent/skills/fireworks-tech-graph/templates/data-flow.svg +28 -0
  83. package/config/agent/skills/fireworks-tech-graph/templates/er-diagram.svg +21 -0
  84. package/config/agent/skills/fireworks-tech-graph/templates/flowchart.svg +21 -0
  85. package/config/agent/skills/fireworks-tech-graph/templates/sequence.svg +20 -0
  86. package/config/agent/skills/fireworks-tech-graph/templates/state-machine.svg +20 -0
  87. package/config/agent/skills/fireworks-tech-graph/templates/timeline.svg +19 -0
  88. package/config/agent/skills/fireworks-tech-graph/templates/use-case.svg +21 -0
  89. package/config/agent/skills/frontend-design/SKILL.md +4 -1
  90. package/config/agent/skills/hello/SKILL.md +5 -2
  91. package/config/agent/skills/impeccable/adapt/SKILL.md +204 -0
  92. package/config/agent/skills/impeccable/animate/SKILL.md +177 -0
  93. package/config/agent/skills/impeccable/arrange/SKILL.md +127 -0
  94. package/config/agent/skills/impeccable/audit/SKILL.md +128 -0
  95. package/config/agent/skills/impeccable/bolder/SKILL.md +119 -0
  96. package/config/agent/skills/impeccable/clarify/SKILL.md +185 -0
  97. package/config/agent/skills/impeccable/colorize/SKILL.md +145 -0
  98. package/config/agent/skills/impeccable/critique/SKILL.md +122 -0
  99. package/config/agent/skills/impeccable/delight/SKILL.md +306 -0
  100. package/config/agent/skills/impeccable/distill/SKILL.md +124 -0
  101. package/config/agent/skills/impeccable/extract/SKILL.md +94 -0
  102. package/config/agent/skills/impeccable/frontend-design/reference/color-and-contrast.md +132 -0
  103. package/config/agent/skills/impeccable/frontend-design/reference/interaction-design.md +123 -0
  104. package/config/agent/skills/impeccable/frontend-design/reference/motion-design.md +99 -0
  105. package/config/agent/skills/impeccable/frontend-design/reference/responsive-design.md +114 -0
  106. package/config/agent/skills/impeccable/frontend-design/reference/spatial-design.md +100 -0
  107. package/config/agent/skills/impeccable/frontend-design/reference/typography.md +133 -0
  108. package/config/agent/skills/impeccable/frontend-design/reference/ux-writing.md +107 -0
  109. package/config/agent/skills/impeccable/harden/SKILL.md +357 -0
  110. package/config/agent/skills/impeccable/normalize/SKILL.md +73 -0
  111. package/config/agent/skills/impeccable/onboard/SKILL.md +248 -0
  112. package/config/agent/skills/impeccable/optimize/SKILL.md +268 -0
  113. package/config/agent/skills/impeccable/overdrive/SKILL.md +144 -0
  114. package/config/agent/skills/impeccable/polish/SKILL.md +205 -0
  115. package/config/agent/skills/impeccable/quieter/SKILL.md +105 -0
  116. package/config/agent/skills/impeccable/teach-impeccable/SKILL.md +71 -0
  117. package/config/agent/skills/impeccable/typeset/SKILL.md +118 -0
  118. package/config/agent/skills/librarian/SKILL.md +5 -1
  119. package/config/agent/skills/markdown-to-html/SKILL.md +5 -2
  120. package/config/agent/skills/owasp-security/SKILL.md +539 -0
  121. package/config/agent/skills/pr/SKILL.md +5 -2
  122. package/config/agent/skills/receiving-code-review/SKILL.md +216 -0
  123. package/config/agent/skills/refactor/SKILL.md +5 -2
  124. package/config/agent/skills/requesting-code-review/SKILL.md +108 -0
  125. package/config/agent/skills/requesting-code-review/code-reviewer.md +146 -0
  126. package/config/agent/skills/session-learning/SKILL.md +185 -0
  127. package/config/agent/skills/skill-creator/SKILL.md +339 -213
  128. package/config/agent/skills/skill-creator/agents/analyzer.md +274 -0
  129. package/config/agent/skills/skill-creator/agents/comparator.md +202 -0
  130. package/config/agent/skills/skill-creator/agents/grader.md +223 -0
  131. package/config/agent/skills/skill-creator/assets/eval_review.html +146 -0
  132. package/config/agent/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  133. package/config/agent/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  134. package/config/agent/skills/skill-creator/references/schemas.md +430 -0
  135. package/config/agent/skills/skill-creator/scripts/__init__.py +0 -0
  136. package/config/agent/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  137. package/config/agent/skills/skill-creator/scripts/generate_report.py +326 -0
  138. package/config/agent/skills/skill-creator/scripts/improve_description.py +248 -0
  139. package/config/agent/skills/skill-creator/scripts/package_skill.py +33 -7
  140. package/config/agent/skills/skill-creator/scripts/quick_validate.py +11 -3
  141. package/config/agent/skills/skill-creator/scripts/run_eval.py +310 -0
  142. package/config/agent/skills/skill-creator/scripts/run_loop.py +332 -0
  143. package/config/agent/skills/skill-creator/scripts/utils.py +47 -0
  144. package/config/agent/skills/subagent-driven-development/SKILL.md +280 -0
  145. package/config/agent/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
  146. package/config/agent/skills/subagent-driven-development/implementer-prompt.md +113 -0
  147. package/config/agent/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  148. package/config/agent/skills/systematic-debugging/CREATION-LOG.md +119 -0
  149. package/config/agent/skills/systematic-debugging/SKILL.md +300 -0
  150. package/config/agent/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  151. package/config/agent/skills/systematic-debugging/condition-based-waiting.md +115 -0
  152. package/config/agent/skills/systematic-debugging/defense-in-depth.md +122 -0
  153. package/config/agent/skills/systematic-debugging/find-polluter.sh +63 -0
  154. package/config/agent/skills/systematic-debugging/root-cause-tracing.md +169 -0
  155. package/config/agent/skills/systematic-debugging/test-academic.md +14 -0
  156. package/config/agent/skills/systematic-debugging/test-pressure-1.md +58 -0
  157. package/config/agent/skills/systematic-debugging/test-pressure-2.md +68 -0
  158. package/config/agent/skills/systematic-debugging/test-pressure-3.md +69 -0
  159. package/config/agent/skills/test-driven-development/SKILL.md +375 -0
  160. package/config/agent/skills/test-driven-development/testing-anti-patterns.md +299 -0
  161. package/config/agent/skills/ui-ux-pro-max/SKILL.md +4 -1
  162. package/config/agent/skills/unit-test/SKILL.md +4 -2
  163. package/config/agent/skills/using-git-worktrees/SKILL.md +222 -0
  164. package/config/agent/skills/using-superpowers/SKILL.md +118 -0
  165. package/config/agent/skills/using-superpowers/references/codex-tools.md +25 -0
  166. package/config/agent/skills/using-superpowers/references/gemini-tools.md +33 -0
  167. package/config/agent/skills/verification-before-completion/SKILL.md +142 -0
  168. package/config/agent/skills/writing-plans/SKILL.md +148 -0
  169. package/config/agent/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  170. package/config/agent/skills/writing-skills/SKILL.md +669 -0
  171. package/config/agent/skills/writing-skills/anthropic-best-practices.md +1150 -0
  172. package/config/agent/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  173. package/config/agent/skills/writing-skills/graphviz-conventions.dot +172 -0
  174. package/config/agent/skills/writing-skills/persuasion-principles.md +187 -0
  175. package/config/agent/skills/writing-skills/render-graphs.js +168 -0
  176. package/config/agent/skills/writing-skills/testing-skills-with-subagents.md +384 -0
  177. package/config.json +23 -2
  178. package/dist/banner.js +3 -3
  179. package/dist/banner.js.map +1 -1
  180. package/package.json +21 -16
  181. package/scripts/banner.txt +4 -3
  182. package/scripts/postinstall.js +203 -11
  183. package/config/agent/prompts/git-rollback.md +0 -91
  184. package/config/agent/prompts/git-worktree.md +0 -277
  185. package/config/agent/prompts/help.md +0 -10
  186. package/config/agent/skills/github/SKILL.md +0 -47
  187. package/config/agent/skills/skill-creator/references/output-patterns.md +0 -82
  188. package/config/agent/skills/skill-creator/references/workflows.md +0 -28
  189. package/config/agent/skills/skill-creator/scripts/init_skill.py +0 -303
@@ -0,0 +1,222 @@
1
+ ---
2
+ name: using-git-worktrees
3
+ description: "Create isolated git worktrees with smart directory selection and safety verification. Use when needing worktree isolation, creating branch worktrees, or managing multiple branches."
4
+ disable-model-invocation: true
5
+ metadata:
6
+ version: "1.0.0"
7
+ author: "xujianjiang"
8
+ ---
9
+
10
+ # Using Git Worktrees
11
+
12
+ ## Overview
13
+
14
+ Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
15
+
16
+ **Core principle:** Systematic directory selection + safety verification = reliable isolation.
17
+
18
+ **Announce at start:** "I'm using the using-git-worktrees skill to set up an isolated workspace."
19
+
20
+ ## Directory Selection Process
21
+
22
+ Follow this priority order:
23
+
24
+ ### 1. Check Existing Directories
25
+
26
+ ```bash
27
+ # Check in priority order
28
+ ls -d .worktrees 2>/dev/null # Preferred (hidden)
29
+ ls -d worktrees 2>/dev/null # Alternative
30
+ ```
31
+
32
+ **If found:** Use that directory. If both exist, `.worktrees` wins.
33
+
34
+ ### 2. Check CLAUDE.md
35
+
36
+ ```bash
37
+ grep -i "worktree.*director" CLAUDE.md 2>/dev/null
38
+ ```
39
+
40
+ **If preference specified:** Use it without asking.
41
+
42
+ ### 3. Ask User
43
+
44
+ If no directory exists and no CLAUDE.md preference:
45
+
46
+ ```
47
+ No worktree directory found. Where should I create worktrees?
48
+
49
+ 1. .worktrees/ (project-local, hidden)
50
+ 2. ~/.config/superpowers/worktrees/<project-name>/ (global location)
51
+
52
+ Which would you prefer?
53
+ ```
54
+
55
+ ## Safety Verification
56
+
57
+ ### For Project-Local Directories (.worktrees or worktrees)
58
+
59
+ **MUST verify directory is ignored before creating worktree:**
60
+
61
+ ```bash
62
+ # Check if directory is ignored (respects local, global, and system gitignore)
63
+ git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null
64
+ ```
65
+
66
+ **If NOT ignored:**
67
+
68
+ Per Jesse's rule "Fix broken things immediately":
69
+ 1. Add appropriate line to .gitignore
70
+ 2. Commit the change
71
+ 3. Proceed with worktree creation
72
+
73
+ **Why critical:** Prevents accidentally committing worktree contents to repository.
74
+
75
+ ### For Global Directory (~/.config/superpowers/worktrees)
76
+
77
+ No .gitignore verification needed - outside project entirely.
78
+
79
+ ## Creation Steps
80
+
81
+ ### 1. Detect Project Name
82
+
83
+ ```bash
84
+ project=$(basename "$(git rev-parse --show-toplevel)")
85
+ ```
86
+
87
+ ### 2. Create Worktree
88
+
89
+ ```bash
90
+ # Determine full path
91
+ case $LOCATION in
92
+ .worktrees|worktrees)
93
+ path="$LOCATION/$BRANCH_NAME"
94
+ ;;
95
+ ~/.config/superpowers/worktrees/*)
96
+ path="~/.config/superpowers/worktrees/$project/$BRANCH_NAME"
97
+ ;;
98
+ esac
99
+
100
+ # Create worktree with new branch
101
+ git worktree add "$path" -b "$BRANCH_NAME"
102
+ cd "$path"
103
+ ```
104
+
105
+ ### 3. Run Project Setup
106
+
107
+ Auto-detect and run appropriate setup:
108
+
109
+ ```bash
110
+ # Node.js
111
+ if [ -f package.json ]; then npm install; fi
112
+
113
+ # Rust
114
+ if [ -f Cargo.toml ]; then cargo build; fi
115
+
116
+ # Python
117
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
118
+ if [ -f pyproject.toml ]; then poetry install; fi
119
+
120
+ # Go
121
+ if [ -f go.mod ]; then go mod download; fi
122
+ ```
123
+
124
+ ### 4. Verify Clean Baseline
125
+
126
+ Run tests to ensure worktree starts clean:
127
+
128
+ ```bash
129
+ # Examples - use project-appropriate command
130
+ npm test
131
+ cargo test
132
+ pytest
133
+ go test ./...
134
+ ```
135
+
136
+ **If tests fail:** Report failures, ask whether to proceed or investigate.
137
+
138
+ **If tests pass:** Report ready.
139
+
140
+ ### 5. Report Location
141
+
142
+ ```
143
+ Worktree ready at <full-path>
144
+ Tests passing (<N> tests, 0 failures)
145
+ Ready to implement <feature-name>
146
+ ```
147
+
148
+ ## Quick Reference
149
+
150
+ | Situation | Action |
151
+ |-----------|--------|
152
+ | `.worktrees/` exists | Use it (verify ignored) |
153
+ | `worktrees/` exists | Use it (verify ignored) |
154
+ | Both exist | Use `.worktrees/` |
155
+ | Neither exists | Check CLAUDE.md → Ask user |
156
+ | Directory not ignored | Add to .gitignore + commit |
157
+ | Tests fail during baseline | Report failures + ask |
158
+ | No package.json/Cargo.toml | Skip dependency install |
159
+
160
+ ## Common Mistakes
161
+
162
+ ### Skipping ignore verification
163
+
164
+ - **Problem:** Worktree contents get tracked, pollute git status
165
+ - **Fix:** Always use `git check-ignore` before creating project-local worktree
166
+
167
+ ### Assuming directory location
168
+
169
+ - **Problem:** Creates inconsistency, violates project conventions
170
+ - **Fix:** Follow priority: existing > CLAUDE.md > ask
171
+
172
+ ### Proceeding with failing tests
173
+
174
+ - **Problem:** Can't distinguish new bugs from pre-existing issues
175
+ - **Fix:** Report failures, get explicit permission to proceed
176
+
177
+ ### Hardcoding setup commands
178
+
179
+ - **Problem:** Breaks on projects using different tools
180
+ - **Fix:** Auto-detect from project files (package.json, etc.)
181
+
182
+ ## Example Workflow
183
+
184
+ ```
185
+ You: I'm using the using-git-worktrees skill to set up an isolated workspace.
186
+
187
+ [Check .worktrees/ - exists]
188
+ [Verify ignored - git check-ignore confirms .worktrees/ is ignored]
189
+ [Create worktree: git worktree add .worktrees/auth -b feature/auth]
190
+ [Run npm install]
191
+ [Run npm test - 47 passing]
192
+
193
+ Worktree ready at /Users/jesse/myproject/.worktrees/auth
194
+ Tests passing (47 tests, 0 failures)
195
+ Ready to implement auth feature
196
+ ```
197
+
198
+ ## Red Flags
199
+
200
+ **Never:**
201
+ - Create worktree without verifying it's ignored (project-local)
202
+ - Skip baseline test verification
203
+ - Proceed with failing tests without asking
204
+ - Assume directory location when ambiguous
205
+ - Skip CLAUDE.md check
206
+
207
+ **Always:**
208
+ - Follow directory priority: existing > CLAUDE.md > ask
209
+ - Verify directory is ignored for project-local
210
+ - Auto-detect and run project setup
211
+ - Verify clean test baseline
212
+
213
+ ## Integration
214
+
215
+ **Called by:**
216
+ - **brainstorming** (Phase 4) - REQUIRED when design is approved and implementation follows
217
+ - **subagent-driven-development** - REQUIRED before executing any tasks
218
+ - **executing-plans** - REQUIRED before executing any tasks
219
+ - Any skill needing isolated workspace
220
+
221
+ **Pairs with:**
222
+ - **finishing-a-development-branch** - REQUIRED for cleanup after work complete
@@ -0,0 +1,118 @@
1
+ ---
2
+ name: using-superpowers
3
+ description: "Establish how to find and use skills in any conversation. Use when asking about capabilities, discovering skills, or learning what you can do."
4
+ metadata:
5
+ version: "1.0.0"
6
+ author: "xujianjiang"
7
+ ---
8
+
9
+ <SUBAGENT-STOP>
10
+ If you were dispatched as a subagent to execute a specific task, skip this skill.
11
+ </SUBAGENT-STOP>
12
+
13
+ <EXTREMELY-IMPORTANT>
14
+ If you think there is even a 1% chance a skill might apply to what you are doing, you ABSOLUTELY MUST invoke the skill.
15
+
16
+ IF A SKILL APPLIES TO YOUR TASK, YOU DO NOT HAVE A CHOICE. YOU MUST USE IT.
17
+
18
+ This is not negotiable. This is not optional. You cannot rationalize your way out of this.
19
+ </EXTREMELY-IMPORTANT>
20
+
21
+ ## Instruction Priority
22
+
23
+ Superpowers skills override default system prompt behavior, but **user instructions always take precedence**:
24
+
25
+ 1. **User's explicit instructions** (CLAUDE.md, GEMINI.md, AGENTS.md, direct requests) — highest priority
26
+ 2. **Superpowers skills** — override default system behavior where they conflict
27
+ 3. **Default system prompt** — lowest priority
28
+
29
+ If CLAUDE.md, GEMINI.md, or AGENTS.md says "don't use TDD" and a skill says "always use TDD," follow the user's instructions. The user is in control.
30
+
31
+ ## How to Access Skills
32
+
33
+ **In Claude Code:** Use the `Skill` tool. When you invoke a skill, its content is loaded and presented to you—follow it directly. Never use the Read tool on skill files.
34
+
35
+ **In Gemini CLI:** Skills activate via the `activate_skill` tool. Gemini loads skill metadata at session start and activates the full content on demand.
36
+
37
+ **In other environments:** Check your platform's documentation for how skills are loaded.
38
+
39
+ ## Platform Adaptation
40
+
41
+ Skills use Claude Code tool names. Non-CC platforms: see `references/codex-tools.md` (Codex) for tool equivalents. Gemini CLI users get the tool mapping loaded automatically via GEMINI.md.
42
+
43
+ # Using Skills
44
+
45
+ ## The Rule
46
+
47
+ **Invoke relevant or requested skills BEFORE any response or action.** Even a 1% chance a skill might apply means that you should invoke the skill to check. If an invoked skill turns out to be wrong for the situation, you don't need to use it.
48
+
49
+ ```dot
50
+ digraph skill_flow {
51
+ "User message received" [shape=doublecircle];
52
+ "About to EnterPlanMode?" [shape=doublecircle];
53
+ "Already brainstormed?" [shape=diamond];
54
+ "Invoke brainstorming skill" [shape=box];
55
+ "Might any skill apply?" [shape=diamond];
56
+ "Invoke Skill tool" [shape=box];
57
+ "Announce: 'Using [skill] to [purpose]'" [shape=box];
58
+ "Has checklist?" [shape=diamond];
59
+ "Create TodoWrite todo per item" [shape=box];
60
+ "Follow skill exactly" [shape=box];
61
+ "Respond (including clarifications)" [shape=doublecircle];
62
+
63
+ "About to EnterPlanMode?" -> "Already brainstormed?";
64
+ "Already brainstormed?" -> "Invoke brainstorming skill" [label="no"];
65
+ "Already brainstormed?" -> "Might any skill apply?" [label="yes"];
66
+ "Invoke brainstorming skill" -> "Might any skill apply?";
67
+
68
+ "User message received" -> "Might any skill apply?";
69
+ "Might any skill apply?" -> "Invoke Skill tool" [label="yes, even 1%"];
70
+ "Might any skill apply?" -> "Respond (including clarifications)" [label="definitely not"];
71
+ "Invoke Skill tool" -> "Announce: 'Using [skill] to [purpose]'";
72
+ "Announce: 'Using [skill] to [purpose]'" -> "Has checklist?";
73
+ "Has checklist?" -> "Create TodoWrite todo per item" [label="yes"];
74
+ "Has checklist?" -> "Follow skill exactly" [label="no"];
75
+ "Create TodoWrite todo per item" -> "Follow skill exactly";
76
+ }
77
+ ```
78
+
79
+ ## Red Flags
80
+
81
+ These thoughts mean STOP—you're rationalizing:
82
+
83
+ | Thought | Reality |
84
+ |---------|---------|
85
+ | "This is just a simple question" | Questions are tasks. Check for skills. |
86
+ | "I need more context first" | Skill check comes BEFORE clarifying questions. |
87
+ | "Let me explore the codebase first" | Skills tell you HOW to explore. Check first. |
88
+ | "I can check git/files quickly" | Files lack conversation context. Check for skills. |
89
+ | "Let me gather information first" | Skills tell you HOW to gather information. |
90
+ | "This doesn't need a formal skill" | If a skill exists, use it. |
91
+ | "I remember this skill" | Skills evolve. Read current version. |
92
+ | "This doesn't count as a task" | Action = task. Check for skills. |
93
+ | "The skill is overkill" | Simple things become complex. Use it. |
94
+ | "I'll just do this one thing first" | Check BEFORE doing anything. |
95
+ | "This feels productive" | Undisciplined action wastes time. Skills prevent this. |
96
+ | "I know what that means" | Knowing the concept ≠ using the skill. Invoke it. |
97
+
98
+ ## Skill Priority
99
+
100
+ When multiple skills could apply, use this order:
101
+
102
+ 1. **Process skills first** (brainstorming, debugging) - these determine HOW to approach the task
103
+ 2. **Implementation skills second** (frontend-design, mcp-builder) - these guide execution
104
+
105
+ "Let's build X" → brainstorming first, then implementation skills.
106
+ "Fix this bug" → debugging first, then domain-specific skills.
107
+
108
+ ## Skill Types
109
+
110
+ **Rigid** (TDD, debugging): Follow exactly. Don't adapt away discipline.
111
+
112
+ **Flexible** (patterns): Adapt principles to context.
113
+
114
+ The skill itself tells you which.
115
+
116
+ ## User Instructions
117
+
118
+ Instructions say WHAT, not HOW. "Add X" or "Fix Y" doesn't mean skip workflows.
@@ -0,0 +1,25 @@
1
+ # Codex Tool Mapping
2
+
3
+ Skills use Claude Code tool names. When you encounter these in a skill, use your platform equivalent:
4
+
5
+ | Skill references | Codex equivalent |
6
+ |-----------------|------------------|
7
+ | `Task` tool (dispatch subagent) | `spawn_agent` |
8
+ | Multiple `Task` calls (parallel) | Multiple `spawn_agent` calls |
9
+ | Task returns result | `wait` |
10
+ | Task completes automatically | `close_agent` to free slot |
11
+ | `TodoWrite` (task tracking) | `update_plan` |
12
+ | `Skill` tool (invoke a skill) | Skills load natively — just follow the instructions |
13
+ | `Read`, `Write`, `Edit` (files) | Use your native file tools |
14
+ | `Bash` (run commands) | Use your native shell tools |
15
+
16
+ ## Subagent dispatch requires multi-agent support
17
+
18
+ Add to your Codex config (`~/.codex/config.toml`):
19
+
20
+ ```toml
21
+ [features]
22
+ multi_agent = true
23
+ ```
24
+
25
+ This enables `spawn_agent`, `wait`, and `close_agent` for skills like `dispatching-parallel-agents` and `subagent-driven-development`.
@@ -0,0 +1,33 @@
1
+ # Gemini CLI Tool Mapping
2
+
3
+ Skills use Claude Code tool names. When you encounter these in a skill, use your platform equivalent:
4
+
5
+ | Skill references | Gemini CLI equivalent |
6
+ |-----------------|----------------------|
7
+ | `Read` (file reading) | `read_file` |
8
+ | `Write` (file creation) | `write_file` |
9
+ | `Edit` (file editing) | `replace` |
10
+ | `Bash` (run commands) | `run_shell_command` |
11
+ | `Grep` (search file content) | `grep_search` |
12
+ | `Glob` (search files by name) | `glob` |
13
+ | `TodoWrite` (task tracking) | `write_todos` |
14
+ | `Skill` tool (invoke a skill) | `activate_skill` |
15
+ | `WebSearch` | `google_web_search` |
16
+ | `WebFetch` | `web_fetch` |
17
+ | `Task` tool (dispatch subagent) | No equivalent — Gemini CLI does not support subagents |
18
+
19
+ ## No subagent support
20
+
21
+ Gemini CLI has no equivalent to Claude Code's `Task` tool. Skills that rely on subagent dispatch (`subagent-driven-development`, `dispatching-parallel-agents`) will fall back to single-session execution via `executing-plans`.
22
+
23
+ ## Additional Gemini CLI tools
24
+
25
+ These tools are available in Gemini CLI but have no Claude Code equivalent:
26
+
27
+ | Tool | Purpose |
28
+ |------|---------|
29
+ | `list_directory` | List files and subdirectories |
30
+ | `save_memory` | Persist facts to GEMINI.md across sessions |
31
+ | `ask_user` | Request structured input from the user |
32
+ | `tracker_create_task` | Rich task management (create, update, list, visualize) |
33
+ | `enter_plan_mode` / `exit_plan_mode` | Switch to read-only research mode before making changes |
@@ -0,0 +1,142 @@
1
+ ---
2
+ name: verification-before-completion
3
+ description: "Verify work is complete before claiming success. Requires running verification commands. Use when claiming work is complete, before committing, before creating PRs, or verifying tests pass."
4
+ metadata:
5
+ version: "1.0.0"
6
+ author: "xujianjiang"
7
+ ---
8
+
9
+ # Verification Before Completion
10
+
11
+ ## Overview
12
+
13
+ Claiming work is complete without verification is dishonesty, not efficiency.
14
+
15
+ **Core principle:** Evidence before claims, always.
16
+
17
+ **Violating the letter of this rule is violating the spirit of this rule.**
18
+
19
+ ## The Iron Law
20
+
21
+ ```
22
+ NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
23
+ ```
24
+
25
+ If you haven't run the verification command in this message, you cannot claim it passes.
26
+
27
+ ## The Gate Function
28
+
29
+ ```
30
+ BEFORE claiming any status or expressing satisfaction:
31
+
32
+ 1. IDENTIFY: What command proves this claim?
33
+ 2. RUN: Execute the FULL command (fresh, complete)
34
+ 3. READ: Full output, check exit code, count failures
35
+ 4. VERIFY: Does output confirm the claim?
36
+ - If NO: State actual status with evidence
37
+ - If YES: State claim WITH evidence
38
+ 5. ONLY THEN: Make the claim
39
+
40
+ Skip any step = lying, not verifying
41
+ ```
42
+
43
+ ## Common Failures
44
+
45
+ | Claim | Requires | Not Sufficient |
46
+ |-------|----------|----------------|
47
+ | Tests pass | Test command output: 0 failures | Previous run, "should pass" |
48
+ | Linter clean | Linter output: 0 errors | Partial check, extrapolation |
49
+ | Build succeeds | Build command: exit 0 | Linter passing, logs look good |
50
+ | Bug fixed | Test original symptom: passes | Code changed, assumed fixed |
51
+ | Regression test works | Red-green cycle verified | Test passes once |
52
+ | Agent completed | VCS diff shows changes | Agent reports "success" |
53
+ | Requirements met | Line-by-line checklist | Tests passing |
54
+
55
+ ## Red Flags - STOP
56
+
57
+ - Using "should", "probably", "seems to"
58
+ - Expressing satisfaction before verification ("Great!", "Perfect!", "Done!", etc.)
59
+ - About to commit/push/PR without verification
60
+ - Trusting agent success reports
61
+ - Relying on partial verification
62
+ - Thinking "just this once"
63
+ - Tired and wanting work over
64
+ - **ANY wording implying success without having run verification**
65
+
66
+ ## Rationalization Prevention
67
+
68
+ | Excuse | Reality |
69
+ |--------|---------|
70
+ | "Should work now" | RUN the verification |
71
+ | "I'm confident" | Confidence ≠ evidence |
72
+ | "Just this once" | No exceptions |
73
+ | "Linter passed" | Linter ≠ compiler |
74
+ | "Agent said success" | Verify independently |
75
+ | "I'm tired" | Exhaustion ≠ excuse |
76
+ | "Partial check is enough" | Partial proves nothing |
77
+ | "Different words so rule doesn't apply" | Spirit over letter |
78
+
79
+ ## Key Patterns
80
+
81
+ **Tests:**
82
+ ```
83
+ ✅ [Run test command] [See: 34/34 pass] "All tests pass"
84
+ ❌ "Should pass now" / "Looks correct"
85
+ ```
86
+
87
+ **Regression tests (TDD Red-Green):**
88
+ ```
89
+ ✅ Write → Run (pass) → Revert fix → Run (MUST FAIL) → Restore → Run (pass)
90
+ ❌ "I've written a regression test" (without red-green verification)
91
+ ```
92
+
93
+ **Build:**
94
+ ```
95
+ ✅ [Run build] [See: exit 0] "Build passes"
96
+ ❌ "Linter passed" (linter doesn't check compilation)
97
+ ```
98
+
99
+ **Requirements:**
100
+ ```
101
+ ✅ Re-read plan → Create checklist → Verify each → Report gaps or completion
102
+ ❌ "Tests pass, phase complete"
103
+ ```
104
+
105
+ **Agent delegation:**
106
+ ```
107
+ ✅ Agent reports success → Check VCS diff → Verify changes → Report actual state
108
+ ❌ Trust agent report
109
+ ```
110
+
111
+ ## Why This Matters
112
+
113
+ From 24 failure memories:
114
+ - your human partner said "I don't believe you" - trust broken
115
+ - Undefined functions shipped - would crash
116
+ - Missing requirements shipped - incomplete features
117
+ - Time wasted on false completion → redirect → rework
118
+ - Violates: "Honesty is a core value. If you lie, you'll be replaced."
119
+
120
+ ## When To Apply
121
+
122
+ **ALWAYS before:**
123
+ - ANY variation of success/completion claims
124
+ - ANY expression of satisfaction
125
+ - ANY positive statement about work state
126
+ - Committing, PR creation, task completion
127
+ - Moving to next task
128
+ - Delegating to agents
129
+
130
+ **Rule applies to:**
131
+ - Exact phrases
132
+ - Paraphrases and synonyms
133
+ - Implications of success
134
+ - ANY communication suggesting completion/correctness
135
+
136
+ ## The Bottom Line
137
+
138
+ **No shortcuts for verification.**
139
+
140
+ Run the command. Read the output. THEN claim the result.
141
+
142
+ This is non-negotiable.
@@ -0,0 +1,148 @@
1
+ ---
2
+ name: writing-plans
3
+ description: "Write implementation plans from specs or requirements for multi-step tasks. Use when writing plans, making implementation plans, or planning development."
4
+ metadata:
5
+ version: "1.0.0"
6
+ author: "xujianjiang"
7
+ ---
8
+
9
+ # Writing Plans
10
+
11
+ ## Overview
12
+
13
+ Write comprehensive implementation plans assuming the engineer has zero context for our codebase and questionable taste. Document everything they need to know: which files to touch for each task, code, testing, docs they might need to check, how to test it. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
14
+
15
+ Assume they are a skilled developer, but know almost nothing about our toolset or problem domain. Assume they don't know good test design very well.
16
+
17
+ **Announce at start:** "I'm using the writing-plans skill to create the implementation plan."
18
+
19
+ **Context:** This should be run in a dedicated worktree (created by brainstorming skill).
20
+
21
+ **Save plans to:** `docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md`
22
+ - (User preferences for plan location override this default)
23
+
24
+ ## Scope Check
25
+
26
+ If the spec covers multiple independent subsystems, it should have been broken into sub-project specs during brainstorming. If it wasn't, suggest breaking this into separate plans — one per subsystem. Each plan should produce working, testable software on its own.
27
+
28
+ ## File Structure
29
+
30
+ Before defining tasks, map out which files will be created or modified and what each one is responsible for. This is where decomposition decisions get locked in.
31
+
32
+ - Design units with clear boundaries and well-defined interfaces. Each file should have one clear responsibility.
33
+ - You reason best about code you can hold in context at once, and your edits are more reliable when files are focused. Prefer smaller, focused files over large ones that do too much.
34
+ - Files that change together should live together. Split by responsibility, not by technical layer.
35
+ - In existing codebases, follow established patterns. If the codebase uses large files, don't unilaterally restructure - but if a file you're modifying has grown unwieldy, including a split in the plan is reasonable.
36
+
37
+ This structure informs the task decomposition. Each task should produce self-contained changes that make sense independently.
38
+
39
+ ## Bite-Sized Task Granularity
40
+
41
+ **Each step is one action (2-5 minutes):**
42
+ - "Write the failing test" - step
43
+ - "Run it to make sure it fails" - step
44
+ - "Implement the minimal code to make the test pass" - step
45
+ - "Run the tests and make sure they pass" - step
46
+ - "Commit" - step
47
+
48
+ ## Plan Document Header
49
+
50
+ **Every plan MUST start with this header:**
51
+
52
+ ```markdown
53
+ # [Feature Name] Implementation Plan
54
+
55
+ > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
56
+
57
+ **Goal:** [One sentence describing what this builds]
58
+
59
+ **Architecture:** [2-3 sentences about approach]
60
+
61
+ **Tech Stack:** [Key technologies/libraries]
62
+
63
+ ---
64
+ ```
65
+
66
+ ## Task Structure
67
+
68
+ ````markdown
69
+ ### Task N: [Component Name]
70
+
71
+ **Files:**
72
+ - Create: `exact/path/to/file.py`
73
+ - Modify: `exact/path/to/existing.py:123-145`
74
+ - Test: `tests/exact/path/to/test.py`
75
+
76
+ - [ ] **Step 1: Write the failing test**
77
+
78
+ ```python
79
+ def test_specific_behavior():
80
+ result = function(input)
81
+ assert result == expected
82
+ ```
83
+
84
+ - [ ] **Step 2: Run test to verify it fails**
85
+
86
+ Run: `pytest tests/path/test.py::test_name -v`
87
+ Expected: FAIL with "function not defined"
88
+
89
+ - [ ] **Step 3: Write minimal implementation**
90
+
91
+ ```python
92
+ def function(input):
93
+ return expected
94
+ ```
95
+
96
+ - [ ] **Step 4: Run test to verify it passes**
97
+
98
+ Run: `pytest tests/path/test.py::test_name -v`
99
+ Expected: PASS
100
+
101
+ - [ ] **Step 5: Commit**
102
+
103
+ ```bash
104
+ git add tests/path/test.py src/path/file.py
105
+ git commit -m "feat: add specific feature"
106
+ ```
107
+ ````
108
+
109
+ ## Remember
110
+ - Exact file paths always
111
+ - Complete code in plan (not "add validation")
112
+ - Exact commands with expected output
113
+ - Reference relevant skills with @ syntax
114
+ - DRY, YAGNI, TDD, frequent commits
115
+
116
+ ## Plan Review Loop
117
+
118
+ After writing the complete plan:
119
+
120
+ 1. Dispatch a single plan-document-reviewer subagent (see plan-document-reviewer-prompt.md) with precisely crafted review context — never your session history. This keeps the reviewer focused on the plan, not your thought process.
121
+ - Provide: path to the plan document, path to spec document
122
+ 2. If ❌ Issues Found: fix the issues, re-dispatch reviewer for the whole plan
123
+ 3. If ✅ Approved: proceed to execution handoff
124
+
125
+ **Review loop guidance:**
126
+ - Same agent that wrote the plan fixes it (preserves context)
127
+ - If loop exceeds 3 iterations, surface to human for guidance
128
+ - Reviewers are advisory — explain disagreements if you believe feedback is incorrect
129
+
130
+ ## Execution Handoff
131
+
132
+ After saving the plan, offer execution choice:
133
+
134
+ **"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. Two execution options:**
135
+
136
+ **1. Subagent-Driven (recommended)** - I dispatch a fresh subagent per task, review between tasks, fast iteration
137
+
138
+ **2. Inline Execution** - Execute tasks in this session using executing-plans, batch execution with checkpoints
139
+
140
+ **Which approach?"**
141
+
142
+ **If Subagent-Driven chosen:**
143
+ - **REQUIRED SUB-SKILL:** Use superpowers:subagent-driven-development
144
+ - Fresh subagent per task + two-stage review
145
+
146
+ **If Inline Execution chosen:**
147
+ - **REQUIRED SUB-SKILL:** Use superpowers:executing-plans
148
+ - Batch execution with checkpoints for review