agileflow 2.61.0 → 2.62.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.
- package/README.md +9 -9
- package/package.json +1 -1
- package/scripts/lib/counter.js +103 -0
- package/src/core/commands/auto.md +1 -0
- package/src/core/commands/babysit.md +170 -29
- package/src/core/commands/board.md +1 -0
- package/src/core/commands/ci.md +1 -0
- package/src/core/commands/compress.md +1 -0
- package/src/core/commands/deploy.md +1 -0
- package/src/core/commands/help.md +1 -0
- package/src/core/commands/research.md +1 -0
- package/src/core/commands/skill/create.md +566 -0
- package/src/core/commands/skill/delete.md +189 -0
- package/src/core/commands/skill/edit.md +245 -0
- package/src/core/commands/skill/list.md +155 -0
- package/src/core/commands/skill/test.md +249 -0
- package/src/core/commands/template.md +1 -0
- package/src/core/commands/tests.md +1 -0
- package/src/core/commands/update.md +1 -0
- package/src/core/commands/velocity.md +1 -0
- package/src/core/experts/refactor/expertise.yaml +17 -12
- package/src/core/templates/claude-settings.advanced.example.json +1 -1
- package/src/core/templates/claude-settings.example.json +1 -1
- package/tools/cli/commands/list.js +8 -13
- package/tools/cli/installers/core/installer.js +20 -19
- package/tools/cli/installers/ide/_base-ide.js +18 -4
- package/tools/cli/installers/ide/claude-code.js +4 -15
- package/tools/cli/installers/ide/codex.js +9 -13
- package/tools/cli/lib/content-injector.js +162 -31
- package/tools/cli/lib/utils.js +87 -0
- package/src/core/skills/acceptance-criteria-generator/SKILL.md +0 -46
- package/src/core/skills/adr-template/SKILL.md +0 -62
- package/src/core/skills/agileflow-acceptance-criteria/SKILL.md +0 -156
- package/src/core/skills/agileflow-adr/SKILL.md +0 -147
- package/src/core/skills/agileflow-adr/examples/database-choice-example.md +0 -122
- package/src/core/skills/agileflow-adr/templates/adr-template.md +0 -69
- package/src/core/skills/agileflow-commit-messages/SKILL.md +0 -130
- package/src/core/skills/agileflow-commit-messages/reference/bad-examples.md +0 -168
- package/src/core/skills/agileflow-commit-messages/reference/good-examples.md +0 -120
- package/src/core/skills/agileflow-commit-messages/scripts/check-attribution.sh +0 -15
- package/src/core/skills/agileflow-epic-planner/SKILL.md +0 -184
- package/src/core/skills/agileflow-retro-facilitator/SKILL.md +0 -119
- package/src/core/skills/agileflow-retro-facilitator/cookbook/4ls.md +0 -86
- package/src/core/skills/agileflow-retro-facilitator/cookbook/glad-sad-mad.md +0 -79
- package/src/core/skills/agileflow-retro-facilitator/cookbook/start-stop-continue.md +0 -142
- package/src/core/skills/agileflow-retro-facilitator/prompts/action-items.md +0 -83
- package/src/core/skills/agileflow-sprint-planner/SKILL.md +0 -212
- package/src/core/skills/agileflow-story-writer/SKILL.md +0 -163
- package/src/core/skills/agileflow-story-writer/examples/good-story-example.md +0 -63
- package/src/core/skills/agileflow-story-writer/templates/story-template.md +0 -44
- package/src/core/skills/agileflow-tech-debt/SKILL.md +0 -215
- package/src/core/skills/api-documentation-generator/SKILL.md +0 -65
- package/src/core/skills/changelog-entry/SKILL.md +0 -55
- package/src/core/skills/commit-message-formatter/SKILL.md +0 -50
- package/src/core/skills/deployment-guide-generator/SKILL.md +0 -84
- package/src/core/skills/diagram-generator/SKILL.md +0 -65
- package/src/core/skills/error-handler-template/SKILL.md +0 -78
- package/src/core/skills/migration-checklist/SKILL.md +0 -82
- package/src/core/skills/pr-description/SKILL.md +0 -65
- package/src/core/skills/sql-schema-generator/SKILL.md +0 -69
- package/src/core/skills/story-skeleton/SKILL.md +0 -34
- package/src/core/skills/test-case-generator/SKILL.md +0 -63
- package/src/core/skills/type-definitions/SKILL.md +0 -65
- package/src/core/skills/validation-schema-generator/SKILL.md +0 -64
- package/src/core/skills/writing-skills/SKILL.md +0 -352
- package/src/core/skills/writing-skills/testing-skills-with-subagents.md +0 -232
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate a custom skill with web research, cookbook pattern, and MCP integration
|
|
3
|
+
argument-hint: [SKILL_NAME] (optional)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /agileflow:skill:create
|
|
7
|
+
|
|
8
|
+
Generate dynamic, research-backed skills that combine web documentation, user's local docs, and codebase patterns.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<!-- COMPACT_SUMMARY_START -->
|
|
13
|
+
|
|
14
|
+
## Compact Summary
|
|
15
|
+
|
|
16
|
+
**ROLE**: Skill Generator - creates custom skills via comprehensive research.
|
|
17
|
+
|
|
18
|
+
### Critical Rules
|
|
19
|
+
1. **ALWAYS use Plan Mode** - Enter plan mode to explore before generating
|
|
20
|
+
2. **Research THREE sources**: Web docs, user's local docs, user's codebase
|
|
21
|
+
3. **Link to external docs** - Reference URLs, don't copy entire docs
|
|
22
|
+
4. **Reference local patterns** - Point to user's existing practices and code
|
|
23
|
+
5. **Use cookbook pattern** for multi-use-case skills
|
|
24
|
+
6. **Output to `.claude/skills/<skill-name>/`** - directly usable by Claude Code
|
|
25
|
+
|
|
26
|
+
### Generated Skill Structure
|
|
27
|
+
```
|
|
28
|
+
.claude/skills/<skill-name>/
|
|
29
|
+
├── SKILL.md # Pivot file with references to all sources
|
|
30
|
+
├── cookbook/ # Per-use-case workflows
|
|
31
|
+
├── references.md # Links to web docs + local docs + code patterns
|
|
32
|
+
├── tools/ # Executable scripts (optional)
|
|
33
|
+
└── .mcp.json # MCP server config (if applicable)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
<!-- COMPACT_SUMMARY_END -->
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Workflow
|
|
41
|
+
|
|
42
|
+
### Phase 1: Requirements Gathering
|
|
43
|
+
|
|
44
|
+
**STEP 1**: Ask what skill the user wants
|
|
45
|
+
|
|
46
|
+
```xml
|
|
47
|
+
<invoke name="AskUserQuestion">
|
|
48
|
+
<parameter name="questions">[{
|
|
49
|
+
"question": "What skill would you like to create?",
|
|
50
|
+
"header": "Skill Purpose",
|
|
51
|
+
"multiSelect": false,
|
|
52
|
+
"options": [
|
|
53
|
+
{"label": "Describe what I need", "description": "I'll explain the skill I want to build"},
|
|
54
|
+
{"label": "Database integration", "description": "Supabase, PostgreSQL, MongoDB, etc."},
|
|
55
|
+
{"label": "API integration", "description": "REST APIs, GraphQL, webhooks"},
|
|
56
|
+
{"label": "UI/Frontend", "description": "Components, styling, design system"},
|
|
57
|
+
{"label": "Development workflow", "description": "Testing, deployment, CI/CD"}
|
|
58
|
+
]
|
|
59
|
+
}]</parameter>
|
|
60
|
+
</invoke>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**STEP 2**: Gather details based on response
|
|
64
|
+
|
|
65
|
+
Extract from user's description:
|
|
66
|
+
- Technology/framework
|
|
67
|
+
- Primary use cases
|
|
68
|
+
- Target workflow
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
### Phase 2: Plan Mode Research (CRITICAL)
|
|
73
|
+
|
|
74
|
+
**STEP 3**: Enter Plan Mode
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
EnterPlanMode
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**In plan mode, you will explore THREE sources:**
|
|
81
|
+
|
|
82
|
+
#### Source 1: Web Documentation
|
|
83
|
+
|
|
84
|
+
Search for official documentation and best practices:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
WebSearch: "<technology> official documentation"
|
|
88
|
+
WebSearch: "<technology> best practices 2025"
|
|
89
|
+
WebSearch: "<technology> <use-case> guide"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Collect URLs** - don't copy content, just gather links:
|
|
93
|
+
- Official docs URL (e.g., `https://supabase.com/docs`)
|
|
94
|
+
- API reference URL
|
|
95
|
+
- GitHub repository URL
|
|
96
|
+
- Tutorial/guide URLs
|
|
97
|
+
|
|
98
|
+
#### Source 2: User's Local Documentation
|
|
99
|
+
|
|
100
|
+
Check the user's `docs/` directory for relevant practices:
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
Glob: "docs/**/*.md"
|
|
104
|
+
Grep: "<technology>" in docs/
|
|
105
|
+
Grep: "design system" in docs/ (for UI skills)
|
|
106
|
+
Grep: "style guide" in docs/ (for UI skills)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Look for:**
|
|
110
|
+
- `docs/02-practices/` - Development practices (testing, styling, security)
|
|
111
|
+
- `docs/04-architecture/` - Architecture decisions
|
|
112
|
+
- `docs/03-decisions/` - ADRs that affect this skill's domain
|
|
113
|
+
- Any existing documentation about the technology
|
|
114
|
+
|
|
115
|
+
**Example for UI skill:**
|
|
116
|
+
```
|
|
117
|
+
Read: docs/02-practices/styling.md (if exists)
|
|
118
|
+
Read: docs/02-practices/components.md (if exists)
|
|
119
|
+
Read: docs/04-architecture/design-system.md (if exists)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
#### Source 3: User's Codebase
|
|
123
|
+
|
|
124
|
+
Explore the actual code for existing patterns:
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
Glob: "src/**/*.<extension>"
|
|
128
|
+
Grep: "<pattern>" in src/
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**For UI skills, look for:**
|
|
132
|
+
- Existing component patterns: `Glob: "src/components/**/*.tsx"`
|
|
133
|
+
- Design tokens/theme: `Grep: "theme" or "colors" or "spacing"`
|
|
134
|
+
- Styling approach: Check for Tailwind, CSS modules, styled-components
|
|
135
|
+
- Existing design system: `Glob: "**/design-system/**/*"`
|
|
136
|
+
|
|
137
|
+
**For Database skills, look for:**
|
|
138
|
+
- Existing models: `Glob: "src/models/**/*"`
|
|
139
|
+
- Database client setup: `Grep: "createClient" or "prisma"`
|
|
140
|
+
- Migration patterns: `Glob: "**/migrations/**/*"`
|
|
141
|
+
|
|
142
|
+
**For API skills, look for:**
|
|
143
|
+
- Existing routes: `Glob: "src/api/**/*" or "src/routes/**/*"`
|
|
144
|
+
- Middleware patterns: `Grep: "middleware"`
|
|
145
|
+
- Error handling: `Grep: "catch" or "error"`
|
|
146
|
+
|
|
147
|
+
**STEP 4**: Research MCP servers
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
WebSearch: "<technology> MCP server official"
|
|
151
|
+
WebSearch: "Model Context Protocol <technology>"
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
If found, note the package name and documentation URL.
|
|
155
|
+
|
|
156
|
+
**STEP 5**: Write plan with findings
|
|
157
|
+
|
|
158
|
+
Write to plan file:
|
|
159
|
+
|
|
160
|
+
```markdown
|
|
161
|
+
# Skill: <skill-name>
|
|
162
|
+
|
|
163
|
+
## Research Findings
|
|
164
|
+
|
|
165
|
+
### Web Documentation
|
|
166
|
+
- Official docs: <URL>
|
|
167
|
+
- API reference: <URL>
|
|
168
|
+
- Best practices: <URL>
|
|
169
|
+
|
|
170
|
+
### Local Documentation Found
|
|
171
|
+
- `docs/02-practices/styling.md` - Design system guidelines
|
|
172
|
+
- `docs/04-architecture/components.md` - Component patterns
|
|
173
|
+
- (or "No relevant local docs found")
|
|
174
|
+
|
|
175
|
+
### Codebase Patterns Found
|
|
176
|
+
- Design system: `src/styles/theme.ts` - Color tokens, spacing
|
|
177
|
+
- Component pattern: `src/components/Button/` - Standard component structure
|
|
178
|
+
- (or "No existing patterns found for this domain")
|
|
179
|
+
|
|
180
|
+
### MCP Server
|
|
181
|
+
- Found: @supabase/mcp-server
|
|
182
|
+
- Docs: <URL>
|
|
183
|
+
|
|
184
|
+
## Proposed Skill Structure
|
|
185
|
+
- SKILL.md with references to all sources
|
|
186
|
+
- cookbook/ for <use-case-1>, <use-case-2>
|
|
187
|
+
- references.md linking everything
|
|
188
|
+
|
|
189
|
+
## Questions for User
|
|
190
|
+
- Should I include the MCP server?
|
|
191
|
+
- Any other local patterns I should incorporate?
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
**STEP 6**: Exit plan mode for approval
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
ExitPlanMode
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
User reviews the plan and approves or requests changes.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
### Phase 3: Skill Generation
|
|
205
|
+
|
|
206
|
+
**STEP 7**: Determine skill complexity
|
|
207
|
+
|
|
208
|
+
- **Simple skill** (1 use case): SKILL.md only, no cookbook
|
|
209
|
+
- **Complex skill** (2+ use cases): SKILL.md + cookbook/ directory
|
|
210
|
+
|
|
211
|
+
**STEP 8**: Generate SKILL.md
|
|
212
|
+
|
|
213
|
+
```markdown
|
|
214
|
+
---
|
|
215
|
+
name: <skill-name-with-hyphens>
|
|
216
|
+
description: Use when <triggering conditions and symptoms>
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
# <Skill Title>
|
|
220
|
+
|
|
221
|
+
<One sentence description.>
|
|
222
|
+
|
|
223
|
+
## When to Use
|
|
224
|
+
|
|
225
|
+
This skill activates when:
|
|
226
|
+
- <Symptom 1>
|
|
227
|
+
- <Symptom 2>
|
|
228
|
+
- Keywords: "<keyword1>", "<keyword2>", "<keyword3>"
|
|
229
|
+
|
|
230
|
+
## Project Context
|
|
231
|
+
|
|
232
|
+
**IMPORTANT**: This skill is tailored to THIS project. Before implementing:
|
|
233
|
+
|
|
234
|
+
1. **Check local practices first**: Read `references.md` for project-specific patterns
|
|
235
|
+
2. **Follow existing code patterns**: The codebase patterns section shows how this project does things
|
|
236
|
+
3. **Use external docs for details**: Official documentation URLs are in references.md
|
|
237
|
+
|
|
238
|
+
## Cookbook
|
|
239
|
+
|
|
240
|
+
Based on context, select the appropriate workflow:
|
|
241
|
+
|
|
242
|
+
### <Use Case 1>
|
|
243
|
+
If <condition>:
|
|
244
|
+
Then read cookbook/<use-case-1>.md
|
|
245
|
+
|
|
246
|
+
Examples:
|
|
247
|
+
- "<example request>"
|
|
248
|
+
|
|
249
|
+
### <Use Case 2>
|
|
250
|
+
If <condition>:
|
|
251
|
+
Then read cookbook/<use-case-2>.md
|
|
252
|
+
|
|
253
|
+
Examples:
|
|
254
|
+
- "<example request>"
|
|
255
|
+
|
|
256
|
+
## Quick Reference
|
|
257
|
+
|
|
258
|
+
| Action | Command/Pattern |
|
|
259
|
+
|--------|-----------------|
|
|
260
|
+
| <action1> | <pattern1> |
|
|
261
|
+
|
|
262
|
+
## When You're Stuck
|
|
263
|
+
|
|
264
|
+
1. **Read `references.md`** - Links to all documentation sources
|
|
265
|
+
2. **Check local docs** - Project practices in docs/02-practices/
|
|
266
|
+
3. **Look at existing code** - See codebase patterns in references.md
|
|
267
|
+
4. **Fetch external docs** - Use WebFetch on URLs in references.md
|
|
268
|
+
|
|
269
|
+
## MCP Integration
|
|
270
|
+
|
|
271
|
+
This skill uses the **<server-name>** MCP server.
|
|
272
|
+
|
|
273
|
+
**Setup**: The `.mcp.json` in this skill folder contains the configuration.
|
|
274
|
+
To activate, copy to your project's `.mcp.json` or merge with existing.
|
|
275
|
+
|
|
276
|
+
## Common Mistakes
|
|
277
|
+
|
|
278
|
+
- <Mistake 1>: <How to avoid>
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
**STEP 9**: Generate references.md
|
|
282
|
+
|
|
283
|
+
This file links ALL documentation sources - web, local, and codebase:
|
|
284
|
+
|
|
285
|
+
```markdown
|
|
286
|
+
# References for <Skill Name>
|
|
287
|
+
|
|
288
|
+
## External Documentation
|
|
289
|
+
|
|
290
|
+
| Resource | URL | Use For |
|
|
291
|
+
|----------|-----|---------|
|
|
292
|
+
| Official Docs | <URL> | Core concepts, getting started |
|
|
293
|
+
| API Reference | <URL> | Method signatures, parameters |
|
|
294
|
+
| GitHub Repo | <URL> | Examples, issues, updates |
|
|
295
|
+
| Best Practices | <URL> | Patterns, anti-patterns |
|
|
296
|
+
|
|
297
|
+
## Local Project Documentation
|
|
298
|
+
|
|
299
|
+
| File | Contains |
|
|
300
|
+
|------|----------|
|
|
301
|
+
| `docs/02-practices/<file>.md` | <description> |
|
|
302
|
+
| `docs/04-architecture/<file>.md` | <description> |
|
|
303
|
+
| (or "No local docs found for this domain") |
|
|
304
|
+
|
|
305
|
+
## Codebase Patterns
|
|
306
|
+
|
|
307
|
+
Existing patterns in this project that you MUST follow:
|
|
308
|
+
|
|
309
|
+
### <Pattern Name>
|
|
310
|
+
- **Location**: `src/path/to/file.ts`
|
|
311
|
+
- **Pattern**: <description of what it does>
|
|
312
|
+
- **Example**:
|
|
313
|
+
```typescript
|
|
314
|
+
// Code snippet showing the pattern
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### <Another Pattern>
|
|
318
|
+
- **Location**: `src/path/to/other.ts`
|
|
319
|
+
- **Pattern**: <description>
|
|
320
|
+
|
|
321
|
+
(or "No existing patterns found - follow external docs")
|
|
322
|
+
|
|
323
|
+
## MCP Server
|
|
324
|
+
|
|
325
|
+
| Package | Docs | Tools Provided |
|
|
326
|
+
|---------|------|----------------|
|
|
327
|
+
| <package-name> | <URL> | <list of tools> |
|
|
328
|
+
|
|
329
|
+
## How to Use These References
|
|
330
|
+
|
|
331
|
+
1. **First**: Check "Codebase Patterns" - follow existing project conventions
|
|
332
|
+
2. **Second**: Read "Local Project Documentation" for team practices
|
|
333
|
+
3. **Third**: Use "External Documentation" URLs for syntax and details
|
|
334
|
+
4. **To fetch docs**: `WebFetch: <URL>` with prompt "Extract <specific info>"
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
**STEP 10**: Generate cookbook entries (if complex skill)
|
|
338
|
+
|
|
339
|
+
For each use case, create `cookbook/<use-case>.md`:
|
|
340
|
+
|
|
341
|
+
```markdown
|
|
342
|
+
# <Use Case Title>
|
|
343
|
+
|
|
344
|
+
<Brief description of this workflow.>
|
|
345
|
+
|
|
346
|
+
## Prerequisites
|
|
347
|
+
|
|
348
|
+
- <Prerequisite 1>
|
|
349
|
+
- <Prerequisite 2>
|
|
350
|
+
|
|
351
|
+
## Instructions
|
|
352
|
+
|
|
353
|
+
1. **<Step 1>**:
|
|
354
|
+
<Details>
|
|
355
|
+
|
|
356
|
+
2. **<Step 2>**:
|
|
357
|
+
```<language>
|
|
358
|
+
<code example>
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
3. **<Step 3>**:
|
|
362
|
+
<Details>
|
|
363
|
+
|
|
364
|
+
## Example
|
|
365
|
+
|
|
366
|
+
**Input**: <sample>
|
|
367
|
+
**Output**: <result>
|
|
368
|
+
|
|
369
|
+
## Troubleshooting
|
|
370
|
+
|
|
371
|
+
- **<Problem>**: <Solution>
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
**STEP 11**: Generate .mcp.json (if user approved MCP)
|
|
375
|
+
|
|
376
|
+
```json
|
|
377
|
+
{
|
|
378
|
+
"mcpServers": {
|
|
379
|
+
"<server-name>": {
|
|
380
|
+
"command": "npx",
|
|
381
|
+
"args": ["-y", "<package-name>"],
|
|
382
|
+
"env": {
|
|
383
|
+
"<ENV_VAR>": "${<ENV_VAR>}"
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
---
|
|
391
|
+
|
|
392
|
+
### Phase 4: Preview & Confirmation
|
|
393
|
+
|
|
394
|
+
**STEP 12**: Show skill structure
|
|
395
|
+
|
|
396
|
+
Display the generated structure:
|
|
397
|
+
|
|
398
|
+
```
|
|
399
|
+
.claude/skills/<skill-name>/
|
|
400
|
+
├── SKILL.md (XX lines)
|
|
401
|
+
├── references.md # Links to web docs, local docs, codebase patterns
|
|
402
|
+
├── cookbook/
|
|
403
|
+
│ ├── <use-case-1>.md
|
|
404
|
+
│ └── <use-case-2>.md
|
|
405
|
+
└── .mcp.json
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
**STEP 13**: Preview SKILL.md content
|
|
409
|
+
|
|
410
|
+
Show the first 50 lines of SKILL.md for review.
|
|
411
|
+
|
|
412
|
+
**STEP 14**: Confirm creation
|
|
413
|
+
|
|
414
|
+
```xml
|
|
415
|
+
<invoke name="AskUserQuestion">
|
|
416
|
+
<parameter name="questions">[{
|
|
417
|
+
"question": "Create this skill?",
|
|
418
|
+
"header": "Confirm",
|
|
419
|
+
"multiSelect": false,
|
|
420
|
+
"options": [
|
|
421
|
+
{"label": "Yes, create skill", "description": "Write all files to .claude/skills/"},
|
|
422
|
+
{"label": "No, start over", "description": "Cancel and restart"},
|
|
423
|
+
{"label": "Edit requirements", "description": "Modify before creating"}
|
|
424
|
+
]
|
|
425
|
+
}]</parameter>
|
|
426
|
+
</invoke>
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
---
|
|
430
|
+
|
|
431
|
+
### Phase 5: Write Files
|
|
432
|
+
|
|
433
|
+
**STEP 15**: Create skill directory and files
|
|
434
|
+
|
|
435
|
+
```bash
|
|
436
|
+
mkdir -p .claude/skills/<skill-name>/cookbook
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
Write files:
|
|
440
|
+
1. `.claude/skills/<skill-name>/SKILL.md` - Main skill file
|
|
441
|
+
2. `.claude/skills/<skill-name>/references.md` - Links to web docs, local docs, codebase patterns
|
|
442
|
+
3. `.claude/skills/<skill-name>/cookbook/<use-case>.md` (for each use case)
|
|
443
|
+
4. `.claude/skills/<skill-name>/.mcp.json` (if MCP enabled)
|
|
444
|
+
|
|
445
|
+
**STEP 16**: Verify creation
|
|
446
|
+
|
|
447
|
+
```bash
|
|
448
|
+
ls -la .claude/skills/<skill-name>/
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
**STEP 17**: Present next steps
|
|
452
|
+
|
|
453
|
+
```xml
|
|
454
|
+
<invoke name="AskUserQuestion">
|
|
455
|
+
<parameter name="questions">[{
|
|
456
|
+
"question": "Skill created! What next?",
|
|
457
|
+
"header": "Next Steps",
|
|
458
|
+
"multiSelect": false,
|
|
459
|
+
"options": [
|
|
460
|
+
{"label": "Test the skill now", "description": "Try using the skill in this session"},
|
|
461
|
+
{"label": "Create another skill", "description": "Generate a new skill"},
|
|
462
|
+
{"label": "Done", "description": "Finish skill creation"}
|
|
463
|
+
]
|
|
464
|
+
}]</parameter>
|
|
465
|
+
</invoke>
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
---
|
|
469
|
+
|
|
470
|
+
## Error Handling
|
|
471
|
+
|
|
472
|
+
### Web Search Fails
|
|
473
|
+
|
|
474
|
+
If WebSearch returns no results:
|
|
475
|
+
1. Ask user for documentation URL
|
|
476
|
+
2. Use generic patterns
|
|
477
|
+
3. Note "manual review recommended" in SKILL.md
|
|
478
|
+
|
|
479
|
+
### MCP Not Found
|
|
480
|
+
|
|
481
|
+
If no MCP server found for technology:
|
|
482
|
+
1. Create skill without .mcp.json
|
|
483
|
+
2. Add note in SKILL.md: "No MCP server found for <technology>. MCP integration can be added later."
|
|
484
|
+
3. Provide instructions for manual MCP setup
|
|
485
|
+
|
|
486
|
+
### Validation Errors
|
|
487
|
+
|
|
488
|
+
Before writing, validate:
|
|
489
|
+
- `name` uses only letters, numbers, hyphens
|
|
490
|
+
- `description` is under 1024 characters
|
|
491
|
+
- SKILL.md body is under 500 lines
|
|
492
|
+
- All cookbook files referenced in SKILL.md exist
|
|
493
|
+
|
|
494
|
+
If validation fails:
|
|
495
|
+
1. Show specific errors
|
|
496
|
+
2. Offer to fix automatically
|
|
497
|
+
3. Don't write until valid
|
|
498
|
+
|
|
499
|
+
---
|
|
500
|
+
|
|
501
|
+
## Examples
|
|
502
|
+
|
|
503
|
+
### Example 1: Supabase Swift Skill
|
|
504
|
+
|
|
505
|
+
**User**: "I want a skill for database management in Supabase for Swift"
|
|
506
|
+
|
|
507
|
+
**Plan mode research finds:**
|
|
508
|
+
- Web docs: supabase.com/docs/guides/getting-started/quickstarts/swift
|
|
509
|
+
- Local docs: None found
|
|
510
|
+
- Codebase: `src/lib/supabase.ts` - existing client setup
|
|
511
|
+
- MCP: @supabase/mcp-server available
|
|
512
|
+
|
|
513
|
+
**Generated**:
|
|
514
|
+
```
|
|
515
|
+
.claude/skills/supabase-swift/
|
|
516
|
+
├── SKILL.md
|
|
517
|
+
├── references.md # Links to Supabase docs + local client pattern
|
|
518
|
+
├── cookbook/
|
|
519
|
+
│ ├── crud-operations.md
|
|
520
|
+
│ ├── authentication.md
|
|
521
|
+
│ ├── migrations.md
|
|
522
|
+
│ └── realtime-subscriptions.md
|
|
523
|
+
└── .mcp.json
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
**references.md includes:**
|
|
527
|
+
- External: Supabase Swift SDK docs URL, API reference URL
|
|
528
|
+
- Codebase: Points to `src/lib/supabase.ts` for client pattern
|
|
529
|
+
- MCP: @supabase/mcp-server docs and tools
|
|
530
|
+
|
|
531
|
+
### Example 2: UI Component Skill
|
|
532
|
+
|
|
533
|
+
**User**: "I need a skill for building UI components"
|
|
534
|
+
|
|
535
|
+
**Plan mode research finds:**
|
|
536
|
+
- Web docs: React docs, Tailwind docs
|
|
537
|
+
- Local docs: `docs/02-practices/styling.md` - design system guidelines
|
|
538
|
+
- Codebase: `src/components/Button/` - existing component pattern, `src/styles/theme.ts` - color tokens
|
|
539
|
+
|
|
540
|
+
**Generated**:
|
|
541
|
+
```
|
|
542
|
+
.claude/skills/ui-components/
|
|
543
|
+
├── SKILL.md
|
|
544
|
+
├── references.md # Links to React/Tailwind + local design system
|
|
545
|
+
└── cookbook/
|
|
546
|
+
├── create-component.md
|
|
547
|
+
├── styling-patterns.md
|
|
548
|
+
└── accessibility.md
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
**references.md includes:**
|
|
552
|
+
- External: React docs URL, Tailwind docs URL
|
|
553
|
+
- Local docs: `docs/02-practices/styling.md`
|
|
554
|
+
- Codebase patterns: Button component structure, theme tokens location
|
|
555
|
+
|
|
556
|
+
---
|
|
557
|
+
|
|
558
|
+
## Usage
|
|
559
|
+
|
|
560
|
+
```bash
|
|
561
|
+
# Interactive mode (recommended)
|
|
562
|
+
/agileflow:skill:create
|
|
563
|
+
|
|
564
|
+
# With skill name hint
|
|
565
|
+
/agileflow:skill:create supabase-swift
|
|
566
|
+
```
|