@ia-ccun/code-agent-cli 0.0.2 → 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 +20 -15
  181. package/scripts/banner.txt +6 -0
  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,286 @@
1
+ # Visual Companion Guide
2
+
3
+ Browser-based visual brainstorming companion for showing mockups, diagrams, and options.
4
+
5
+ ## When to Use
6
+
7
+ Decide per-question, not per-session. The test: **would the user understand this better by seeing it than reading it?**
8
+
9
+ **Use the browser** when the content itself is visual:
10
+
11
+ - **UI mockups** — wireframes, layouts, navigation structures, component designs
12
+ - **Architecture diagrams** — system components, data flow, relationship maps
13
+ - **Side-by-side visual comparisons** — comparing two layouts, two color schemes, two design directions
14
+ - **Design polish** — when the question is about look and feel, spacing, visual hierarchy
15
+ - **Spatial relationships** — state machines, flowcharts, entity relationships rendered as diagrams
16
+
17
+ **Use the terminal** when the content is text or tabular:
18
+
19
+ - **Requirements and scope questions** — "what does X mean?", "which features are in scope?"
20
+ - **Conceptual A/B/C choices** — picking between approaches described in words
21
+ - **Tradeoff lists** — pros/cons, comparison tables
22
+ - **Technical decisions** — API design, data modeling, architectural approach selection
23
+ - **Clarifying questions** — anything where the answer is words, not a visual preference
24
+
25
+ A question *about* a UI topic is not automatically a visual question. "What kind of wizard do you want?" is conceptual — use the terminal. "Which of these wizard layouts feels right?" is visual — use the browser.
26
+
27
+ ## How It Works
28
+
29
+ The server watches a directory for HTML files and serves the newest one to the browser. You write HTML content, the user sees it in their browser and can click to select options. Selections are recorded to a `.events` file that you read on your next turn.
30
+
31
+ **Content fragments vs full documents:** If your HTML file starts with `<!DOCTYPE` or `<html`, the server serves it as-is (just injects the helper script). Otherwise, the server automatically wraps your content in the frame template — adding the header, CSS theme, selection indicator, and all interactive infrastructure. **Write content fragments by default.** Only write full documents when you need complete control over the page.
32
+
33
+ ## Starting a Session
34
+
35
+ ```bash
36
+ # Start server with persistence (mockups saved to project)
37
+ scripts/start-server.sh --project-dir /path/to/project
38
+
39
+ # Returns: {"type":"server-started","port":52341,"url":"http://localhost:52341",
40
+ # "screen_dir":"/path/to/project/.superpowers/brainstorm/12345-1706000000"}
41
+ ```
42
+
43
+ Save `screen_dir` from the response. Tell user to open the URL.
44
+
45
+ **Finding connection info:** The server writes its startup JSON to `$SCREEN_DIR/.server-info`. If you launched the server in the background and didn't capture stdout, read that file to get the URL and port. When using `--project-dir`, check `<project>/.superpowers/brainstorm/` for the session directory.
46
+
47
+ **Note:** Pass the project root as `--project-dir` so mockups persist in `.superpowers/brainstorm/` and survive server restarts. Without it, files go to `/tmp` and get cleaned up. Remind the user to add `.superpowers/` to `.gitignore` if it's not already there.
48
+
49
+ **Launching the server by platform:**
50
+
51
+ **Claude Code (macOS / Linux):**
52
+ ```bash
53
+ # Default mode works — the script backgrounds the server itself
54
+ scripts/start-server.sh --project-dir /path/to/project
55
+ ```
56
+
57
+ **Claude Code (Windows):**
58
+ ```bash
59
+ # Windows auto-detects and uses foreground mode, which blocks the tool call.
60
+ # Use run_in_background: true on the Bash tool call so the server survives
61
+ # across conversation turns.
62
+ scripts/start-server.sh --project-dir /path/to/project
63
+ ```
64
+ When calling this via the Bash tool, set `run_in_background: true`. Then read `$SCREEN_DIR/.server-info` on the next turn to get the URL and port.
65
+
66
+ **Codex:**
67
+ ```bash
68
+ # Codex reaps background processes. The script auto-detects CODEX_CI and
69
+ # switches to foreground mode. Run it normally — no extra flags needed.
70
+ scripts/start-server.sh --project-dir /path/to/project
71
+ ```
72
+
73
+ **Gemini CLI:**
74
+ ```bash
75
+ # Use --foreground and set is_background: true on your shell tool call
76
+ # so the process survives across turns
77
+ scripts/start-server.sh --project-dir /path/to/project --foreground
78
+ ```
79
+
80
+ **Other environments:** The server must keep running in the background across conversation turns. If your environment reaps detached processes, use `--foreground` and launch the command with your platform's background execution mechanism.
81
+
82
+ If the URL is unreachable from your browser (common in remote/containerized setups), bind a non-loopback host:
83
+
84
+ ```bash
85
+ scripts/start-server.sh \
86
+ --project-dir /path/to/project \
87
+ --host 0.0.0.0 \
88
+ --url-host localhost
89
+ ```
90
+
91
+ Use `--url-host` to control what hostname is printed in the returned URL JSON.
92
+
93
+ ## The Loop
94
+
95
+ 1. **Check server is alive**, then **write HTML** to a new file in `screen_dir`:
96
+ - Before each write, check that `$SCREEN_DIR/.server-info` exists. If it doesn't (or `.server-stopped` exists), the server has shut down — restart it with `start-server.sh` before continuing. The server auto-exits after 30 minutes of inactivity.
97
+ - Use semantic filenames: `platform.html`, `visual-style.html`, `layout.html`
98
+ - **Never reuse filenames** — each screen gets a fresh file
99
+ - Use Write tool — **never use cat/heredoc** (dumps noise into terminal)
100
+ - Server automatically serves the newest file
101
+
102
+ 2. **Tell user what to expect and end your turn:**
103
+ - Remind them of the URL (every step, not just first)
104
+ - Give a brief text summary of what's on screen (e.g., "Showing 3 layout options for the homepage")
105
+ - Ask them to respond in the terminal: "Take a look and let me know what you think. Click to select an option if you'd like."
106
+
107
+ 3. **On your next turn** — after the user responds in the terminal:
108
+ - Read `$SCREEN_DIR/.events` if it exists — this contains the user's browser interactions (clicks, selections) as JSON lines
109
+ - Merge with the user's terminal text to get the full picture
110
+ - The terminal message is the primary feedback; `.events` provides structured interaction data
111
+
112
+ 4. **Iterate or advance** — if feedback changes current screen, write a new file (e.g., `layout-v2.html`). Only move to the next question when the current step is validated.
113
+
114
+ 5. **Unload when returning to terminal** — when the next step doesn't need the browser (e.g., a clarifying question, a tradeoff discussion), push a waiting screen to clear the stale content:
115
+
116
+ ```html
117
+ <!-- filename: waiting.html (or waiting-2.html, etc.) -->
118
+ <div style="display:flex;align-items:center;justify-content:center;min-height:60vh">
119
+ <p class="subtitle">Continuing in terminal...</p>
120
+ </div>
121
+ ```
122
+
123
+ This prevents the user from staring at a resolved choice while the conversation has moved on. When the next visual question comes up, push a new content file as usual.
124
+
125
+ 6. Repeat until done.
126
+
127
+ ## Writing Content Fragments
128
+
129
+ Write just the content that goes inside the page. The server wraps it in the frame template automatically (header, theme CSS, selection indicator, and all interactive infrastructure).
130
+
131
+ **Minimal example:**
132
+
133
+ ```html
134
+ <h2>Which layout works better?</h2>
135
+ <p class="subtitle">Consider readability and visual hierarchy</p>
136
+
137
+ <div class="options">
138
+ <div class="option" data-choice="a" onclick="toggleSelect(this)">
139
+ <div class="letter">A</div>
140
+ <div class="content">
141
+ <h3>Single Column</h3>
142
+ <p>Clean, focused reading experience</p>
143
+ </div>
144
+ </div>
145
+ <div class="option" data-choice="b" onclick="toggleSelect(this)">
146
+ <div class="letter">B</div>
147
+ <div class="content">
148
+ <h3>Two Column</h3>
149
+ <p>Sidebar navigation with main content</p>
150
+ </div>
151
+ </div>
152
+ </div>
153
+ ```
154
+
155
+ That's it. No `<html>`, no CSS, no `<script>` tags needed. The server provides all of that.
156
+
157
+ ## CSS Classes Available
158
+
159
+ The frame template provides these CSS classes for your content:
160
+
161
+ ### Options (A/B/C choices)
162
+
163
+ ```html
164
+ <div class="options">
165
+ <div class="option" data-choice="a" onclick="toggleSelect(this)">
166
+ <div class="letter">A</div>
167
+ <div class="content">
168
+ <h3>Title</h3>
169
+ <p>Description</p>
170
+ </div>
171
+ </div>
172
+ </div>
173
+ ```
174
+
175
+ **Multi-select:** Add `data-multiselect` to the container to let users select multiple options. Each click toggles the item. The indicator bar shows the count.
176
+
177
+ ```html
178
+ <div class="options" data-multiselect>
179
+ <!-- same option markup — users can select/deselect multiple -->
180
+ </div>
181
+ ```
182
+
183
+ ### Cards (visual designs)
184
+
185
+ ```html
186
+ <div class="cards">
187
+ <div class="card" data-choice="design1" onclick="toggleSelect(this)">
188
+ <div class="card-image"><!-- mockup content --></div>
189
+ <div class="card-body">
190
+ <h3>Name</h3>
191
+ <p>Description</p>
192
+ </div>
193
+ </div>
194
+ </div>
195
+ ```
196
+
197
+ ### Mockup container
198
+
199
+ ```html
200
+ <div class="mockup">
201
+ <div class="mockup-header">Preview: Dashboard Layout</div>
202
+ <div class="mockup-body"><!-- your mockup HTML --></div>
203
+ </div>
204
+ ```
205
+
206
+ ### Split view (side-by-side)
207
+
208
+ ```html
209
+ <div class="split">
210
+ <div class="mockup"><!-- left --></div>
211
+ <div class="mockup"><!-- right --></div>
212
+ </div>
213
+ ```
214
+
215
+ ### Pros/Cons
216
+
217
+ ```html
218
+ <div class="pros-cons">
219
+ <div class="pros"><h4>Pros</h4><ul><li>Benefit</li></ul></div>
220
+ <div class="cons"><h4>Cons</h4><ul><li>Drawback</li></ul></div>
221
+ </div>
222
+ ```
223
+
224
+ ### Mock elements (wireframe building blocks)
225
+
226
+ ```html
227
+ <div class="mock-nav">Logo | Home | About | Contact</div>
228
+ <div style="display: flex;">
229
+ <div class="mock-sidebar">Navigation</div>
230
+ <div class="mock-content">Main content area</div>
231
+ </div>
232
+ <button class="mock-button">Action Button</button>
233
+ <input class="mock-input" placeholder="Input field">
234
+ <div class="placeholder">Placeholder area</div>
235
+ ```
236
+
237
+ ### Typography and sections
238
+
239
+ - `h2` — page title
240
+ - `h3` — section heading
241
+ - `.subtitle` — secondary text below title
242
+ - `.section` — content block with bottom margin
243
+ - `.label` — small uppercase label text
244
+
245
+ ## Browser Events Format
246
+
247
+ When the user clicks options in the browser, their interactions are recorded to `$SCREEN_DIR/.events` (one JSON object per line). The file is cleared automatically when you push a new screen.
248
+
249
+ ```jsonl
250
+ {"type":"click","choice":"a","text":"Option A - Simple Layout","timestamp":1706000101}
251
+ {"type":"click","choice":"c","text":"Option C - Complex Grid","timestamp":1706000108}
252
+ {"type":"click","choice":"b","text":"Option B - Hybrid","timestamp":1706000115}
253
+ ```
254
+
255
+ The full event stream shows the user's exploration path — they may click multiple options before settling. The last `choice` event is typically the final selection, but the pattern of clicks can reveal hesitation or preferences worth asking about.
256
+
257
+ If `.events` doesn't exist, the user didn't interact with the browser — use only their terminal text.
258
+
259
+ ## Design Tips
260
+
261
+ - **Scale fidelity to the question** — wireframes for layout, polish for polish questions
262
+ - **Explain the question on each page** — "Which layout feels more professional?" not just "Pick one"
263
+ - **Iterate before advancing** — if feedback changes current screen, write a new version
264
+ - **2-4 options max** per screen
265
+ - **Use real content when it matters** — for a photography portfolio, use actual images (Unsplash). Placeholder content obscures design issues.
266
+ - **Keep mockups simple** — focus on layout and structure, not pixel-perfect design
267
+
268
+ ## File Naming
269
+
270
+ - Use semantic names: `platform.html`, `visual-style.html`, `layout.html`
271
+ - Never reuse filenames — each screen must be a new file
272
+ - For iterations: append version suffix like `layout-v2.html`, `layout-v3.html`
273
+ - Server serves newest file by modification time
274
+
275
+ ## Cleaning Up
276
+
277
+ ```bash
278
+ scripts/stop-server.sh $SCREEN_DIR
279
+ ```
280
+
281
+ If the session used `--project-dir`, mockup files persist in `.superpowers/brainstorm/` for later reference. Only `/tmp` sessions get deleted on stop.
282
+
283
+ ## Reference
284
+
285
+ - Frame template (CSS reference): `scripts/frame-template.html`
286
+ - Helper script (client-side): `scripts/helper.js`
@@ -1,7 +1,9 @@
1
1
  ---
2
2
  name: code-review
3
- description: "执行全面的代码审查,检查代码质量、安全性、性能和最佳实践。"
4
- author: xujianjiang
3
+ description: "执行全面的代码审查,检查代码质量、安全性、性能和最佳实践。Use when reviewing code, conducting code reviews, or checking code quality."
4
+ metadata:
5
+ version: "1.0.0"
6
+ author: "xujianjiang"
5
7
  ---
6
8
 
7
9
  # 代码审查 Skill
@@ -1,13 +1,15 @@
1
1
  ---
2
2
  name: commit
3
- description: "分析代码变更并生成规范的 Git commit 消息。"
4
- author: xujianjiang
3
+ description: "分析代码变更并生成规范的 Git commit 消息。Use when committing code, generating commit messages, or submitting to git."
4
+ metadata:
5
+ version: "1.0.0"
6
+ author: "xujianjiang"
5
7
  ---
6
8
 
7
9
  # Git Commit Skill
8
10
 
9
11
  ## 描述
10
- 分析代码变更并生成规范的 Git commit 消息。
12
+ 分析代码变更并生成规范的 Git commit 消息,按修改分类,修改内容较多时建议拆分commit
11
13
 
12
14
  ## 触发方式
13
15
  `/skill:commit`
@@ -28,21 +30,24 @@ author: xujianjiang
28
30
  - 格式: `<type>(<scope>): <description>`
29
31
  - 添加详细 body 说明(如果需要)
30
32
  - 添加 footer 用于 breaking changes 或 issue 引用
33
+ - **必须添加 AI 署名块**(见下方格式)
31
34
 
32
35
  4. **执行 Commit**
33
36
  - 先显示 commit 消息供用户确认
34
- - 用户确认后执行 `git commit -m "..."`
37
+ - 用户确认后执行 `git commit -m "..."` 或 `git commit -e -F .git/COMMIT_EDITMSG`
35
38
 
36
39
  ## 输出格式
37
40
 
38
41
  ```
39
- feat: 添加用户登录功能
42
+ feat: 添加用户登录功能 - By AICode
40
43
 
41
44
  - 实现用户名密码登录
42
45
  - 添加 token 验证
43
46
  - 集成 OAuth 第三方登录
44
47
 
45
48
  Closes #123
49
+
50
+ Co-Authored-By: AICode CLI <noreply@aicode-cli>
46
51
  ```
47
52
 
48
53
  ## 注意事项
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: csv-data-summarizer
3
- description: Analyzes CSV files, generates summary stats, and plots quick visualizations using Python and pandas.
3
+ description: "Analyzes CSV files, generates summary stats, and plots quick visualizations using Python and pandas. Use when analyzing CSV data, generating data statistics, or creating data visualizations."
4
+ disable-model-invocation: true
4
5
  metadata:
5
6
  version: 2.1.0
6
7
  dependencies: python>=3.8, pandas>=2.0.0, matplotlib>=3.7.0, seaborn>=0.12.0
@@ -0,0 +1,34 @@
1
+ # Stitch Design System Documentation Skill
2
+
3
+ ## Install
4
+
5
+ ```bash
6
+ npx skills add google-labs-code/stitch-skills --skill design-md --global
7
+ ```
8
+
9
+ ## Example Prompt
10
+
11
+ ```text
12
+ Analyze my Furniture Collection project's Home screen and generate a comprehensive DESIGN.md file documenting the design system.
13
+ ```
14
+
15
+ ## Skill Structure
16
+
17
+ This repository follows the **Agent Skills** open standard. Each skill is self-contained with its own logic, workflow, and reference materials.
18
+
19
+ ```text
20
+ design-md/
21
+ ├── SKILL.md — Core instructions & workflow
22
+ ├── examples/ — Sample DESIGN.md outputs
23
+ └── README.md — This file
24
+ ```
25
+
26
+ ## How it Works
27
+
28
+ When activated, the agent follows a structured design analysis pipeline:
29
+
30
+ 1. **Retrieval**: Uses the Stitch MCP Server to fetch project screens, HTML code, and design metadata.
31
+ 2. **Extraction**: Identifies design tokens including colors, typography, spacing, and component patterns.
32
+ 3. **Translation**: Converts technical CSS/Tailwind values into descriptive, natural design language.
33
+ 4. **Synthesis**: Generates a comprehensive DESIGN.md following the semantic design system format.
34
+ 5. **Alignment**: Ensures output follows Stitch Effective Prompting Guide principles for optimal screen generation.
@@ -0,0 +1,172 @@
1
+ ---
2
+ name: design-md
3
+ description: Analyze Stitch projects and synthesize a semantic design system into DESIGN.md files
4
+ allowed-tools:
5
+ - "stitch*:*"
6
+ - "Read"
7
+ - "Write"
8
+ - "web_fetch"
9
+ ---
10
+
11
+ # Stitch DESIGN.md Skill
12
+
13
+ You are an expert Design Systems Lead. Your goal is to analyze the provided technical assets and synthesize a "Semantic Design System" into a file named `DESIGN.md`.
14
+
15
+ ## Overview
16
+
17
+ This skill helps you create `DESIGN.md` files that serve as the "source of truth" for prompting Stitch to generate new screens that align perfectly with existing design language. Stitch interprets design through "Visual Descriptions" supported by specific color values.
18
+
19
+ ## Prerequisites
20
+
21
+ - Access to the Stitch MCP Server
22
+ - A Stitch project with at least one designed screen
23
+ - Access to the Stitch Effective Prompting Guide: https://stitch.withgoogle.com/docs/learn/prompting/
24
+
25
+ ## The Goal
26
+
27
+ The `DESIGN.md` file will serve as the "source of truth" for prompting Stitch to generate new screens that align perfectly with the existing design language. Stitch interprets design through "Visual Descriptions" supported by specific color values.
28
+
29
+ ## Retrieval and Networking
30
+
31
+ To analyze a Stitch project, you must retrieve screen metadata and design assets using the Stitch MCP Server tools:
32
+
33
+ 1. **Namespace discovery**: Run `list_tools` to find the Stitch MCP prefix. Use this prefix (e.g., `mcp_stitch:`) for all subsequent calls.
34
+
35
+ 2. **Project lookup** (if Project ID is not provided):
36
+ - Call `[prefix]:list_projects` with `filter: "view=owned"` to retrieve all user projects
37
+ - Identify the target project by title or URL pattern
38
+ - Extract the Project ID from the `name` field (e.g., `projects/13534454087919359824`)
39
+
40
+ 3. **Screen lookup** (if Screen ID is not provided):
41
+ - Call `[prefix]:list_screens` with the `projectId` (just the numeric ID, not the full path)
42
+ - Review screen titles to identify the target screen (e.g., "Home", "Landing Page")
43
+ - Extract the Screen ID from the screen's `name` field
44
+
45
+ 4. **Metadata fetch**:
46
+ - Call `[prefix]:get_screen` with both `projectId` and `screenId` (both as numeric IDs only)
47
+ - This returns the complete screen object including:
48
+ - `screenshot.downloadUrl` - Visual reference of the design
49
+ - `htmlCode.downloadUrl` - Full HTML/CSS source code
50
+ - `width`, `height`, `deviceType` - Screen dimensions and target platform
51
+ - Project metadata including `designTheme` with color and style information
52
+
53
+ 5. **Asset download**:
54
+ - Use `web_fetch` or `read_url_content` to download the HTML code from `htmlCode.downloadUrl`
55
+ - Optionally download the screenshot from `screenshot.downloadUrl` for visual reference
56
+ - Parse the HTML to extract Tailwind classes, custom CSS, and component patterns
57
+
58
+ 6. **Project metadata extraction**:
59
+ - Call `[prefix]:get_project` with the project `name` (full path: `projects/{id}`) to get:
60
+ - `designTheme` object with color mode, fonts, roundness, custom colors
61
+ - Project-level design guidelines and descriptions
62
+ - Device type preferences and layout principles
63
+
64
+ ## Analysis & Synthesis Instructions
65
+
66
+ ### 1. Extract Project Identity (JSON)
67
+ - Locate the Project Title
68
+ - Locate the specific Project ID (e.g., from the `name` field in the JSON)
69
+
70
+ ### 2. Define the Atmosphere (Image/HTML)
71
+ Evaluate the screenshot and HTML structure to capture the overall "vibe." Use evocative adjectives to describe the mood (e.g., "Airy," "Dense," "Minimalist," "Utilitarian").
72
+
73
+ ### 3. Map the Color Palette (Tailwind Config/JSON)
74
+ Identify the key colors in the system. For each color, provide:
75
+ - A descriptive, natural language name that conveys its character (e.g., "Deep Muted Teal-Navy")
76
+ - The specific hex code in parentheses for precision (e.g., "#294056")
77
+ - Its specific functional role (e.g., "Used for primary actions")
78
+
79
+ ### 4. Translate Geometry & Shape (CSS/Tailwind)
80
+ Convert technical `border-radius` and layout values into physical descriptions:
81
+ - Describe `rounded-full` as "Pill-shaped"
82
+ - Describe `rounded-lg` as "Subtly rounded corners"
83
+ - Describe `rounded-none` as "Sharp, squared-off edges"
84
+
85
+ ### 5. Describe Depth & Elevation
86
+ Explain how the UI handles layers. Describe the presence and quality of shadows (e.g., "Flat," "Whisper-soft diffused shadows," or "Heavy, high-contrast drop shadows").
87
+
88
+ ## Output Guidelines
89
+
90
+ - **Language:** Use descriptive design terminology and natural language exclusively
91
+ - **Format:** Generate a clean Markdown file following the structure below
92
+ - **Precision:** Include exact hex codes for colors while using descriptive names
93
+ - **Context:** Explain the "why" behind design decisions, not just the "what"
94
+
95
+ ## Output Format (DESIGN.md Structure)
96
+
97
+ ```markdown
98
+ # Design System: [Project Title]
99
+ **Project ID:** [Insert Project ID Here]
100
+
101
+ ## 1. Visual Theme & Atmosphere
102
+ (Description of the mood, density, and aesthetic philosophy.)
103
+
104
+ ## 2. Color Palette & Roles
105
+ (List colors by Descriptive Name + Hex Code + Functional Role.)
106
+
107
+ ## 3. Typography Rules
108
+ (Description of font family, weight usage for headers vs. body, and letter-spacing character.)
109
+
110
+ ## 4. Component Stylings
111
+ * **Buttons:** (Shape description, color assignment, behavior).
112
+ * **Cards/Containers:** (Corner roundness description, background color, shadow depth).
113
+ * **Inputs/Forms:** (Stroke style, background).
114
+
115
+ ## 5. Layout Principles
116
+ (Description of whitespace strategy, margins, and grid alignment.)
117
+ ```
118
+
119
+ ## Usage Example
120
+
121
+ To use this skill for the Furniture Collection project:
122
+
123
+ 1. **Retrieve project information:**
124
+ ```
125
+ Use the Stitch MCP Server to get the Furniture Collection project
126
+ ```
127
+
128
+ 2. **Get the Home page screen details:**
129
+ ```
130
+ Retrieve the Home page screen's code, image, and screen object information
131
+ ```
132
+
133
+ 3. **Reference best practices:**
134
+ ```
135
+ Review the Stitch Effective Prompting Guide at:
136
+ https://stitch.withgoogle.com/docs/learn/prompting/
137
+ ```
138
+
139
+ 4. **Analyze and synthesize:**
140
+ - Extract all relevant design tokens from the screen
141
+ - Translate technical values into descriptive language
142
+ - Organize information according to the DESIGN.md structure
143
+
144
+ 5. **Generate the file:**
145
+ - Create `DESIGN.md` in the project directory
146
+ - Follow the prescribed format exactly
147
+ - Ensure all color codes are accurate
148
+ - Use evocative, designer-friendly language
149
+
150
+ ## Best Practices
151
+
152
+ - **Be Descriptive:** Avoid generic terms like "blue" or "rounded." Use "Ocean-deep Cerulean (#0077B6)" or "Gently curved edges"
153
+ - **Be Functional:** Always explain what each design element is used for
154
+ - **Be Consistent:** Use the same terminology throughout the document
155
+ - **Be Visual:** Help readers visualize the design through your descriptions
156
+ - **Be Precise:** Include exact values (hex codes, pixel values) in parentheses after natural language descriptions
157
+
158
+ ## Tips for Success
159
+
160
+ 1. **Start with the big picture:** Understand the overall aesthetic before diving into details
161
+ 2. **Look for patterns:** Identify consistent spacing, sizing, and styling patterns
162
+ 3. **Think semantically:** Name colors by their purpose, not just their appearance
163
+ 4. **Consider hierarchy:** Document how visual weight and importance are communicated
164
+ 5. **Reference the guide:** Use language and patterns from the Stitch Effective Prompting Guide
165
+
166
+ ## Common Pitfalls to Avoid
167
+
168
+ - ❌ Using technical jargon without translation (e.g., "rounded-xl" instead of "generously rounded corners")
169
+ - ❌ Omitting color codes or using only descriptive names
170
+ - ❌ Forgetting to explain functional roles of design elements
171
+ - ❌ Being too vague in atmosphere descriptions
172
+ - ❌ Ignoring subtle design details like shadows or spacing patterns