@itz4blitz/agentful 0.2.1 → 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.
- package/.claude/agents/orchestrator.md +121 -610
- package/.claude/commands/agentful-generate.md +206 -0
- package/.claude/skills/conversation/SKILL.md +152 -975
- package/bin/cli.js +108 -583
- package/bin/hooks/health-check.sh +16 -16
- package/lib/index.js +6 -36
- package/lib/init.js +162 -0
- package/package.json +1 -2
- package/version.json +1 -1
- package/.claude/commands/agentful-agents.md +0 -668
- package/.claude/commands/agentful-skills.md +0 -635
- package/.claude/product/CHANGES.md +0 -276
- package/lib/agent-generator.js +0 -778
- package/lib/domain-detector.js +0 -468
- package/lib/domain-structure-generator.js +0 -770
- package/lib/project-analyzer.js +0 -701
- package/lib/tech-stack-detector.js +0 -1091
- package/lib/template-engine.js +0 -240
- package/templates/agents/domain-agent.template.md +0 -208
- package/templates/agents/tech-agent.template.md +0 -124
|
@@ -1,635 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: agentful-skills
|
|
3
|
-
description: Discovers missing skills based on tech stack, validates existing skills, and generates new skills using parallel sub-agents
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# agentful Skills Discovery & Generation
|
|
7
|
-
|
|
8
|
-
This command intelligently discovers, validates, and generates skills for your project based on tech stack analysis and available knowledge sources.
|
|
9
|
-
|
|
10
|
-
## Command Modes
|
|
11
|
-
|
|
12
|
-
The command auto-detects the appropriate mode based on arguments:
|
|
13
|
-
|
|
14
|
-
1. **No arguments** → Discovery mode (analyze and recommend)
|
|
15
|
-
2. **`validate`** → Validation mode (check existing skills)
|
|
16
|
-
3. **`generate [skill-name]`** → Generate specific skill
|
|
17
|
-
4. **`regenerate [skill-name]`** → Regenerate existing skill with latest knowledge
|
|
18
|
-
|
|
19
|
-
## Mode 1: DISCOVERY (Default)
|
|
20
|
-
|
|
21
|
-
When run without arguments, analyzes the project and recommends missing skills.
|
|
22
|
-
|
|
23
|
-
### Process
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
🔍 Discovering Skills for Your Project
|
|
27
|
-
|
|
28
|
-
Step 1: Analyzing tech stack...
|
|
29
|
-
Step 2: Checking available knowledge sources (MCP)...
|
|
30
|
-
Step 3: Identifying missing skills...
|
|
31
|
-
Step 4: Validating existing skills...
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### 1. Tech Stack Detection
|
|
35
|
-
|
|
36
|
-
Detect tech stack from multiple sources in priority order:
|
|
37
|
-
|
|
38
|
-
| Priority | Source | Detects |
|
|
39
|
-
|----------|--------|---------|
|
|
40
|
-
| 1 | `.agentful/architecture.json` | Complete tech stack from previous analysis |
|
|
41
|
-
| 2 | `package.json` | Node.js dependencies and frameworks |
|
|
42
|
-
| 3 | `requirements.txt` / `pyproject.toml` | Python packages |
|
|
43
|
-
| 4 | `go.mod` | Go modules |
|
|
44
|
-
| 5 | `Cargo.toml` | Rust crates |
|
|
45
|
-
| 6 | Config files | Framework-specific configs |
|
|
46
|
-
|
|
47
|
-
**Detection Algorithm:**
|
|
48
|
-
|
|
49
|
-
```typescript
|
|
50
|
-
interface TechStack {
|
|
51
|
-
language: string; // TypeScript, Python, Go, Rust, Java
|
|
52
|
-
framework: string | null; // Next.js 15, Django 5, etc.
|
|
53
|
-
database: string | null; // PostgreSQL, MySQL, MongoDB
|
|
54
|
-
orm: string | null; // Prisma, TypeORM, SQLAlchemy
|
|
55
|
-
testing: string[]; // Jest, Pytest, etc.
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function detectTechStack(): TechStack {
|
|
59
|
-
// Priority 1: Read architecture.json if exists
|
|
60
|
-
if (exists(".agentful/architecture.json")) {
|
|
61
|
-
return parseArchitecture();
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Priority 2-5: Parse dependency files
|
|
65
|
-
if (exists("package.json")) {
|
|
66
|
-
return detectNodeStack();
|
|
67
|
-
} else if (exists("requirements.txt")) {
|
|
68
|
-
return detectPythonStack();
|
|
69
|
-
} else if (exists("go.mod")) {
|
|
70
|
-
return detectGoStack();
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return defaultStack();
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### 2. Check MCP Knowledge Sources
|
|
78
|
-
|
|
79
|
-
Check if MCP servers are available for providing up-to-date knowledge:
|
|
80
|
-
|
|
81
|
-
| MCP Server | Provides |
|
|
82
|
-
|------------|----------|
|
|
83
|
-
| context7 | Framework docs, API reference, best practices |
|
|
84
|
-
| brave-search | Latest versions, breaking changes, migration guides |
|
|
85
|
-
| mdn | Web APIs, browser compatibility, web standards |
|
|
86
|
-
|
|
87
|
-
```typescript
|
|
88
|
-
async function checkMCPSources(): Promise<MCPSource[]> {
|
|
89
|
-
const mcpSources = [];
|
|
90
|
-
|
|
91
|
-
// Check MCP config
|
|
92
|
-
try {
|
|
93
|
-
const mcpConfig = Read(".claude/mcp.json");
|
|
94
|
-
const config = JSON.parse(mcpConfig);
|
|
95
|
-
|
|
96
|
-
if (config.servers?.context7) {
|
|
97
|
-
mcpSources.push({
|
|
98
|
-
name: "context7",
|
|
99
|
-
available: true,
|
|
100
|
-
provides: ["framework-docs", "api-reference"]
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
// Check other servers...
|
|
104
|
-
} catch {
|
|
105
|
-
return []; // No MCP configured
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
return mcpSources;
|
|
109
|
-
}
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### 3. Identify Missing Skills
|
|
113
|
-
|
|
114
|
-
Map tech stack to required skills:
|
|
115
|
-
|
|
116
|
-
```typescript
|
|
117
|
-
interface SkillRecommendation {
|
|
118
|
-
name: string;
|
|
119
|
-
category: "framework" | "database" | "platform" | "core";
|
|
120
|
-
reason: string;
|
|
121
|
-
priority: "critical" | "high" | "medium" | "low";
|
|
122
|
-
exists: boolean;
|
|
123
|
-
knowledgeSources: string[];
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function identifyMissingSkills(stack: TechStack): SkillRecommendation[] {
|
|
127
|
-
const recommendations = [];
|
|
128
|
-
const existingSkills = Glob(".claude/skills/*/SKILL.md");
|
|
129
|
-
|
|
130
|
-
// Framework skills
|
|
131
|
-
if (stack.framework) {
|
|
132
|
-
const skillName = frameworkToSkillName(stack.framework);
|
|
133
|
-
recommendations.push({
|
|
134
|
-
name: skillName,
|
|
135
|
-
category: "framework",
|
|
136
|
-
reason: `Your project uses ${stack.framework}`,
|
|
137
|
-
priority: "high",
|
|
138
|
-
exists: existingSkills.includes(skillName)
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
// Database skills
|
|
143
|
-
if (stack.database) {
|
|
144
|
-
recommendations.push({
|
|
145
|
-
name: `${stack.database.toLowerCase()}-db`,
|
|
146
|
-
category: "database",
|
|
147
|
-
reason: `Your project uses ${stack.database}`,
|
|
148
|
-
priority: "high",
|
|
149
|
-
exists: existingSkills.includes(`${stack.database}-db`)
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// Core skills (always recommend if missing)
|
|
154
|
-
const coreSkills = [
|
|
155
|
-
{ name: "validation", reason: "Production readiness validation" },
|
|
156
|
-
{ name: "product-tracking", reason: "Track product completion progress" }
|
|
157
|
-
];
|
|
158
|
-
|
|
159
|
-
for (const core of coreSkills) {
|
|
160
|
-
if (!existingSkills.includes(core.name)) {
|
|
161
|
-
recommendations.push({
|
|
162
|
-
name: core.name,
|
|
163
|
-
category: "core",
|
|
164
|
-
reason: core.reason,
|
|
165
|
-
priority: "critical"
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
return recommendations;
|
|
171
|
-
}
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
### 4. Display Findings
|
|
175
|
-
|
|
176
|
-
```
|
|
177
|
-
📊 Tech Stack Detected
|
|
178
|
-
|
|
179
|
-
Language: TypeScript
|
|
180
|
-
Framework: Next.js 15
|
|
181
|
-
Database: PostgreSQL
|
|
182
|
-
ORM: Prisma
|
|
183
|
-
Testing: Jest, Playwright
|
|
184
|
-
|
|
185
|
-
────────────────────────────────────────────────────────
|
|
186
|
-
|
|
187
|
-
🔌 Knowledge Sources Available
|
|
188
|
-
|
|
189
|
-
✓ Context7 (framework-docs, best-practices)
|
|
190
|
-
✓ Brave Search (latest-versions, migration-guides)
|
|
191
|
-
✗ MDN (not configured)
|
|
192
|
-
|
|
193
|
-
────────────────────────────────────────────────────────
|
|
194
|
-
|
|
195
|
-
🎯 Skill Recommendations
|
|
196
|
-
|
|
197
|
-
Missing Skills (3):
|
|
198
|
-
|
|
199
|
-
1. nextjs-15 (HIGH PRIORITY) - Framework
|
|
200
|
-
Your project uses Next.js 15. This skill provides
|
|
201
|
-
framework-specific patterns and best practices.
|
|
202
|
-
|
|
203
|
-
2. postgresql-db (HIGH PRIORITY) - Database
|
|
204
|
-
Your project uses PostgreSQL. This skill provides
|
|
205
|
-
query patterns and optimization techniques.
|
|
206
|
-
|
|
207
|
-
3. prisma-orm (MEDIUM PRIORITY) - Database
|
|
208
|
-
Your project uses Prisma. This skill provides
|
|
209
|
-
ORM-specific patterns and relation handling.
|
|
210
|
-
|
|
211
|
-
Existing Skills (2):
|
|
212
|
-
|
|
213
|
-
✓ validation - Up to date
|
|
214
|
-
✓ product-tracking - Up to date
|
|
215
|
-
|
|
216
|
-
────────────────────────────────────────────────────────
|
|
217
|
-
|
|
218
|
-
Would you like to:
|
|
219
|
-
[1] Generate all missing skills (recommended)
|
|
220
|
-
[2] Generate specific skills only
|
|
221
|
-
[3] Skip for now
|
|
222
|
-
|
|
223
|
-
Your choice: > _______________________________
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
### 5. User Selection & Generation
|
|
227
|
-
|
|
228
|
-
**If user selects [1] - Generate all:**
|
|
229
|
-
|
|
230
|
-
```
|
|
231
|
-
🚀 Generating Missing Skills
|
|
232
|
-
|
|
233
|
-
Using parallel sub-agents for faster generation...
|
|
234
|
-
|
|
235
|
-
Running 3 skill generators in parallel:
|
|
236
|
-
→ nextjs-15 (using context7)
|
|
237
|
-
→ postgresql-db (using context7)
|
|
238
|
-
→ prisma-orm (using context7)
|
|
239
|
-
|
|
240
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
241
|
-
|
|
242
|
-
[Generator 1] nextjs-15
|
|
243
|
-
✓ Fetching Next.js 15 documentation...
|
|
244
|
-
✓ Generating SKILL.md...
|
|
245
|
-
✓ Created: .claude/skills/nextjs-15/SKILL.md
|
|
246
|
-
|
|
247
|
-
[Generator 2] postgresql-db
|
|
248
|
-
✓ Fetching PostgreSQL documentation...
|
|
249
|
-
✓ Created: .claude/skills/postgresql-db/SKILL.md
|
|
250
|
-
|
|
251
|
-
[Generator 3] prisma-orm
|
|
252
|
-
✓ Fetching Prisma documentation...
|
|
253
|
-
✓ Created: .claude/skills/prisma-orm/SKILL.md
|
|
254
|
-
|
|
255
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
256
|
-
|
|
257
|
-
✅ Successfully generated 3 skills
|
|
258
|
-
|
|
259
|
-
Skills ready to use. Run /agentful-start to begin development.
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
## Mode 2: VALIDATION
|
|
263
|
-
|
|
264
|
-
When run with `validate` argument: `/agentful-skills validate`
|
|
265
|
-
|
|
266
|
-
### Process
|
|
267
|
-
|
|
268
|
-
```
|
|
269
|
-
🔍 Validating Existing Skills
|
|
270
|
-
|
|
271
|
-
Found 3 skills: validation, product-tracking, nextjs-15
|
|
272
|
-
|
|
273
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
274
|
-
|
|
275
|
-
[1/3] Validating: validation
|
|
276
|
-
✓ SKILL.md exists
|
|
277
|
-
✓ Valid frontmatter
|
|
278
|
-
✓ Content sections present
|
|
279
|
-
Status: ✓ VALID
|
|
280
|
-
|
|
281
|
-
[2/3] Validating: nextjs-15
|
|
282
|
-
✓ Structure valid
|
|
283
|
-
⚠ Version mismatch (Skill: 15.0, Project: 15.1)
|
|
284
|
-
Status: ⚠ NEEDS UPDATE
|
|
285
|
-
|
|
286
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
287
|
-
|
|
288
|
-
Summary:
|
|
289
|
-
✓ Valid: 2 skills
|
|
290
|
-
⚠ Needs update: 1 skill
|
|
291
|
-
|
|
292
|
-
Would you like to:
|
|
293
|
-
[1] Regenerate nextjs-15 with latest documentation
|
|
294
|
-
[2] Exit
|
|
295
|
-
|
|
296
|
-
Your choice: > _______________________________
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
### Validation Checks
|
|
300
|
-
|
|
301
|
-
```typescript
|
|
302
|
-
interface SkillValidation {
|
|
303
|
-
skill_name: string;
|
|
304
|
-
structure: {
|
|
305
|
-
has_skill_md: boolean;
|
|
306
|
-
valid_frontmatter: boolean;
|
|
307
|
-
has_content: boolean;
|
|
308
|
-
};
|
|
309
|
-
completeness: {
|
|
310
|
-
has_description: boolean;
|
|
311
|
-
has_examples: boolean;
|
|
312
|
-
missing_sections: string[];
|
|
313
|
-
};
|
|
314
|
-
status: "valid" | "needs_update" | "invalid";
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
function validateSkill(skillPath: string, techStack: TechStack): SkillValidation {
|
|
318
|
-
const skillContent = Read(skillPath);
|
|
319
|
-
|
|
320
|
-
// Check structure
|
|
321
|
-
const hasFrontmatter = skillContent.match(/^---\n([\s\S]*?)\n---/);
|
|
322
|
-
const hasContent = skillContent.length > 500;
|
|
323
|
-
const hasExamples = skillContent.includes("```");
|
|
324
|
-
|
|
325
|
-
// Check version alignment
|
|
326
|
-
const versionMatch = checkVersionAlignment(skillContent, techStack);
|
|
327
|
-
|
|
328
|
-
return {
|
|
329
|
-
skill_name: extractSkillName(skillPath),
|
|
330
|
-
structure: {
|
|
331
|
-
has_skill_md: true,
|
|
332
|
-
valid_frontmatter: !!hasFrontmatter,
|
|
333
|
-
has_content: hasContent
|
|
334
|
-
},
|
|
335
|
-
completeness: {
|
|
336
|
-
has_description: hasFrontmatter?.description?.length > 20,
|
|
337
|
-
has_examples: hasExamples,
|
|
338
|
-
missing_sections: []
|
|
339
|
-
},
|
|
340
|
-
status: versionMatch ? "valid" : "needs_update"
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
## Mode 3: GENERATE
|
|
346
|
-
|
|
347
|
-
When run with `generate [skill-name]`: `/agentful-skills generate nextjs-15`
|
|
348
|
-
|
|
349
|
-
### Process
|
|
350
|
-
|
|
351
|
-
Delegate to skill generator sub-agent using Task tool:
|
|
352
|
-
|
|
353
|
-
```typescript
|
|
354
|
-
async function generateSkill(skillName: string): Promise<void> {
|
|
355
|
-
const techStack = detectTechStack();
|
|
356
|
-
const mcpSources = await checkMCPSources();
|
|
357
|
-
|
|
358
|
-
// Delegate to skill-generator sub-agent
|
|
359
|
-
await Task("skill-generator", {
|
|
360
|
-
skill_name: skillName,
|
|
361
|
-
tech_stack: techStack,
|
|
362
|
-
knowledge_sources: mcpSources,
|
|
363
|
-
output_path: `.claude/skills/${skillName}/SKILL.md`
|
|
364
|
-
});
|
|
365
|
-
|
|
366
|
-
console.log(`✓ Successfully generated: .claude/skills/${skillName}/SKILL.md`);
|
|
367
|
-
}
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
### Skill Generator Sub-Agent Instructions
|
|
371
|
-
|
|
372
|
-
**Generator Process:**
|
|
373
|
-
|
|
374
|
-
1. **Fetch Knowledge** (if MCP sources available):
|
|
375
|
-
- Use context7 to fetch official documentation
|
|
376
|
-
- Use brave-search for latest guides and best practices
|
|
377
|
-
|
|
378
|
-
2. **Extract Patterns**:
|
|
379
|
-
- Common patterns for the framework/library
|
|
380
|
-
- Best practices from official docs
|
|
381
|
-
- Common pitfalls to avoid
|
|
382
|
-
- Performance optimizations
|
|
383
|
-
|
|
384
|
-
3. **Generate SKILL.md** following template:
|
|
385
|
-
|
|
386
|
-
```markdown
|
|
387
|
-
---
|
|
388
|
-
name: nextjs-15
|
|
389
|
-
description: Next.js 15 App Router patterns, Server Actions, and best practices
|
|
390
|
-
model: sonnet
|
|
391
|
-
tools: Read, Write, Edit, Glob, Grep, Bash
|
|
392
|
-
version: 15.1
|
|
393
|
-
---
|
|
394
|
-
|
|
395
|
-
# Next.js 15 Skill
|
|
396
|
-
|
|
397
|
-
## App Router Patterns
|
|
398
|
-
|
|
399
|
-
### Server Components (Default)
|
|
400
|
-
|
|
401
|
-
```typescript
|
|
402
|
-
// Async Server Component
|
|
403
|
-
export default async function Page() {
|
|
404
|
-
const data = await fetchData();
|
|
405
|
-
return <Dashboard data={data} />;
|
|
406
|
-
}
|
|
407
|
-
```
|
|
408
|
-
|
|
409
|
-
**Best Practices:**
|
|
410
|
-
- Server Components are async by default
|
|
411
|
-
- Can directly access backend resources
|
|
412
|
-
- No useState or browser APIs
|
|
413
|
-
|
|
414
|
-
### Client Components
|
|
415
|
-
|
|
416
|
-
```typescript
|
|
417
|
-
'use client'
|
|
418
|
-
|
|
419
|
-
export function Counter() {
|
|
420
|
-
const [count, setCount] = useState(0)
|
|
421
|
-
return <button onClick={() => setCount(count + 1)}>{count}</button>
|
|
422
|
-
}
|
|
423
|
-
```
|
|
424
|
-
|
|
425
|
-
## Server Actions
|
|
426
|
-
|
|
427
|
-
[Patterns and examples...]
|
|
428
|
-
|
|
429
|
-
## Caching Strategies
|
|
430
|
-
|
|
431
|
-
[Cache patterns...]
|
|
432
|
-
|
|
433
|
-
## Common Pitfalls
|
|
434
|
-
|
|
435
|
-
[Mistakes to avoid...]
|
|
436
|
-
```
|
|
437
|
-
|
|
438
|
-
4. **Write to file**: `Write(output_path, skillContent)`
|
|
439
|
-
|
|
440
|
-
### Parallel Generation
|
|
441
|
-
|
|
442
|
-
When generating multiple skills:
|
|
443
|
-
|
|
444
|
-
```typescript
|
|
445
|
-
async function generateMultipleSkills(skillNames: string[]): Promise<void> {
|
|
446
|
-
// Create parallel tasks
|
|
447
|
-
const tasks = skillNames.map(skillName =>
|
|
448
|
-
Task("skill-generator", {
|
|
449
|
-
skill_name: skillName,
|
|
450
|
-
output_path: `.claude/skills/${skillName}/SKILL.md`
|
|
451
|
-
})
|
|
452
|
-
);
|
|
453
|
-
|
|
454
|
-
// Wait for all to complete
|
|
455
|
-
await Promise.all(tasks);
|
|
456
|
-
}
|
|
457
|
-
```
|
|
458
|
-
|
|
459
|
-
## Mode 4: REGENERATE
|
|
460
|
-
|
|
461
|
-
When run with `regenerate [skill-name]`: `/agentful-skills regenerate nextjs-15`
|
|
462
|
-
|
|
463
|
-
Same as generate but:
|
|
464
|
-
1. Backs up existing skill to `.claude/skills/nextjs-15/SKILL.md.backup`
|
|
465
|
-
2. Regenerates with latest knowledge sources
|
|
466
|
-
3. Preserves any custom additions (if possible)
|
|
467
|
-
|
|
468
|
-
```typescript
|
|
469
|
-
async function regenerateSkill(skillName: string): Promise<void> {
|
|
470
|
-
const skillPath = `.claude/skills/${skillName}/SKILL.md`;
|
|
471
|
-
const backupPath = `${skillPath}.backup`;
|
|
472
|
-
|
|
473
|
-
// Backup existing
|
|
474
|
-
const existing = Read(skillPath);
|
|
475
|
-
Write(backupPath, existing);
|
|
476
|
-
|
|
477
|
-
// Regenerate
|
|
478
|
-
await generateSkill(skillName);
|
|
479
|
-
|
|
480
|
-
console.log(`✓ Regenerated: ${skillPath}`);
|
|
481
|
-
console.log(`Original preserved at: ${backupPath}`);
|
|
482
|
-
}
|
|
483
|
-
```
|
|
484
|
-
|
|
485
|
-
## Knowledge Source Priority
|
|
486
|
-
|
|
487
|
-
When generating skills:
|
|
488
|
-
|
|
489
|
-
1. **MCP Sources** (if available):
|
|
490
|
-
- context7 → Official documentation
|
|
491
|
-
- brave-search → Latest guides and best practices
|
|
492
|
-
|
|
493
|
-
2. **Built-in Knowledge** (fallback):
|
|
494
|
-
- Claude's training data
|
|
495
|
-
- Common patterns library
|
|
496
|
-
|
|
497
|
-
## Skill Template Structure
|
|
498
|
-
|
|
499
|
-
All generated skills follow this structure:
|
|
500
|
-
|
|
501
|
-
```markdown
|
|
502
|
-
---
|
|
503
|
-
name: [skill-name]
|
|
504
|
-
description: [Brief description]
|
|
505
|
-
model: sonnet
|
|
506
|
-
tools: Read, Write, Edit, Glob, Grep, Bash
|
|
507
|
-
version: [version if applicable]
|
|
508
|
-
---
|
|
509
|
-
|
|
510
|
-
# [Skill Name] Skill
|
|
511
|
-
|
|
512
|
-
[Overview paragraph]
|
|
513
|
-
|
|
514
|
-
## Core Concepts
|
|
515
|
-
[Fundamental concepts]
|
|
516
|
-
|
|
517
|
-
## Common Patterns
|
|
518
|
-
[Pattern examples with code]
|
|
519
|
-
|
|
520
|
-
## Advanced Techniques
|
|
521
|
-
[Advanced patterns]
|
|
522
|
-
|
|
523
|
-
## Performance Optimization
|
|
524
|
-
[Optimization strategies]
|
|
525
|
-
|
|
526
|
-
## Testing Strategies
|
|
527
|
-
[Testing approaches]
|
|
528
|
-
|
|
529
|
-
## Common Pitfalls
|
|
530
|
-
[Mistakes to avoid]
|
|
531
|
-
|
|
532
|
-
## References
|
|
533
|
-
- [Official documentation link]
|
|
534
|
-
- [Best practices guide]
|
|
535
|
-
```
|
|
536
|
-
|
|
537
|
-
## File Locations
|
|
538
|
-
|
|
539
|
-
```
|
|
540
|
-
.claude/skills/
|
|
541
|
-
├── [skill-name]/
|
|
542
|
-
│ ├── SKILL.md # Main skill file
|
|
543
|
-
│ └── SKILL.md.backup # Backup (if regenerated)
|
|
544
|
-
```
|
|
545
|
-
|
|
546
|
-
## Example Flows
|
|
547
|
-
|
|
548
|
-
### Flow 1: New Project Discovery
|
|
549
|
-
|
|
550
|
-
```
|
|
551
|
-
User: /agentful-skills
|
|
552
|
-
|
|
553
|
-
Command: → Detects tech stack
|
|
554
|
-
→ Checks MCP sources
|
|
555
|
-
→ Identifies 3 missing skills
|
|
556
|
-
→ Shows recommendations
|
|
557
|
-
|
|
558
|
-
User: [Selects "1" - Generate all]
|
|
559
|
-
|
|
560
|
-
Command: → Generates 3 skills in parallel
|
|
561
|
-
→ Validates generated skills
|
|
562
|
-
→ Reports success
|
|
563
|
-
```
|
|
564
|
-
|
|
565
|
-
### Flow 2: Validate Existing Skills
|
|
566
|
-
|
|
567
|
-
```
|
|
568
|
-
User: /agentful-skills validate
|
|
569
|
-
|
|
570
|
-
Command: → Finds 3 existing skills
|
|
571
|
-
→ Validates each one
|
|
572
|
-
→ Detects outdated skill
|
|
573
|
-
→ Suggests regeneration
|
|
574
|
-
|
|
575
|
-
User: [Selects "1" - Regenerate]
|
|
576
|
-
|
|
577
|
-
Command: → Backs up existing skill
|
|
578
|
-
→ Regenerates with latest docs
|
|
579
|
-
```
|
|
580
|
-
|
|
581
|
-
### Flow 3: Generate Specific Skill
|
|
582
|
-
|
|
583
|
-
```
|
|
584
|
-
User: /agentful-skills generate postgresql-db
|
|
585
|
-
|
|
586
|
-
Command: → Detects PostgreSQL in dependencies
|
|
587
|
-
→ Generates skill using context7
|
|
588
|
-
→ Reports success
|
|
589
|
-
```
|
|
590
|
-
|
|
591
|
-
## Integration with Other Commands
|
|
592
|
-
|
|
593
|
-
- **`/agentful-start`**: Uses generated skills to enhance agent knowledge
|
|
594
|
-
- **`/agentful-validate`**: Uses validation skill
|
|
595
|
-
- **`/agentful-product`**: Uses product-tracking skill
|
|
596
|
-
|
|
597
|
-
## Best Practices
|
|
598
|
-
|
|
599
|
-
1. **Always run discovery** after updating dependencies
|
|
600
|
-
2. **Regenerate skills** when framework versions change
|
|
601
|
-
3. **Validate regularly** to ensure skills are up to date
|
|
602
|
-
4. **Use MCP sources** when available for latest information
|
|
603
|
-
|
|
604
|
-
## Error Handling
|
|
605
|
-
|
|
606
|
-
### MCP Source Unavailable
|
|
607
|
-
|
|
608
|
-
```
|
|
609
|
-
⚠️ MCP source 'context7' not available
|
|
610
|
-
|
|
611
|
-
Falling back to built-in knowledge (may be outdated)
|
|
612
|
-
|
|
613
|
-
For best results, configure MCP sources in .claude/mcp.json
|
|
614
|
-
```
|
|
615
|
-
|
|
616
|
-
### Skill Generation Failed
|
|
617
|
-
|
|
618
|
-
```
|
|
619
|
-
✗ Failed to generate skill: nextjs-15
|
|
620
|
-
|
|
621
|
-
Would you like to:
|
|
622
|
-
[1] Configure MCP sources
|
|
623
|
-
[2] Use fallback generation
|
|
624
|
-
[3] Skip this skill
|
|
625
|
-
```
|
|
626
|
-
|
|
627
|
-
## Success Criteria
|
|
628
|
-
|
|
629
|
-
This command is successful when:
|
|
630
|
-
|
|
631
|
-
1. **Discovery**: Accurately detects tech stack and identifies missing skills
|
|
632
|
-
2. **Validation**: Correctly identifies outdated or invalid skills
|
|
633
|
-
3. **Generation**: Creates comprehensive, well-structured skills
|
|
634
|
-
4. **Parallelization**: Generates multiple skills efficiently
|
|
635
|
-
5. **Knowledge Integration**: Uses MCP sources when available
|