@chankov/agent-skills 0.2.0 → 0.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 (178) hide show
  1. package/.claude/commands/{doctor.md → doctor-agent-skills.md} +1 -1
  2. package/.pi/extensions/agent-skills-update-check/README.md +4 -4
  3. package/.pi/prompts/{doctor.md → doctor-agent-skills.md} +1 -1
  4. package/.versions/0.2.0/.claude/commands/{doctor.md → doctor-agent-skills.md} +1 -1
  5. package/.versions/0.2.0/.pi/extensions/agent-skills-update-check/README.md +4 -4
  6. package/.versions/0.2.0/.pi/prompts/{doctor.md → doctor-agent-skills.md} +1 -1
  7. package/.versions/0.2.0/skills/guided-workspace-setup/SKILL.md +40 -2
  8. package/.versions/0.3.0/.claude/commands/build.md +18 -0
  9. package/.versions/0.3.0/.claude/commands/code-simplify.md +22 -0
  10. package/.versions/0.3.0/.claude/commands/design-agent.md +14 -0
  11. package/.versions/0.3.0/.claude/commands/doctor-agent-skills.md +13 -0
  12. package/.versions/0.3.0/.claude/commands/plan.md +16 -0
  13. package/.versions/0.3.0/.claude/commands/prime.md +22 -0
  14. package/.versions/0.3.0/.claude/commands/review.md +16 -0
  15. package/.versions/0.3.0/.claude/commands/setup-agent-skills.md +19 -0
  16. package/.versions/0.3.0/.claude/commands/ship.md +17 -0
  17. package/.versions/0.3.0/.claude/commands/spec.md +15 -0
  18. package/.versions/0.3.0/.claude/commands/test.md +19 -0
  19. package/.versions/0.3.0/.opencode/commands/as-build.md +17 -0
  20. package/.versions/0.3.0/.opencode/commands/as-code-simplify.md +16 -0
  21. package/.versions/0.3.0/.opencode/commands/as-design-agent.md +15 -0
  22. package/.versions/0.3.0/.opencode/commands/as-doctor-agent-skills.md +11 -0
  23. package/.versions/0.3.0/.opencode/commands/as-plan.md +16 -0
  24. package/.versions/0.3.0/.opencode/commands/as-prime.md +22 -0
  25. package/.versions/0.3.0/.opencode/commands/as-review.md +15 -0
  26. package/.versions/0.3.0/.opencode/commands/as-setup-agent-skills.md +11 -0
  27. package/.versions/0.3.0/.opencode/commands/as-ship.md +16 -0
  28. package/.versions/0.3.0/.opencode/commands/as-spec.md +16 -0
  29. package/.versions/0.3.0/.opencode/commands/as-test.md +21 -0
  30. package/.versions/0.3.0/.pi/agents/agent-chain.yaml +49 -0
  31. package/.versions/0.3.0/.pi/agents/bowser.md +19 -0
  32. package/.versions/0.3.0/.pi/agents/pi-pi/agent-expert.md +98 -0
  33. package/.versions/0.3.0/.pi/agents/pi-pi/cli-expert.md +41 -0
  34. package/.versions/0.3.0/.pi/agents/pi-pi/config-expert.md +63 -0
  35. package/.versions/0.3.0/.pi/agents/pi-pi/ext-expert.md +43 -0
  36. package/.versions/0.3.0/.pi/agents/pi-pi/keybinding-expert.md +134 -0
  37. package/.versions/0.3.0/.pi/agents/pi-pi/pi-orchestrator.md +57 -0
  38. package/.versions/0.3.0/.pi/agents/pi-pi/prompt-expert.md +70 -0
  39. package/.versions/0.3.0/.pi/agents/pi-pi/skill-expert.md +42 -0
  40. package/.versions/0.3.0/.pi/agents/pi-pi/theme-expert.md +40 -0
  41. package/.versions/0.3.0/.pi/agents/pi-pi/tui-expert.md +85 -0
  42. package/.versions/0.3.0/.pi/agents/teams.yaml +31 -0
  43. package/.versions/0.3.0/.pi/damage-control-rules.yaml +278 -0
  44. package/.versions/0.3.0/.pi/extensions/agent-skills-update-check/README.md +58 -0
  45. package/.versions/0.3.0/.pi/extensions/agent-skills-update-check/index.ts +161 -0
  46. package/.versions/0.3.0/.pi/extensions/agent-skills-update-check/package.json +6 -0
  47. package/.versions/0.3.0/.pi/extensions/chrome-devtools-mcp/README.md +39 -0
  48. package/.versions/0.3.0/.pi/extensions/chrome-devtools-mcp/index.ts +61 -0
  49. package/.versions/0.3.0/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  50. package/.versions/0.3.0/.pi/extensions/compact-and-continue/README.md +42 -0
  51. package/.versions/0.3.0/.pi/extensions/compact-and-continue/index.ts +120 -0
  52. package/.versions/0.3.0/.pi/extensions/compact-and-continue/package.json +6 -0
  53. package/.versions/0.3.0/.pi/extensions/mcp-bridge/README.md +46 -0
  54. package/.versions/0.3.0/.pi/extensions/mcp-bridge/index.ts +206 -0
  55. package/.versions/0.3.0/.pi/extensions/mcp-bridge/package.json +6 -0
  56. package/.versions/0.3.0/.pi/extensions/package-lock.json +1143 -0
  57. package/.versions/0.3.0/.pi/extensions/package.json +9 -0
  58. package/.versions/0.3.0/.pi/harnesses/agent-chain/README.md +37 -0
  59. package/.versions/0.3.0/.pi/harnesses/agent-chain/index.ts +795 -0
  60. package/.versions/0.3.0/.pi/harnesses/agent-chain/package.json +6 -0
  61. package/.versions/0.3.0/.pi/harnesses/agent-team/README.md +38 -0
  62. package/.versions/0.3.0/.pi/harnesses/agent-team/index.ts +732 -0
  63. package/.versions/0.3.0/.pi/harnesses/agent-team/package.json +6 -0
  64. package/.versions/0.3.0/.pi/harnesses/coms/README.md +36 -0
  65. package/.versions/0.3.0/.pi/harnesses/coms/index.ts +1595 -0
  66. package/.versions/0.3.0/.pi/harnesses/coms/package.json +6 -0
  67. package/.versions/0.3.0/.pi/harnesses/coms-net/README.md +46 -0
  68. package/.versions/0.3.0/.pi/harnesses/coms-net/index.ts +1637 -0
  69. package/.versions/0.3.0/.pi/harnesses/coms-net/package.json +6 -0
  70. package/.versions/0.3.0/.pi/harnesses/damage-control/README.md +38 -0
  71. package/.versions/0.3.0/.pi/harnesses/damage-control/index.ts +207 -0
  72. package/.versions/0.3.0/.pi/harnesses/damage-control/package.json +6 -0
  73. package/.versions/0.3.0/.pi/harnesses/damage-control-continue/README.md +37 -0
  74. package/.versions/0.3.0/.pi/harnesses/damage-control-continue/index.ts +234 -0
  75. package/.versions/0.3.0/.pi/harnesses/damage-control-continue/package.json +6 -0
  76. package/.versions/0.3.0/.pi/harnesses/minimal/README.md +27 -0
  77. package/.versions/0.3.0/.pi/harnesses/minimal/index.ts +32 -0
  78. package/.versions/0.3.0/.pi/harnesses/minimal/package.json +6 -0
  79. package/.versions/0.3.0/.pi/harnesses/package-lock.json +35 -0
  80. package/.versions/0.3.0/.pi/harnesses/package.json +9 -0
  81. package/.versions/0.3.0/.pi/harnesses/pi-pi/README.md +39 -0
  82. package/.versions/0.3.0/.pi/harnesses/pi-pi/index.ts +631 -0
  83. package/.versions/0.3.0/.pi/harnesses/pi-pi/package.json +6 -0
  84. package/.versions/0.3.0/.pi/harnesses/purpose-gate/README.md +27 -0
  85. package/.versions/0.3.0/.pi/harnesses/purpose-gate/index.ts +82 -0
  86. package/.versions/0.3.0/.pi/harnesses/purpose-gate/package.json +6 -0
  87. package/.versions/0.3.0/.pi/harnesses/session-replay/README.md +28 -0
  88. package/.versions/0.3.0/.pi/harnesses/session-replay/index.ts +214 -0
  89. package/.versions/0.3.0/.pi/harnesses/session-replay/package.json +6 -0
  90. package/.versions/0.3.0/.pi/harnesses/subagent-widget/README.md +36 -0
  91. package/.versions/0.3.0/.pi/harnesses/subagent-widget/index.ts +479 -0
  92. package/.versions/0.3.0/.pi/harnesses/subagent-widget/package.json +6 -0
  93. package/.versions/0.3.0/.pi/harnesses/system-select/README.md +39 -0
  94. package/.versions/0.3.0/.pi/harnesses/system-select/index.ts +165 -0
  95. package/.versions/0.3.0/.pi/harnesses/system-select/package.json +6 -0
  96. package/.versions/0.3.0/.pi/harnesses/tilldone/README.md +35 -0
  97. package/.versions/0.3.0/.pi/harnesses/tilldone/index.ts +724 -0
  98. package/.versions/0.3.0/.pi/harnesses/tilldone/package.json +6 -0
  99. package/.versions/0.3.0/.pi/harnesses/tool-counter/README.md +31 -0
  100. package/.versions/0.3.0/.pi/harnesses/tool-counter/index.ts +100 -0
  101. package/.versions/0.3.0/.pi/harnesses/tool-counter/package.json +6 -0
  102. package/.versions/0.3.0/.pi/harnesses/tool-counter-widget/README.md +27 -0
  103. package/.versions/0.3.0/.pi/harnesses/tool-counter-widget/index.ts +66 -0
  104. package/.versions/0.3.0/.pi/harnesses/tool-counter-widget/package.json +6 -0
  105. package/.versions/0.3.0/.pi/prompts/build.md +24 -0
  106. package/.versions/0.3.0/.pi/prompts/code-simplify.md +22 -0
  107. package/.versions/0.3.0/.pi/prompts/doctor-agent-skills.md +13 -0
  108. package/.versions/0.3.0/.pi/prompts/plan.md +16 -0
  109. package/.versions/0.3.0/.pi/prompts/review.md +16 -0
  110. package/.versions/0.3.0/.pi/prompts/setup-agent-skills.md +19 -0
  111. package/.versions/0.3.0/.pi/prompts/ship.md +17 -0
  112. package/.versions/0.3.0/.pi/prompts/spec.md +15 -0
  113. package/.versions/0.3.0/.pi/prompts/test.md +19 -0
  114. package/.versions/0.3.0/.pi/skills/bowser/SKILL.md +114 -0
  115. package/.versions/0.3.0/.version +1 -0
  116. package/.versions/0.3.0/agents/builder.md +6 -0
  117. package/.versions/0.3.0/agents/code-reviewer.md +93 -0
  118. package/.versions/0.3.0/agents/documenter.md +6 -0
  119. package/.versions/0.3.0/agents/plan-reviewer.md +22 -0
  120. package/.versions/0.3.0/agents/planner.md +6 -0
  121. package/.versions/0.3.0/agents/scout.md +6 -0
  122. package/.versions/0.3.0/agents/security-auditor.md +97 -0
  123. package/.versions/0.3.0/agents/test-engineer.md +89 -0
  124. package/.versions/0.3.0/hooks/SIMPLIFY-IGNORE.md +90 -0
  125. package/.versions/0.3.0/hooks/hooks.json +14 -0
  126. package/.versions/0.3.0/hooks/session-start.sh +74 -0
  127. package/.versions/0.3.0/hooks/simplify-ignore-test.sh +247 -0
  128. package/.versions/0.3.0/hooks/simplify-ignore.sh +302 -0
  129. package/.versions/0.3.0/references/accessibility-checklist.md +159 -0
  130. package/.versions/0.3.0/references/performance-checklist.md +121 -0
  131. package/.versions/0.3.0/references/prompting-patterns.md +380 -0
  132. package/.versions/0.3.0/references/security-checklist.md +134 -0
  133. package/.versions/0.3.0/references/testing-patterns.md +236 -0
  134. package/.versions/0.3.0/skills/api-and-interface-design/SKILL.md +294 -0
  135. package/.versions/0.3.0/skills/browser-testing-with-devtools/SKILL.md +335 -0
  136. package/.versions/0.3.0/skills/ci-cd-and-automation/SKILL.md +390 -0
  137. package/.versions/0.3.0/skills/code-review-and-quality/SKILL.md +347 -0
  138. package/.versions/0.3.0/skills/code-simplification/SKILL.md +331 -0
  139. package/.versions/0.3.0/skills/context-engineering/SKILL.md +291 -0
  140. package/.versions/0.3.0/skills/debugging-and-error-recovery/SKILL.md +300 -0
  141. package/.versions/0.3.0/skills/deprecation-and-migration/SKILL.md +206 -0
  142. package/.versions/0.3.0/skills/designing-agents/SKILL.md +394 -0
  143. package/.versions/0.3.0/skills/designing-agents/pi-harness-authoring.md +213 -0
  144. package/.versions/0.3.0/skills/documentation-and-adrs/SKILL.md +278 -0
  145. package/.versions/0.3.0/skills/frontend-ui-engineering/SKILL.md +322 -0
  146. package/.versions/0.3.0/skills/git-workflow-and-versioning/SKILL.md +316 -0
  147. package/.versions/0.3.0/skills/guided-workspace-setup/SKILL.md +331 -0
  148. package/.versions/0.3.0/skills/idea-refine/SKILL.md +178 -0
  149. package/.versions/0.3.0/skills/idea-refine/examples.md +238 -0
  150. package/.versions/0.3.0/skills/idea-refine/frameworks.md +99 -0
  151. package/.versions/0.3.0/skills/idea-refine/refinement-criteria.md +113 -0
  152. package/.versions/0.3.0/skills/idea-refine/scripts/idea-refine.sh +15 -0
  153. package/.versions/0.3.0/skills/incremental-implementation/SKILL.md +279 -0
  154. package/.versions/0.3.0/skills/performance-optimization/SKILL.md +350 -0
  155. package/.versions/0.3.0/skills/planning-and-task-breakdown/SKILL.md +237 -0
  156. package/.versions/0.3.0/skills/security-and-hardening/SKILL.md +349 -0
  157. package/.versions/0.3.0/skills/shipping-and-launch/SKILL.md +309 -0
  158. package/.versions/0.3.0/skills/source-driven-development/SKILL.md +194 -0
  159. package/.versions/0.3.0/skills/spec-driven-development/SKILL.md +237 -0
  160. package/.versions/0.3.0/skills/test-driven-development/SKILL.md +379 -0
  161. package/.versions/0.3.0/skills/using-agent-skills/SKILL.md +176 -0
  162. package/CHANGELOG.md +72 -0
  163. package/README.md +5 -5
  164. package/bin/cli.js +100 -24
  165. package/bin/lib/bootstrap.js +254 -0
  166. package/bin/lib/doctor.js +1 -1
  167. package/docs/getting-started.md +2 -2
  168. package/docs/npm-install.md +34 -11
  169. package/package.json +1 -1
  170. package/skills/guided-workspace-setup/SKILL.md +40 -2
  171. /package/.claude/commands/{setup.md → setup-agent-skills.md} +0 -0
  172. /package/.opencode/commands/{as-doctor.md → as-doctor-agent-skills.md} +0 -0
  173. /package/.opencode/commands/{as-setup.md → as-setup-agent-skills.md} +0 -0
  174. /package/.pi/prompts/{setup.md → setup-agent-skills.md} +0 -0
  175. /package/.versions/0.2.0/.claude/commands/{setup.md → setup-agent-skills.md} +0 -0
  176. /package/.versions/0.2.0/.opencode/commands/{as-doctor.md → as-doctor-agent-skills.md} +0 -0
  177. /package/.versions/0.2.0/.opencode/commands/{as-setup.md → as-setup-agent-skills.md} +0 -0
  178. /package/.versions/0.2.0/.pi/prompts/{setup.md → setup-agent-skills.md} +0 -0
@@ -0,0 +1,176 @@
1
+ ---
2
+ name: using-agent-skills
3
+ description: Discovers and invokes agent skills. Use when starting a session or when you need to discover which skill applies to the current task. This is the meta-skill that governs how all other skills are discovered and invoked.
4
+ ---
5
+
6
+ # Using Agent Skills
7
+
8
+ ## Overview
9
+
10
+ Agent Skills is a collection of engineering workflow skills organized by development phase. Each skill encodes a specific process that senior engineers follow. This meta-skill helps you discover and apply the right skill for your current task.
11
+
12
+ ## Skill Discovery
13
+
14
+ When a task arrives, identify the development phase and apply the corresponding skill:
15
+
16
+ ```
17
+ Task arrives
18
+
19
+ ├── Vague idea/need refinement? ──→ idea-refine
20
+ ├── New project/feature/change? ──→ spec-driven-development
21
+ ├── Have a spec, need tasks? ──────→ planning-and-task-breakdown
22
+ ├── Implementing code? ────────────→ incremental-implementation
23
+ │ ├── UI work? ─────────────────→ frontend-ui-engineering
24
+ │ ├── API work? ────────────────→ api-and-interface-design
25
+ │ ├── Need better context? ─────→ context-engineering
26
+ │ └── Need doc-verified code? ───→ source-driven-development
27
+ ├── Writing/running tests? ────────→ test-driven-development
28
+ │ └── Browser-based? ───────────→ browser-testing-with-devtools
29
+ ├── Something broke? ──────────────→ debugging-and-error-recovery
30
+ ├── Reviewing code? ───────────────→ code-review-and-quality
31
+ │ ├── Security concerns? ───────→ security-and-hardening
32
+ │ └── Performance concerns? ────→ performance-optimization
33
+ ├── Committing/branching? ─────────→ git-workflow-and-versioning
34
+ ├── CI/CD pipeline work? ──────────→ ci-cd-and-automation
35
+ ├── Writing docs/ADRs? ───────────→ documentation-and-adrs
36
+ ├── Authoring a new skill/persona? ─→ designing-agents
37
+ └── Deploying/launching? ─────────→ shipping-and-launch
38
+ ```
39
+
40
+ ## Core Operating Behaviors
41
+
42
+ These behaviors apply at all times, across all skills. They are non-negotiable.
43
+
44
+ ### 1. Surface Assumptions
45
+
46
+ Before implementing anything non-trivial, explicitly state your assumptions:
47
+
48
+ ```
49
+ ASSUMPTIONS I'M MAKING:
50
+ 1. [assumption about requirements]
51
+ 2. [assumption about architecture]
52
+ 3. [assumption about scope]
53
+ → Correct me now or I'll proceed with these.
54
+ ```
55
+
56
+ Don't silently fill in ambiguous requirements. The most common failure mode is making wrong assumptions and running with them unchecked. Surface uncertainty early — it's cheaper than rework.
57
+
58
+ ### 2. Manage Confusion Actively
59
+
60
+ When you encounter inconsistencies, conflicting requirements, or unclear specifications:
61
+
62
+ 1. **STOP.** Do not proceed with a guess.
63
+ 2. Name the specific confusion.
64
+ 3. Present the tradeoff or ask the clarifying question.
65
+ 4. Wait for resolution before continuing.
66
+
67
+ **Bad:** Silently picking one interpretation and hoping it's right.
68
+ **Good:** "I see X in the spec but Y in the existing code. Which takes precedence?"
69
+
70
+ ### 3. Push Back When Warranted
71
+
72
+ You are not a yes-machine. When an approach has clear problems:
73
+
74
+ - Point out the issue directly
75
+ - Explain the concrete downside (quantify when possible — "this adds ~200ms latency" not "this might be slower")
76
+ - Propose an alternative
77
+ - Accept the human's decision if they override with full information
78
+
79
+ Sycophancy is a failure mode. "Of course!" followed by implementing a bad idea helps no one. Honest technical disagreement is more valuable than false agreement.
80
+
81
+ ### 4. Enforce Simplicity
82
+
83
+ Your natural tendency is to overcomplicate. Actively resist it.
84
+
85
+ Before finishing any implementation, ask:
86
+ - Can this be done in fewer lines?
87
+ - Are these abstractions earning their complexity?
88
+ - Would a staff engineer look at this and say "why didn't you just..."?
89
+
90
+ If you build 1000 lines and 100 would suffice, you have failed. Prefer the boring, obvious solution. Cleverness is expensive.
91
+
92
+ ### 5. Maintain Scope Discipline
93
+
94
+ Touch only what you're asked to touch.
95
+
96
+ Do NOT:
97
+ - Remove comments you don't understand
98
+ - "Clean up" code orthogonal to the task
99
+ - Refactor adjacent systems as a side effect
100
+ - Delete code that seems unused without explicit approval
101
+ - Add features not in the spec because they "seem useful"
102
+
103
+ Your job is surgical precision, not unsolicited renovation.
104
+
105
+ ### 6. Verify, Don't Assume
106
+
107
+ Every skill includes a verification step. A task is not complete until verification passes. "Seems right" is never sufficient — there must be evidence (passing tests, build output, runtime data).
108
+
109
+ ## Failure Modes to Avoid
110
+
111
+ These are the subtle errors that look like productivity but create problems:
112
+
113
+ 1. Making wrong assumptions without checking
114
+ 2. Not managing your own confusion — plowing ahead when lost
115
+ 3. Not surfacing inconsistencies you notice
116
+ 4. Not presenting tradeoffs on non-obvious decisions
117
+ 5. Being sycophantic ("Of course!") to approaches with clear problems
118
+ 6. Overcomplicating code and APIs
119
+ 7. Modifying code or comments orthogonal to the task
120
+ 8. Removing things you don't fully understand
121
+ 9. Building without a spec because "it's obvious"
122
+ 10. Skipping verification because "it looks right"
123
+
124
+ ## Skill Rules
125
+
126
+ 1. **Check for an applicable skill before starting work.** Skills encode processes that prevent common mistakes.
127
+
128
+ 2. **Skills are workflows, not suggestions.** Follow the steps in order. Don't skip verification steps.
129
+
130
+ 3. **Multiple skills can apply.** A feature implementation might involve `idea-refine` → `spec-driven-development` → `planning-and-task-breakdown` → `incremental-implementation` → `test-driven-development` → `code-review-and-quality` → `shipping-and-launch` in sequence.
131
+
132
+ 4. **When in doubt, start with a spec.** If the task is non-trivial and there's no spec, begin with `spec-driven-development`.
133
+
134
+ ## Lifecycle Sequence
135
+
136
+ For a complete feature, the typical skill sequence is:
137
+
138
+ ```
139
+ 1. idea-refine → Refine vague ideas
140
+ 2. spec-driven-development → Define what we're building
141
+ 3. planning-and-task-breakdown → Break into verifiable chunks
142
+ 4. context-engineering → Load the right context
143
+ 5. source-driven-development → Verify against official docs
144
+ 6. incremental-implementation → Build slice by slice
145
+ 7. test-driven-development → Prove each slice works
146
+ 8. code-review-and-quality → Review before merge
147
+ 9. git-workflow-and-versioning → Clean commit history
148
+ 10. documentation-and-adrs → Document decisions
149
+ 11. shipping-and-launch → Deploy safely
150
+ ```
151
+
152
+ Not every task needs every skill. A bug fix might only need: `debugging-and-error-recovery` → `test-driven-development` → `code-review-and-quality`.
153
+
154
+ ## Quick Reference
155
+
156
+ | Phase | Skill | One-Line Summary |
157
+ |-------|-------|-----------------|
158
+ | Define | idea-refine | Refine ideas through structured divergent and convergent thinking |
159
+ | Define | spec-driven-development | Requirements and acceptance criteria before code |
160
+ | Plan | planning-and-task-breakdown | Decompose into small, verifiable tasks |
161
+ | Build | incremental-implementation | Thin vertical slices, test each before expanding |
162
+ | Build | source-driven-development | Verify against official docs before implementing |
163
+ | Build | context-engineering | Right context at the right time |
164
+ | Build | frontend-ui-engineering | Production-quality UI with accessibility |
165
+ | Build | api-and-interface-design | Stable interfaces with clear contracts |
166
+ | Verify | test-driven-development | Failing test first, then make it pass |
167
+ | Verify | browser-testing-with-devtools | Chrome DevTools MCP for runtime verification |
168
+ | Verify | debugging-and-error-recovery | Reproduce → localize → fix → guard |
169
+ | Review | code-review-and-quality | Five-axis review with quality gates |
170
+ | Review | security-and-hardening | OWASP prevention, input validation, least privilege |
171
+ | Review | performance-optimization | Measure first, optimize only what matters |
172
+ | Ship | git-workflow-and-versioning | Atomic commits, clean history |
173
+ | Ship | ci-cd-and-automation | Automated quality gates on every change |
174
+ | Ship | documentation-and-adrs | Document the why, not just the what |
175
+ | Ship | shipping-and-launch | Pre-launch checklist, monitoring, rollback plan |
176
+ | Author | designing-agents | Author a persona, workflow skill, or pi harness |
package/CHANGELOG.md CHANGED
@@ -1,5 +1,77 @@
1
1
  # agent-skills changelog
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - **Rename installer slash commands** + **auto-remove them after setup**.
8
+
9
+ The bootstrap commands are now namespaced so they don't collide with anything
10
+ in your workspace, and they get cleaned up automatically once `/setup-agent-skills`
11
+ finishes — leaving your agent's slash-command list as clean as before you ran
12
+ `init`.
13
+
14
+ ### What changed
15
+
16
+ - `/setup` → `/setup-agent-skills`
17
+ - `/doctor` → `/doctor-agent-skills`
18
+ - `/as-setup` → `/as-setup-agent-skills` (OpenCode)
19
+ - `/as-doctor` → `/as-doctor-agent-skills` (OpenCode)
20
+ - `guided-workspace-setup` SKILL.md still installs to `.{claude,pi,opencode}/skills/`
21
+ during bootstrap and is removed alongside the slash commands
22
+
23
+ ### Cleanup behaviour (default)
24
+
25
+ After `/setup-agent-skills` completes its install pass, the skill deletes the
26
+ bootstrap files (slash commands + skill body) from the workspace. The Step 9
27
+ confirmation states this explicitly and accepts `keep` as the opt-out. When
28
+ opted out, `keep-installer: true` is recorded in
29
+ `.ai/agent-skills-setup.md#workspace-summary`.
30
+
31
+ Re-run `npx @chankov/agent-skills init` whenever you need
32
+ `/setup-agent-skills` back — it's a one-line re-bootstrap.
33
+
34
+ ### Migration for users on 0.2.x
35
+
36
+ `npx @chankov/agent-skills@latest init` automatically detects and removes the
37
+ pre-rename `setup.md`/`doctor.md`/`as-*.md` files from the workspace before
38
+ writing the new names. No manual cleanup required.
39
+
40
+ ### New CLI subcommand
41
+
42
+ - `npx @chankov/agent-skills cleanup-installer --agent <agent>` — removes the
43
+ bootstrap files standalone. The skill calls this at end of apply; you can
44
+ also invoke it by hand. Honors `--dry-run`.
45
+
46
+ ### Patch Changes
47
+
48
+ - Fix: `npx @chankov/agent-skills init` now bootstraps the installer artifacts
49
+ (`/setup`, `/doctor`, and the `guided-workspace-setup` skill) into the
50
+ workspace before printing the hand-off.
51
+
52
+ In 0.1.0 / 0.2.0, `init` printed _"Open your coding agent and run /setup"_ —
53
+ but `/setup` is itself a slash-command file that needed to exist in
54
+ `.claude/commands/`, `.pi/prompts/`, or `.opencode/commands/`. Fresh
55
+ workspaces didn't have it, so the agent had no idea what `/setup` was and
56
+ the hand-off silently no-op'd.
57
+
58
+ What `init` now writes (per chosen agent, to the workspace):
59
+
60
+ | Agent | Files |
61
+ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
62
+ | `claude-code` | `.claude/commands/setup.md`, `.claude/commands/doctor.md`, `.claude/skills/guided-workspace-setup/SKILL.md` |
63
+ | `pi` | `.pi/prompts/setup.md`, `.pi/prompts/doctor.md`, `.pi/skills/guided-workspace-setup/SKILL.md` |
64
+ | `opencode` | `.opencode/commands/as-setup.md`, `.opencode/commands/as-doctor.md`, `.opencode/skills/guided-workspace-setup/SKILL.md` (+ printed note about adding the global AGENTS.md reference; project-local skill discovery in OpenCode is limited) |
65
+
66
+ The rest of the catalogue (the user-facing skills, personas, references,
67
+ hooks, pi extensions) is unchanged — those are still chosen interactively
68
+ inside `/setup`, as designed. The CLI only drops the installer plumbing.
69
+
70
+ Bootstrap files are always refreshed on re-run (they are scaffolding, not
71
+ user data). `--method symlink` against an unstable source path
72
+ (`~/.npm/_npx/...`) prints a warning recommending `--method copy` or a
73
+ global install.
74
+
3
75
  ## 0.2.0
4
76
 
5
77
  ### Minor Changes
package/README.md CHANGED
@@ -39,11 +39,11 @@ Skills also activate automatically based on what you're doing — designing an A
39
39
  # In the workspace you want to configure:
40
40
  npx @chankov/agent-skills init
41
41
  # Then open your coding agent in this directory and run:
42
- # /setup
42
+ # /setup-agent-skills
43
43
  ```
44
44
 
45
45
  That's it. `npx` fetches the package, the CLI detects your coding agent
46
- (Claude Code, OpenCode, or pi), and `/setup` runs the full guided install —
46
+ (Claude Code, OpenCode, or pi), and `/setup-agent-skills` runs the full guided install —
47
47
  analysing the workspace, showing grouped menus, and confirming everything
48
48
  before writing a single file.
49
49
 
@@ -51,9 +51,9 @@ Three CLI commands:
51
51
 
52
52
  | Command | What it does |
53
53
  |---|---|
54
- | `npx @chankov/agent-skills init` | Materialize the package + hand off to `/setup` |
54
+ | `npx @chankov/agent-skills init` | Materialize the package + hand off to `/setup-agent-skills` |
55
55
  | `npx @chankov/agent-skills doctor` | Scan for broken symlinks and stale persona refs |
56
- | `npx @chankov/agent-skills update` | Surface the version delta + hand off to `/setup` for the per-artifact diff |
56
+ | `npx @chankov/agent-skills update` | Surface the version delta + hand off to `/setup-agent-skills` for the per-artifact diff |
57
57
 
58
58
  Versioned with [semver](https://semver.org); changelog in
59
59
  [CHANGELOG.md](CHANGELOG.md); full docs in [docs/npm-install.md](docs/npm-install.md).
@@ -83,7 +83,7 @@ git clone https://github.com/chankov/agent-skills.git
83
83
  cd agent-skills
84
84
  # In Claude Code:
85
85
  claude --plugin-dir .
86
- # Then run /setup in your target workspace and pick "symlink" in Step 8.
86
+ # Then run /setup-agent-skills in your target workspace and pick "symlink" in Step 8.
87
87
  ```
88
88
 
89
89
  Updates flow through `git pull`. Symlinks need Developer Mode on Windows.
package/bin/cli.js CHANGED
@@ -2,9 +2,9 @@
2
2
  // agent-skills — thin dispatcher into the LLM-driven guided setup.
3
3
  //
4
4
  // Three commands:
5
- // init materialize the package, detect the coding agent, hand off to /setup
5
+ // init materialize the package, detect the coding agent, hand off to /setup-agent-skills
6
6
  // doctor deterministic preflight scan (broken symlinks, stale persona refs)
7
- // update refresh the package, then hand off to /setup for the version-diff
7
+ // update refresh the package, then hand off to /setup-agent-skills for the version-diff
8
8
  //
9
9
  // The CLI itself never decides which skills to install or what to overwrite —
10
10
  // that is the job of the guided-workspace-setup skill, run by the user's
@@ -22,6 +22,7 @@ import { stdin, stdout, exit } from "node:process";
22
22
  import { runDoctor } from "./lib/doctor.js";
23
23
  import { detectAgent, agentLabel, AGENTS } from "./lib/detect-agent.js";
24
24
  import { checkAndNotify } from "./lib/update-notifier.js";
25
+ import { bootstrap, cleanupInstaller } from "./lib/bootstrap.js";
25
26
 
26
27
  const __dirname = dirname(fileURLToPath(import.meta.url));
27
28
  const pkgRoot = resolve(__dirname, "..");
@@ -80,11 +81,12 @@ if (sub !== "update" && sub !== "check-update") {
80
81
  }
81
82
 
82
83
  switch (sub) {
83
- case "init": await cmdInit(); break;
84
- case "doctor": await cmdDoctor(); break;
85
- case "update": await cmdUpdate(); break;
86
- case "check-update": await cmdCheckUpdate(); break;
87
- default: fail(`unknown command: ${sub}\n\nRun "agent-skills --help" for usage.`);
84
+ case "init": await cmdInit(); break;
85
+ case "doctor": await cmdDoctor(); break;
86
+ case "update": await cmdUpdate(); break;
87
+ case "check-update": await cmdCheckUpdate(); break;
88
+ case "cleanup-installer": await cmdCleanupInstaller(); break;
89
+ default: fail(`unknown command: ${sub}\n\nRun "agent-skills --help" for usage.`);
88
90
  }
89
91
 
90
92
  // ── commands ──────────────────────────────────────────────────────────────
@@ -100,15 +102,41 @@ async function cmdInit() {
100
102
  const agent = await chooseAgent(opts.agent);
101
103
  console.log(`Coding agent: ${agentLabel(agent)}`);
102
104
 
103
- // The CLI doesn't write any skill / persona / command files itself —
104
- // that is the job of `guided-workspace-setup` running inside the agent.
105
- // What it CAN do is record the chosen agent + method as a hint the skill
106
- // will pick up, and print the exact next-step command.
107
105
  const method = opts.method ?? "copy";
108
106
  if (!["copy", "symlink"].includes(method)) {
109
107
  fail(`--method must be "copy" or "symlink" (got "${method}")`);
110
108
  }
111
109
 
110
+ // Bootstrap the installer artifacts (setup + doctor + the skill they invoke).
111
+ // Without this, the agent has no /setup-agent-skills command to hand off to — the
112
+ // /setup-agent-skills command is itself one of the files this writes. The rest of the
113
+ // catalogue (skills, personas, etc.) is the job of /setup-agent-skills running inside
114
+ // the agent; we only drop the plumbing it needs to exist.
115
+ printSection("Bootstrap installer");
116
+ const { written, skipped, removed, warnings } = bootstrap({
117
+ agent,
118
+ sourceRoot: pkgRoot,
119
+ workspace,
120
+ method,
121
+ dryRun: opts["dry-run"],
122
+ });
123
+
124
+ for (const w of warnings) console.log(` ⚠ ${w}`);
125
+ for (const p of removed) {
126
+ const tag = opts["dry-run"] ? "would remove (legacy)" : "removed legacy";
127
+ console.log(` − ${tag}: ${relative(workspace, p)}`);
128
+ }
129
+ for (const f of written) {
130
+ const tag = opts["dry-run"] ? "would write" : (method === "symlink" ? "linked" : "wrote");
131
+ console.log(` ✓ ${tag}: ${relative(workspace, f.dest)}`);
132
+ }
133
+ for (const f of skipped) {
134
+ console.log(` ✗ skipped: ${relative(workspace, f.dest)} — ${f.error}`);
135
+ }
136
+ if (written.length === 0 && skipped.length === 0 && removed.length === 0) {
137
+ console.log(" (nothing to do — sources missing from package)");
138
+ }
139
+
112
140
  printSection("Next step");
113
141
  printHandoff({ agent, method, workspace, source: pkgRoot, version: pkg.version });
114
142
 
@@ -159,7 +187,7 @@ async function cmdDoctor() {
159
187
  `\n✓ Doctor finished — repaired ${repaired}, deleted ${deleted}, skipped ${skipped}.`,
160
188
  );
161
189
  console.log(
162
- "Re-run /setup inside your coding agent if you also want to add or remove artifacts.",
190
+ "Re-run /setup-agent-skills inside your coding agent if you also want to add or remove artifacts.",
163
191
  );
164
192
  }
165
193
 
@@ -172,7 +200,7 @@ async function cmdUpdate() {
172
200
 
173
201
  // npm itself does the package upgrade. The CLI's job here is to read the
174
202
  // workspace's install record, surface the version delta, and tell the user
175
- // to run /setup so the skill can drive the diff-aware refresh.
203
+ // to run /setup-agent-skills so the skill can drive the diff-aware refresh.
176
204
  const recordPath = join(workspace, ".ai", "agent-skills-setup.md");
177
205
  if (!existsSync(recordPath)) {
178
206
  console.log("This workspace has no .ai/agent-skills-setup.md install record.");
@@ -194,12 +222,40 @@ async function cmdUpdate() {
194
222
  console.log(`Recorded in workspace: v${recorded ?? "(pre-versioning)"}`);
195
223
  console.log(`Installed package: v${current}`);
196
224
  console.log();
197
- console.log("Run /setup inside your coding agent — the guided-workspace-setup");
225
+ console.log("Run /setup-agent-skills inside your coding agent — the guided-workspace-setup");
198
226
  console.log("skill will detect the version delta, show the CHANGELOG between");
199
227
  console.log("the two versions, and offer a per-artifact three-way diff before");
200
228
  console.log("touching any file.");
201
229
  }
202
230
 
231
+ async function cmdCleanupInstaller() {
232
+ // Removes the bootstrap artifacts (setup-agent-skills, doctor-agent-skills,
233
+ // guided-workspace-setup skill body) from the workspace. Invoked by the
234
+ // skill itself at the end of Step 10 — keeps the workspace's slash-command
235
+ // list clean. Re-running `init` brings them back.
236
+ await mustBeDirectory(workspace, "workspace");
237
+
238
+ const agent = opts.agent ?? detectAgent({ workspace, env: process.env });
239
+ if (!agent || !AGENTS.includes(agent)) {
240
+ fail(`cleanup-installer needs --agent (one of: ${AGENTS.join(", ")})`);
241
+ }
242
+
243
+ const { removed, kept, warnings } = cleanupInstaller({
244
+ agent,
245
+ workspace,
246
+ dryRun: opts["dry-run"],
247
+ });
248
+
249
+ for (const w of warnings) console.log(` ⚠ ${w}`);
250
+ for (const p of removed) {
251
+ const tag = opts["dry-run"] ? "would remove" : "removed";
252
+ console.log(` − ${tag}: ${relative(workspace, p)}`);
253
+ }
254
+ if (removed.length === 0 && warnings.length === 0) {
255
+ console.log("Nothing to clean up — installer files already absent.");
256
+ }
257
+ }
258
+
203
259
  async function cmdCheckUpdate() {
204
260
  // Entry point for hook scripts and pi extensions. Blocks on a single
205
261
  // registry fetch (short timeout); emits a one-line banner to stdout if an
@@ -244,6 +300,8 @@ async function chooseAgent(supplied) {
244
300
 
245
301
  function printHandoff({ agent, method, workspace, source, version }) {
246
302
  const rel = relative(process.cwd(), workspace) || ".";
303
+ const setupCmd =
304
+ agent === "opencode" ? "/as-setup-agent-skills" : "/setup-agent-skills";
247
305
  const lines = [
248
306
  `agent-skills v${version} is ready.`,
249
307
  "",
@@ -252,21 +310,37 @@ function printHandoff({ agent, method, workspace, source, version }) {
252
310
  `Install method: ${method}`,
253
311
  `Source root: ${source}`,
254
312
  "",
255
- "Open your coding agent in this directory and run:",
313
+ `Open ${agentLaunchHint(agent)} in this directory and run:`,
256
314
  "",
257
- ` /setup`,
315
+ ` ${setupCmd}`,
258
316
  "",
259
317
  "The guided-workspace-setup skill will:",
260
318
  " • analyse the workspace",
261
319
  " • show grouped install menus with recommendations",
262
320
  " • offer project overrides",
263
321
  " • confirm everything before writing a single file",
322
+ " • remove the installer commands from your workspace at the end so",
323
+ " they don't pollute your agent's command list (reply 'keep' in",
324
+ " Step 9 if you'd rather leave them in)",
264
325
  "",
265
- "Re-run `npx agent-skills doctor` any time to scan for broken symlinks.",
266
326
  ];
327
+ if (agent === "opencode") {
328
+ lines.push(
329
+ "OpenCode note: project-local skill discovery is limited. If",
330
+ "/as-setup-agent-skills does not load the skill, follow",
331
+ "docs/opencode-setup.md to link it into ~/.config/opencode/skills/",
332
+ "and add a reference in AGENTS.md.",
333
+ "",
334
+ );
335
+ }
336
+ lines.push("Re-run `npx @chankov/agent-skills init` later to re-bootstrap (commands are removed by default once setup completes).");
267
337
  for (const line of lines) console.log(line);
268
338
  }
269
339
 
340
+ function agentLaunchHint(agent) {
341
+ return { "claude-code": "Claude Code (`claude`)", "opencode": "OpenCode (`opencode`)", "pi": "pi (`pi`)" }[agent] || agent;
342
+ }
343
+
270
344
  function tryLaunch(agent, cwd) {
271
345
  const cmd = { "claude-code": "claude", "opencode": "opencode", "pi": "pi" }[agent];
272
346
  if (!cmd) return;
@@ -274,7 +348,7 @@ function tryLaunch(agent, cwd) {
274
348
  const r = spawnSync(cmd, [], { cwd, stdio: "inherit" });
275
349
  if (r.error) {
276
350
  console.log(`(could not launch ${cmd}: ${r.error.message})`);
277
- console.log(`Open ${cmd} manually and run /setup.`);
351
+ console.log(`Open ${cmd} manually and run /setup-agent-skills.`);
278
352
  }
279
353
  }
280
354
 
@@ -339,7 +413,7 @@ function printHelp(sub) {
339
413
  if (sub === "init") {
340
414
  console.log(`agent-skills init [options]
341
415
 
342
- Materialize the package and hand off to the LLM-driven /setup skill.
416
+ Materialize the package and hand off to the LLM-driven /setup-agent-skills skill.
343
417
 
344
418
  Options:
345
419
  --agent <claude-code|opencode|pi> Skip the agent auto-detection
@@ -367,7 +441,7 @@ Options:
367
441
  console.log(`agent-skills update [options]
368
442
 
369
443
  Read the workspace's install record and surface the version delta. The
370
- actual diff-aware refresh runs inside your coding agent via /setup.
444
+ actual diff-aware refresh runs inside your coding agent via /setup-agent-skills.
371
445
 
372
446
  Options:
373
447
  --workspace <path> Target workspace (default: cwd)
@@ -385,10 +459,12 @@ Usage:
385
459
  npx agent-skills <command> [options]
386
460
 
387
461
  Commands:
388
- init Materialize the package + hand off to /setup in your agent
389
- doctor Scan for broken symlinks and stale persona references
390
- update Surface the version delta + hand off to /setup for the refresh
391
- check-update One-line registry check (used by session hooks; safe to script)
462
+ init Bootstrap installer files + hand off to /setup-agent-skills-agent-skills
463
+ doctor Scan for broken symlinks and stale persona references
464
+ update Surface the version delta + hand off to /setup-agent-skills-agent-skills
465
+ check-update One-line registry check (used by session hooks; safe to script)
466
+ cleanup-installer Remove the installer slash commands from a workspace (used
467
+ by the skill at end of setup; safe to run by hand)
392
468
 
393
469
  Options:
394
470
  -v, --version Print the package version