agentic-flow 1.6.5 → 1.7.2

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 (34) hide show
  1. package/.claude/agents/test-neural.md +5 -0
  2. package/.claude/settings.json +20 -19
  3. package/.claude/skills/.claude-flow/metrics/agent-metrics.json +1 -0
  4. package/.claude/skills/.claude-flow/metrics/performance.json +87 -0
  5. package/.claude/skills/.claude-flow/metrics/task-metrics.json +10 -0
  6. package/.claude/skills/agentdb-memory-patterns/SKILL.md +166 -0
  7. package/.claude/skills/agentdb-vector-search/SKILL.md +126 -0
  8. package/.claude/skills/agentic-flow/agentdb-memory-patterns/SKILL.md +166 -0
  9. package/.claude/skills/agentic-flow/agentdb-vector-search/SKILL.md +126 -0
  10. package/.claude/skills/agentic-flow/reasoningbank-intelligence/SKILL.md +201 -0
  11. package/.claude/skills/agentic-flow/swarm-orchestration/SKILL.md +179 -0
  12. package/.claude/skills/reasoningbank-intelligence/SKILL.md +201 -0
  13. package/.claude/skills/skill-builder/.claude-flow/metrics/agent-metrics.json +1 -0
  14. package/.claude/skills/skill-builder/.claude-flow/metrics/performance.json +87 -0
  15. package/.claude/skills/skill-builder/.claude-flow/metrics/task-metrics.json +10 -0
  16. package/.claude/skills/skill-builder/README.md +308 -0
  17. package/.claude/skills/skill-builder/SKILL.md +910 -0
  18. package/.claude/skills/skill-builder/docs/SPECIFICATION.md +358 -0
  19. package/.claude/skills/skill-builder/resources/schemas/skill-frontmatter.schema.json +41 -0
  20. package/.claude/skills/skill-builder/resources/templates/full-skill.template +118 -0
  21. package/.claude/skills/skill-builder/resources/templates/minimal-skill.template +38 -0
  22. package/.claude/skills/skill-builder/scripts/generate-skill.sh +334 -0
  23. package/.claude/skills/skill-builder/scripts/validate-skill.sh +198 -0
  24. package/.claude/skills/swarm-orchestration/SKILL.md +179 -0
  25. package/CHANGELOG.md +71 -0
  26. package/README.md +79 -1
  27. package/dist/cli/skills-manager.js +1295 -0
  28. package/dist/cli/update-message.js +175 -0
  29. package/dist/cli-proxy.js +8 -1
  30. package/dist/utils/cli.js +17 -0
  31. package/package.json +2 -2
  32. package/wasm/reasoningbank/reasoningbank_wasm_bg.js +2 -2
  33. package/wasm/reasoningbank/reasoningbank_wasm_bg.wasm +0 -0
  34. package/.claude/answer.md +0 -1
@@ -0,0 +1,1295 @@
1
+ /**
2
+ * Skills Manager for agentic-flow
3
+ * Creates and manages Claude Code Skills in proper locations
4
+ */
5
+ import { existsSync, mkdirSync, writeFileSync, readdirSync, readFileSync } from 'fs';
6
+ import { join, dirname } from 'path';
7
+ import { homedir } from 'os';
8
+ import { fileURLToPath } from 'url';
9
+ import chalk from 'chalk';
10
+ // Get __dirname equivalent in ESM
11
+ const __filename = fileURLToPath(import.meta.url);
12
+ const __dirname = dirname(__filename);
13
+ /**
14
+ * Get skills directory paths
15
+ */
16
+ export function getSkillsPaths() {
17
+ return {
18
+ personal: join(homedir(), '.claude', 'skills'),
19
+ project: join(process.cwd(), '.claude', 'skills'),
20
+ };
21
+ }
22
+ /**
23
+ * Initialize skills directories
24
+ */
25
+ export function initSkillsDirectories(location = 'both') {
26
+ const paths = getSkillsPaths();
27
+ if (location === 'personal' || location === 'both') {
28
+ if (!existsSync(paths.personal)) {
29
+ mkdirSync(paths.personal, { recursive: true });
30
+ console.log(chalk.green('✓') + ` Created personal skills directory: ${chalk.cyan(paths.personal)}`);
31
+ }
32
+ else {
33
+ console.log(chalk.yellow('→') + ` Personal skills directory exists: ${chalk.cyan(paths.personal)}`);
34
+ }
35
+ }
36
+ if (location === 'project' || location === 'both') {
37
+ if (!existsSync(paths.project)) {
38
+ mkdirSync(paths.project, { recursive: true });
39
+ console.log(chalk.green('✓') + ` Created project skills directory: ${chalk.cyan(paths.project)}`);
40
+ }
41
+ else {
42
+ console.log(chalk.yellow('→') + ` Project skills directory exists: ${chalk.cyan(paths.project)}`);
43
+ }
44
+ }
45
+ }
46
+ /**
47
+ * Create a skill from template
48
+ */
49
+ export function createSkill(template, location = 'personal') {
50
+ const paths = getSkillsPaths();
51
+ const baseDir = location === 'personal' ? paths.personal : paths.project;
52
+ // Claude Code requires skills at top level ~/.claude/skills/[skill-name]
53
+ const skillDir = join(baseDir, template.name);
54
+ // Create skill directory
55
+ if (!existsSync(skillDir)) {
56
+ mkdirSync(skillDir, { recursive: true });
57
+ }
58
+ // Create SKILL.md
59
+ const skillMdPath = join(skillDir, 'SKILL.md');
60
+ writeFileSync(skillMdPath, template.content, 'utf-8');
61
+ console.log(chalk.green('✓') + ` Created SKILL.md: ${chalk.cyan(skillMdPath)}`);
62
+ // Create scripts
63
+ if (template.scripts) {
64
+ const scriptsDir = join(skillDir, 'scripts');
65
+ if (!existsSync(scriptsDir)) {
66
+ mkdirSync(scriptsDir, { recursive: true });
67
+ }
68
+ for (const [filename, content] of Object.entries(template.scripts)) {
69
+ const scriptPath = join(scriptsDir, filename);
70
+ writeFileSync(scriptPath, content, 'utf-8');
71
+ console.log(chalk.green('✓') + ` Created script: ${chalk.cyan(scriptPath)}`);
72
+ }
73
+ }
74
+ // Create resources
75
+ if (template.resources) {
76
+ const resourcesDir = join(skillDir, 'resources');
77
+ if (!existsSync(resourcesDir)) {
78
+ mkdirSync(resourcesDir, { recursive: true });
79
+ }
80
+ for (const [filename, content] of Object.entries(template.resources)) {
81
+ const resourcePath = join(resourcesDir, filename);
82
+ writeFileSync(resourcePath, content, 'utf-8');
83
+ console.log(chalk.green('✓') + ` Created resource: ${chalk.cyan(resourcePath)}`);
84
+ }
85
+ }
86
+ console.log('');
87
+ console.log(chalk.bold.green('✨ Skill created successfully!'));
88
+ console.log('');
89
+ console.log(chalk.white('Location: ') + chalk.cyan(skillDir));
90
+ console.log(chalk.white('Category: ') + chalk.yellow(template.category));
91
+ console.log(chalk.white('Difficulty: ') + chalk.yellow(template.difficulty));
92
+ console.log(chalk.white('Est. Time: ') + chalk.yellow(template.estimatedTime));
93
+ console.log('');
94
+ }
95
+ /**
96
+ * List installed skills
97
+ */
98
+ export function listSkills() {
99
+ const paths = getSkillsPaths();
100
+ console.log('');
101
+ console.log(chalk.bold.white('📚 Installed Claude Code Skills'));
102
+ console.log(chalk.gray('═══════════════════════════════════════════════════════════════'));
103
+ console.log('');
104
+ // Personal skills
105
+ if (existsSync(paths.personal)) {
106
+ const personalSkills = findSkills(paths.personal);
107
+ if (personalSkills.length > 0) {
108
+ console.log(chalk.bold.cyan('Personal Skills') + chalk.gray(' (~/.claude/skills/)'));
109
+ personalSkills.forEach(skill => {
110
+ console.log(chalk.green(' •') + ' ' + chalk.white(skill.name));
111
+ console.log(chalk.gray(' ' + skill.description.slice(0, 80) + '...'));
112
+ });
113
+ console.log('');
114
+ }
115
+ }
116
+ // Project skills
117
+ if (existsSync(paths.project)) {
118
+ const projectSkills = findSkills(paths.project);
119
+ if (projectSkills.length > 0) {
120
+ console.log(chalk.bold.cyan('Project Skills') + chalk.gray(' (.claude/skills/)'));
121
+ projectSkills.forEach(skill => {
122
+ console.log(chalk.green(' •') + ' ' + chalk.white(skill.name));
123
+ console.log(chalk.gray(' ' + skill.description.slice(0, 80) + '...'));
124
+ });
125
+ console.log('');
126
+ }
127
+ }
128
+ console.log(chalk.gray('═══════════════════════════════════════════════════════════════'));
129
+ console.log('');
130
+ }
131
+ /**
132
+ * Find all skills in a directory
133
+ */
134
+ function findSkills(dir) {
135
+ const skills = [];
136
+ function scanDir(currentDir) {
137
+ if (!existsSync(currentDir))
138
+ return;
139
+ const entries = readdirSync(currentDir, { withFileTypes: true });
140
+ for (const entry of entries) {
141
+ if (entry.isDirectory()) {
142
+ const skillMdPath = join(currentDir, entry.name, 'SKILL.md');
143
+ if (existsSync(skillMdPath)) {
144
+ const content = readFileSync(skillMdPath, 'utf-8');
145
+ const match = content.match(/---\n([\s\S]*?)\n---/);
146
+ if (match) {
147
+ const yaml = match[1];
148
+ const nameMatch = yaml.match(/name:\s*["']?([^"'\n]+)["']?/);
149
+ const descMatch = yaml.match(/description:\s*["']?([^"'\n]+)["']?/);
150
+ if (nameMatch && descMatch) {
151
+ skills.push({
152
+ name: nameMatch[1],
153
+ description: descMatch[1],
154
+ path: join(currentDir, entry.name),
155
+ });
156
+ }
157
+ }
158
+ }
159
+ else {
160
+ // Recurse into subdirectories
161
+ scanDir(join(currentDir, entry.name));
162
+ }
163
+ }
164
+ }
165
+ }
166
+ scanDir(dir);
167
+ return skills;
168
+ }
169
+ /**
170
+ * Generate skill template
171
+ */
172
+ export function generateSkillTemplate(name, description, category) {
173
+ const skillName = name.toLowerCase().replace(/\s+/g, '-');
174
+ return {
175
+ name: skillName,
176
+ description,
177
+ category,
178
+ difficulty: 'beginner',
179
+ estimatedTime: '5 minutes',
180
+ content: `---
181
+ name: "${name}"
182
+ description: "${description}"
183
+ ---
184
+
185
+ # ${name}
186
+
187
+ ## What This Skill Does
188
+
189
+ ${description}
190
+
191
+ ## Prerequisites
192
+
193
+ - agentic-flow installed (\`npm install -g agentic-flow@latest\`)
194
+ - Node.js 18+
195
+
196
+ ## Quick Start
197
+
198
+ \`\`\`bash
199
+ npx agentic-flow ${skillName}
200
+ \`\`\`
201
+
202
+ ## Step-by-Step Guide
203
+
204
+ 1. **Step 1**: First action
205
+ \`\`\`bash
206
+ npx agentic-flow ${skillName} --option value
207
+ \`\`\`
208
+
209
+ 2. **Step 2**: Second action
210
+ - Details about this step
211
+
212
+ 3. **Step 3**: Final action
213
+ - Verification steps
214
+
215
+ ## Expected Output
216
+
217
+ \`\`\`
218
+ ✓ Operation completed successfully
219
+ → Results: [details]
220
+ \`\`\`
221
+
222
+ ## Advanced Options
223
+
224
+ ### Option 1: Advanced Feature
225
+ \`\`\`bash
226
+ npx agentic-flow ${skillName} --advanced
227
+ \`\`\`
228
+
229
+ ### Option 2: Custom Configuration
230
+ \`\`\`bash
231
+ npx agentic-flow ${skillName} --config path/to/config.json
232
+ \`\`\`
233
+
234
+ ## Troubleshooting
235
+
236
+ ### Issue: Common Problem
237
+ **Solution**: How to resolve
238
+
239
+ ### Issue: Another Problem
240
+ **Solution**: Resolution steps
241
+
242
+ ## Learn More
243
+
244
+ - Documentation: \`docs/${category}/${skillName}.md\`
245
+ - Examples: \`examples/${skillName}/\`
246
+ - Related Skills: [list related skills]
247
+
248
+ ## Resources
249
+
250
+ - [Resource 1]
251
+ - [Resource 2]
252
+ `,
253
+ };
254
+ }
255
+ /**
256
+ * Initialize agentic-flow skills
257
+ */
258
+ export async function handleSkillsCommand(args) {
259
+ const command = args[0];
260
+ if (!command || command === 'help') {
261
+ printSkillsHelp();
262
+ return;
263
+ }
264
+ switch (command) {
265
+ case 'init':
266
+ await handleSkillsInit(args.slice(1));
267
+ break;
268
+ case 'list':
269
+ listSkills();
270
+ break;
271
+ case 'create':
272
+ await handleSkillsCreate(args.slice(1));
273
+ break;
274
+ case 'init-builder':
275
+ await handleSkillBuilderInit(args.slice(1));
276
+ break;
277
+ default:
278
+ console.log(chalk.red('Unknown command: ' + command));
279
+ printSkillsHelp();
280
+ }
281
+ }
282
+ /**
283
+ * Handle skills init command
284
+ */
285
+ async function handleSkillsInit(args) {
286
+ const location = args[0] || 'both';
287
+ const includeBuilder = args.includes('--with-builder');
288
+ console.log('');
289
+ console.log(chalk.bold.cyan('🎨 Initializing agentic-flow Skills'));
290
+ console.log(chalk.gray('═══════════════════════════════════════════════════════════════'));
291
+ console.log('');
292
+ initSkillsDirectories(location);
293
+ if (includeBuilder) {
294
+ console.log('');
295
+ console.log(chalk.yellow('→') + ' Installing Skill Builder...');
296
+ await installSkillBuilder(location);
297
+ }
298
+ console.log('');
299
+ console.log(chalk.bold.green('✓ Skills directories initialized!'));
300
+ console.log('');
301
+ console.log(chalk.white('Next steps:'));
302
+ if (includeBuilder) {
303
+ console.log(chalk.gray(' 1. List skills: ') + chalk.cyan('npx agentic-flow skills list'));
304
+ console.log(chalk.gray(' 2. Create a skill: ') + chalk.cyan('Use Claude Code with "skill-builder" skill'));
305
+ console.log(chalk.gray(' 3. Create example: ') + chalk.cyan('npx agentic-flow skills create'));
306
+ }
307
+ else {
308
+ console.log(chalk.gray(' 1. Install builder:') + chalk.cyan('npx agentic-flow skills init-builder'));
309
+ console.log(chalk.gray(' 2. Create a skill: ') + chalk.cyan('npx agentic-flow skills create'));
310
+ console.log(chalk.gray(' 3. List skills: ') + chalk.cyan('npx agentic-flow skills list'));
311
+ }
312
+ console.log(chalk.gray(' 4. Learn more: ') + chalk.cyan('docs/plans/skills/SKILLS_PLAN.md'));
313
+ console.log('');
314
+ }
315
+ /**
316
+ * Handle skill-builder init command
317
+ */
318
+ async function handleSkillBuilderInit(args) {
319
+ const location = args[0] || 'project';
320
+ console.log('');
321
+ console.log(chalk.bold.cyan('🎨 Installing Skill Builder Framework'));
322
+ console.log(chalk.gray('═══════════════════════════════════════════════════════════════'));
323
+ console.log('');
324
+ await installSkillBuilder(location);
325
+ console.log('');
326
+ console.log(chalk.bold.green('✓ Skill Builder installed successfully!'));
327
+ console.log('');
328
+ console.log(chalk.white('Usage:'));
329
+ console.log(chalk.gray(' • Ask Claude: ') + chalk.cyan('"I want to create a new skill for [task]"'));
330
+ console.log(chalk.gray(' • Use script: ') + chalk.cyan('.claude/skills/skill-builder/scripts/generate-skill.sh'));
331
+ console.log(chalk.gray(' • Validate: ') + chalk.cyan('.claude/skills/skill-builder/scripts/validate-skill.sh <path>'));
332
+ console.log('');
333
+ console.log(chalk.white('Documentation:'));
334
+ console.log(chalk.gray(' • README: ') + chalk.cyan('.claude/skills/skill-builder/README.md'));
335
+ console.log(chalk.gray(' • Spec: ') + chalk.cyan('.claude/skills/skill-builder/docs/SPECIFICATION.md'));
336
+ console.log('');
337
+ }
338
+ /**
339
+ * Install skill-builder framework
340
+ */
341
+ async function installSkillBuilder(location) {
342
+ const paths = getSkillsPaths();
343
+ const locations = location === 'both' ? ['personal', 'project'] : [location];
344
+ for (const loc of locations) {
345
+ const baseDir = loc === 'personal' ? paths.personal : paths.project;
346
+ // Claude Code requires skills at top level, NOT in namespaces
347
+ const builderDir = join(baseDir, 'skill-builder');
348
+ // Create directory structure
349
+ mkdirSync(join(builderDir, 'scripts'), { recursive: true });
350
+ mkdirSync(join(builderDir, 'resources', 'templates'), { recursive: true });
351
+ mkdirSync(join(builderDir, 'resources', 'schemas'), { recursive: true });
352
+ mkdirSync(join(builderDir, 'docs'), { recursive: true });
353
+ // Try multiple source locations
354
+ const possibleSources = [
355
+ join(process.cwd(), '.claude', 'skills', 'skill-builder'), // Project root
356
+ join(__dirname, '..', '..', '.claude', 'skills', 'skill-builder'), // Package dist
357
+ join(__dirname, '..', '..', '..', '.claude', 'skills', 'skill-builder'), // Monorepo root
358
+ ];
359
+ let sourceDir = null;
360
+ for (const src of possibleSources) {
361
+ if (existsSync(src) && existsSync(join(src, 'SKILL.md'))) {
362
+ sourceDir = src;
363
+ break;
364
+ }
365
+ }
366
+ if (sourceDir) {
367
+ // Copy all files recursively
368
+ copyRecursive(sourceDir, builderDir);
369
+ console.log(chalk.green('✓') + ` Installed skill-builder to ${chalk.cyan(loc)} location`);
370
+ }
371
+ else {
372
+ // Create from templates if source doesn't exist
373
+ createSkillBuilderFromTemplate(builderDir);
374
+ console.log(chalk.green('✓') + ` Created skill-builder in ${chalk.cyan(loc)} location`);
375
+ }
376
+ }
377
+ }
378
+ /**
379
+ * Copy directory recursively
380
+ */
381
+ function copyRecursive(src, dest) {
382
+ const entries = readdirSync(src, { withFileTypes: true });
383
+ for (const entry of entries) {
384
+ const srcPath = join(src, entry.name);
385
+ const destPath = join(dest, entry.name);
386
+ if (entry.isDirectory()) {
387
+ mkdirSync(destPath, { recursive: true });
388
+ copyRecursive(srcPath, destPath);
389
+ }
390
+ else {
391
+ const content = readFileSync(srcPath, 'utf-8');
392
+ writeFileSync(destPath, content, 'utf-8');
393
+ }
394
+ }
395
+ }
396
+ /**
397
+ * Create skill-builder from template (fallback)
398
+ */
399
+ function createSkillBuilderFromTemplate(builderDir) {
400
+ // Create minimal SKILL.md
401
+ const skillMd = `---
402
+ name: "Skill Builder"
403
+ description: "Create new Claude Code Skills with proper YAML frontmatter, progressive disclosure structure, and complete directory organization. Use when you need to build custom skills for specific workflows, generate skill templates, or understand the Claude Skills specification."
404
+ ---
405
+
406
+ # Skill Builder
407
+
408
+ ## What This Skill Does
409
+
410
+ Creates production-ready Claude Code Skills with proper YAML frontmatter, progressive disclosure architecture, and complete file/folder structure.
411
+
412
+ ## Prerequisites
413
+
414
+ - Claude Code 2.0+ or Claude.ai with Skills support
415
+ - Basic understanding of Markdown and YAML
416
+ - Text editor or IDE
417
+
418
+ ## Quick Start
419
+
420
+ ### Creating Your First Skill
421
+
422
+ \`\`\`bash
423
+ # 1. Create skill directory (MUST be at top level!)
424
+ mkdir -p ~/.claude/skills/my-first-skill
425
+
426
+ # 2. Create SKILL.md with proper format
427
+ cat > ~/.claude/skills/my-first-skill/SKILL.md << 'EOF'
428
+ ---
429
+ name: "My First Skill"
430
+ description: "Brief description of what this skill does and when Claude should use it."
431
+ ---
432
+
433
+ # My First Skill
434
+
435
+ ## What This Skill Does
436
+ [Your instructions here]
437
+
438
+ ## Quick Start
439
+ [Basic usage]
440
+ EOF
441
+ \`\`\`
442
+
443
+ ## Complete Specification
444
+
445
+ ### YAML Frontmatter (REQUIRED)
446
+
447
+ Every SKILL.md must start with YAML frontmatter:
448
+
449
+ \`\`\`yaml
450
+ ---
451
+ name: "Skill Name" # REQUIRED: Max 64 chars
452
+ description: "What this skill does # REQUIRED: Max 1024 chars
453
+ and when Claude should use it." # Include BOTH what & when
454
+ ---
455
+ \`\`\`
456
+
457
+ For complete documentation, see: .claude/skills/skill-builder/docs/SPECIFICATION.md
458
+ `;
459
+ writeFileSync(join(builderDir, 'SKILL.md'), skillMd, 'utf-8');
460
+ // Create minimal README
461
+ const readme = `# Skill Builder
462
+
463
+ Meta-skill for creating Claude Code Skills with proper formatting and structure.
464
+
465
+ ## Usage
466
+
467
+ Ask Claude Code: "I want to create a new skill for [task]"
468
+
469
+ ## Documentation
470
+
471
+ - Full specification: docs/SPECIFICATION.md
472
+ - Templates: resources/templates/
473
+ - Scripts: scripts/
474
+
475
+ ## Quick Reference
476
+
477
+ - Max name length: 64 characters
478
+ - Max description: 1024 characters
479
+ - Description must include "what" and "when"
480
+ - Only name and description are required in YAML
481
+ `;
482
+ writeFileSync(join(builderDir, 'README.md'), readme, 'utf-8');
483
+ }
484
+ /**
485
+ * Handle skills create command
486
+ */
487
+ async function handleSkillsCreate(args) {
488
+ console.log('');
489
+ console.log(chalk.bold.cyan('🎨 Creating agentic-flow Skills'));
490
+ console.log(chalk.gray('═══════════════════════════════════════════════════════════════'));
491
+ console.log('');
492
+ // Ensure directories exist
493
+ initSkillsDirectories('project');
494
+ const paths = getSkillsPaths();
495
+ const projectSkillsDir = paths.project;
496
+ // Create 4 agentic-flow specific skills
497
+ const skills = [
498
+ createAgentDBVectorSearchSkill(),
499
+ createAgentDBMemoryPatternsSkill(),
500
+ createSwarmOrchestrationSkill(),
501
+ createReasoningBankSkill()
502
+ ];
503
+ let count = 0;
504
+ for (const skillContent of skills) {
505
+ const skillName = extractSkillName(skillContent);
506
+ const skillDir = join(projectSkillsDir, 'agentic-flow', skillName);
507
+ mkdirSync(skillDir, { recursive: true });
508
+ writeFileSync(join(skillDir, 'SKILL.md'), skillContent, 'utf-8');
509
+ count++;
510
+ console.log(chalk.green(` ${count}. ✓`) + ` Created ${chalk.cyan(skillName)} skill`);
511
+ }
512
+ console.log('');
513
+ console.log(chalk.gray('═══════════════════════════════════════════════════════════════'));
514
+ console.log('');
515
+ console.log(chalk.bold.green(`✓ Created ${count} agentic-flow skills!`));
516
+ console.log('');
517
+ console.log(chalk.white('Skills installed:'));
518
+ console.log(chalk.gray(' • AgentDB Vector Search ') + chalk.dim('- Semantic search with vector embeddings'));
519
+ console.log(chalk.gray(' • AgentDB Memory Patterns ') + chalk.dim('- Memory management & persistence'));
520
+ console.log(chalk.gray(' • Swarm Orchestration ') + chalk.dim('- Multi-agent coordination'));
521
+ console.log(chalk.gray(' • ReasoningBank Intelligence') + chalk.dim('- Pattern learning & adaptation'));
522
+ console.log('');
523
+ console.log(chalk.white('Next: ') + chalk.cyan('npx agentic-flow skills list') + chalk.gray(' to see all skills'));
524
+ console.log('');
525
+ }
526
+ /**
527
+ * Extract skill name from YAML frontmatter
528
+ */
529
+ function extractSkillName(content) {
530
+ const match = content.match(/name:\s*["']([^"']+)["']/);
531
+ if (match) {
532
+ return match[1].toLowerCase().replace(/\s+/g, '-');
533
+ }
534
+ return 'unknown-skill';
535
+ }
536
+ /**
537
+ * Create AgentDB Vector Search skill
538
+ */
539
+ function createAgentDBVectorSearchSkill() {
540
+ return `---
541
+ name: "AgentDB Vector Search"
542
+ description: "Implement semantic vector search with AgentDB for intelligent document retrieval, similarity matching, and context-aware querying. Use when building RAG systems, semantic search engines, or intelligent knowledge bases."
543
+ ---
544
+
545
+ # AgentDB Vector Search
546
+
547
+ ## What This Skill Does
548
+
549
+ Implements vector-based semantic search using AgentDB's high-performance vector database with 150x-12,500x faster operations than traditional solutions. Enables similarity search, hybrid search (vector + metadata), and real-time embedding generation.
550
+
551
+ ## Prerequisites
552
+
553
+ - agentic-flow v1.5.11+ or agentdb v1.0.4+
554
+ - Node.js 18+
555
+ - OpenAI API key (for embeddings) or custom embedding model
556
+
557
+ ## Quick Start
558
+
559
+ \`\`\`typescript
560
+ import { AgentDB } from 'agentdb';
561
+
562
+ // Initialize AgentDB with vector support
563
+ const db = new AgentDB({
564
+ persist: true,
565
+ vectorDimensions: 1536, // OpenAI ada-002 dimensions
566
+ enableVectorIndex: true
567
+ });
568
+
569
+ // Store documents with vectors
570
+ await db.storeMemory({
571
+ text: "The quantum computer achieved 100 qubits",
572
+ metadata: { category: "technology", date: "2025-01-15" },
573
+ embedding: await generateEmbedding(text) // Your embedding function
574
+ });
575
+
576
+ // Semantic search
577
+ const results = await db.searchSimilar(
578
+ queryEmbedding,
579
+ { limit: 10, threshold: 0.7 }
580
+ );
581
+ \`\`\`
582
+
583
+ ## Core Features
584
+
585
+ ### 1. Vector Storage
586
+ \`\`\`typescript
587
+ // Store with automatic embedding
588
+ await db.storeWithEmbedding({
589
+ content: "Your document text",
590
+ metadata: { source: "docs", page: 42 }
591
+ });
592
+ \`\`\`
593
+
594
+ ### 2. Similarity Search
595
+ \`\`\`typescript
596
+ // Find similar documents
597
+ const similar = await db.findSimilar("quantum computing", {
598
+ limit: 5,
599
+ minScore: 0.75
600
+ });
601
+ \`\`\`
602
+
603
+ ### 3. Hybrid Search (Vector + Metadata)
604
+ \`\`\`typescript
605
+ // Combine vector similarity with metadata filtering
606
+ const results = await db.hybridSearch({
607
+ query: "machine learning models",
608
+ filters: {
609
+ category: "research",
610
+ date: { $gte: "2024-01-01" }
611
+ },
612
+ limit: 20
613
+ });
614
+ \`\`\`
615
+
616
+ ## Advanced Usage
617
+
618
+ ### RAG (Retrieval Augmented Generation)
619
+ \`\`\`typescript
620
+ // Build RAG pipeline
621
+ async function ragQuery(question: string) {
622
+ // 1. Get relevant context
623
+ const context = await db.searchSimilar(
624
+ await embed(question),
625
+ { limit: 5, threshold: 0.7 }
626
+ );
627
+
628
+ // 2. Generate answer with context
629
+ const prompt = \`Context: \${context.map(c => c.text).join('\\n')}
630
+ Question: \${question}\`;
631
+
632
+ return await llm.generate(prompt);
633
+ }
634
+ \`\`\`
635
+
636
+ ### Batch Operations
637
+ \`\`\`typescript
638
+ // Efficient batch storage
639
+ await db.batchStore(documents.map(doc => ({
640
+ text: doc.content,
641
+ embedding: doc.vector,
642
+ metadata: doc.meta
643
+ })));
644
+ \`\`\`
645
+
646
+ ## Performance Tips
647
+
648
+ - **Indexing**: Enable vector index for 10-100x faster searches
649
+ - **Batch Size**: Use batch operations for 1000+ documents
650
+ - **Dimensions**: Match embedding model (1536 for OpenAI ada-002)
651
+ - **Threshold**: Start at 0.7 for quality results
652
+
653
+ ## Troubleshooting
654
+
655
+ ### Issue: Slow search performance
656
+ **Solution**: Enable vector index: \`enableVectorIndex: true\`
657
+
658
+ ### Issue: Poor relevance
659
+ **Solution**: Adjust similarity threshold or use hybrid search
660
+
661
+ ## Learn More
662
+
663
+ - AgentDB Docs: packages/agentdb/README.md
664
+ - Vector DB API: packages/agentdb/docs/vector-api.md
665
+ - Performance Guide: docs/agentdb/performance.md
666
+ `;
667
+ }
668
+ /**
669
+ * Create AgentDB Memory Patterns skill
670
+ */
671
+ function createAgentDBMemoryPatternsSkill() {
672
+ return `---
673
+ name: "AgentDB Memory Patterns"
674
+ description: "Implement persistent memory patterns for AI agents using AgentDB. Includes session memory, long-term storage, pattern learning, and context management. Use when building stateful agents, chat systems, or intelligent assistants."
675
+ ---
676
+
677
+ # AgentDB Memory Patterns
678
+
679
+ ## What This Skill Does
680
+
681
+ Provides memory management patterns for AI agents using AgentDB's persistent storage and ReasoningBank integration. Enables agents to remember conversations, learn from interactions, and maintain context across sessions.
682
+
683
+ ## Prerequisites
684
+
685
+ - agentic-flow v1.5.11+ or agentdb v1.0.4+
686
+ - Node.js 18+
687
+ - Understanding of agent architectures
688
+
689
+ ## Quick Start
690
+
691
+ \`\`\`typescript
692
+ import { AgentDB, MemoryManager } from 'agentdb';
693
+
694
+ // Initialize memory system
695
+ const memory = new MemoryManager({
696
+ agentId: 'assistant-001',
697
+ persist: true,
698
+ ttl: 3600 * 24 * 30 // 30 days
699
+ });
700
+
701
+ // Store interaction
702
+ await memory.store({
703
+ role: 'user',
704
+ content: 'What is the capital of France?',
705
+ timestamp: Date.now()
706
+ });
707
+
708
+ await memory.store({
709
+ role: 'assistant',
710
+ content: 'The capital of France is Paris.',
711
+ timestamp: Date.now()
712
+ });
713
+
714
+ // Retrieve context
715
+ const context = await memory.getRecentContext({ limit: 10 });
716
+ \`\`\`
717
+
718
+ ## Memory Patterns
719
+
720
+ ### 1. Session Memory
721
+ \`\`\`typescript
722
+ class SessionMemory {
723
+ async storeMessage(role: string, content: string) {
724
+ return await db.storeMemory({
725
+ sessionId: this.sessionId,
726
+ role,
727
+ content,
728
+ timestamp: Date.now()
729
+ });
730
+ }
731
+
732
+ async getSessionHistory(limit = 20) {
733
+ return await db.query({
734
+ filters: { sessionId: this.sessionId },
735
+ orderBy: 'timestamp',
736
+ limit
737
+ });
738
+ }
739
+ }
740
+ \`\`\`
741
+
742
+ ### 2. Long-Term Memory
743
+ \`\`\`typescript
744
+ // Store important facts
745
+ await db.storeFact({
746
+ category: 'user_preference',
747
+ key: 'language',
748
+ value: 'English',
749
+ confidence: 1.0,
750
+ source: 'explicit'
751
+ });
752
+
753
+ // Retrieve facts
754
+ const prefs = await db.getFacts({
755
+ category: 'user_preference'
756
+ });
757
+ \`\`\`
758
+
759
+ ### 3. Pattern Learning
760
+ \`\`\`typescript
761
+ // Learn from successful interactions
762
+ await db.storePattern({
763
+ trigger: 'user_asks_time',
764
+ response: 'provide_formatted_time',
765
+ success: true,
766
+ context: { timezone: 'UTC' }
767
+ });
768
+
769
+ // Apply learned patterns
770
+ const pattern = await db.matchPattern(currentContext);
771
+ \`\`\`
772
+
773
+ ## Advanced Patterns
774
+
775
+ ### Hierarchical Memory
776
+ \`\`\`typescript
777
+ // Organize memory in hierarchy
778
+ await memory.organize({
779
+ immediate: recentMessages, // Last 10 messages
780
+ shortTerm: sessionContext, // Current session
781
+ longTerm: importantFacts, // Persistent facts
782
+ semantic: embeddedKnowledge // Vector search
783
+ });
784
+ \`\`\`
785
+
786
+ ### Memory Consolidation
787
+ \`\`\`typescript
788
+ // Periodically consolidate memories
789
+ await memory.consolidate({
790
+ strategy: 'importance', // Keep important memories
791
+ maxSize: 10000, // Size limit
792
+ minScore: 0.5 // Relevance threshold
793
+ });
794
+ \`\`\`
795
+
796
+ ## Integration with ReasoningBank
797
+
798
+ \`\`\`typescript
799
+ import { ReasoningBank } from 'agentic-flow/reasoningbank';
800
+
801
+ // Connect memory to reasoning
802
+ const rb = new ReasoningBank({
803
+ memory: memory,
804
+ learningRate: 0.1
805
+ });
806
+
807
+ // Learn from outcomes
808
+ await rb.recordOutcome({
809
+ task: 'summarize_document',
810
+ approach: 'extractive',
811
+ success: true,
812
+ metrics: { accuracy: 0.95 }
813
+ });
814
+
815
+ // Get optimal strategy
816
+ const strategy = await rb.getOptimalStrategy('summarize_document');
817
+ \`\`\`
818
+
819
+ ## Best Practices
820
+
821
+ 1. **Prune regularly**: Remove outdated or low-value memories
822
+ 2. **Use TTL**: Set time-to-live for ephemeral data
823
+ 3. **Index metadata**: Enable fast filtering by sessionId, userId
824
+ 4. **Compress old data**: Archive infrequently accessed memories
825
+
826
+ ## Troubleshooting
827
+
828
+ ### Issue: Memory growing too large
829
+ **Solution**: Enable auto-pruning or set TTL values
830
+
831
+ ### Issue: Context not relevant
832
+ **Solution**: Use vector search for semantic memory retrieval
833
+
834
+ ## Learn More
835
+
836
+ - Memory API: packages/agentdb/docs/memory-api.md
837
+ - ReasoningBank: agentic-flow/src/reasoningbank/README.md
838
+ `;
839
+ }
840
+ /**
841
+ * Create Swarm Orchestration skill
842
+ */
843
+ function createSwarmOrchestrationSkill() {
844
+ return `---
845
+ name: "Swarm Orchestration"
846
+ description: "Orchestrate multi-agent swarms with agentic-flow for parallel task execution, dynamic topology, and intelligent coordination. Use when scaling beyond single agents, implementing complex workflows, or building distributed AI systems."
847
+ ---
848
+
849
+ # Swarm Orchestration
850
+
851
+ ## What This Skill Does
852
+
853
+ Orchestrates multi-agent swarms using agentic-flow's advanced coordination system. Supports mesh, hierarchical, and adaptive topologies with automatic task distribution, load balancing, and fault tolerance.
854
+
855
+ ## Prerequisites
856
+
857
+ - agentic-flow v1.5.11+
858
+ - Node.js 18+
859
+ - Understanding of distributed systems (helpful)
860
+
861
+ ## Quick Start
862
+
863
+ \`\`\`bash
864
+ # Initialize swarm
865
+ npx agentic-flow hooks swarm-init --topology mesh --max-agents 5
866
+
867
+ # Spawn agents
868
+ npx agentic-flow hooks agent-spawn --type coder
869
+ npx agentic-flow hooks agent-spawn --type tester
870
+ npx agentic-flow hooks agent-spawn --type reviewer
871
+
872
+ # Orchestrate task
873
+ npx agentic-flow hooks task-orchestrate \\
874
+ --task "Build REST API with tests" \\
875
+ --mode parallel
876
+ \`\`\`
877
+
878
+ ## Topology Patterns
879
+
880
+ ### 1. Mesh (Peer-to-Peer)
881
+ \`\`\`typescript
882
+ // Equal peers, distributed decision-making
883
+ await swarm.init({
884
+ topology: 'mesh',
885
+ agents: ['coder', 'tester', 'reviewer'],
886
+ communication: 'broadcast'
887
+ });
888
+ \`\`\`
889
+
890
+ ### 2. Hierarchical (Queen-Worker)
891
+ \`\`\`typescript
892
+ // Centralized coordination, specialized workers
893
+ await swarm.init({
894
+ topology: 'hierarchical',
895
+ queen: 'architect',
896
+ workers: ['backend-dev', 'frontend-dev', 'db-designer']
897
+ });
898
+ \`\`\`
899
+
900
+ ### 3. Adaptive (Dynamic)
901
+ \`\`\`typescript
902
+ // Automatically switches topology based on task
903
+ await swarm.init({
904
+ topology: 'adaptive',
905
+ optimization: 'task-complexity'
906
+ });
907
+ \`\`\`
908
+
909
+ ## Task Orchestration
910
+
911
+ ### Parallel Execution
912
+ \`\`\`typescript
913
+ // Execute tasks concurrently
914
+ const results = await swarm.execute({
915
+ tasks: [
916
+ { agent: 'coder', task: 'Implement API endpoints' },
917
+ { agent: 'frontend', task: 'Build UI components' },
918
+ { agent: 'tester', task: 'Write test suite' }
919
+ ],
920
+ mode: 'parallel',
921
+ timeout: 300000 // 5 minutes
922
+ });
923
+ \`\`\`
924
+
925
+ ### Pipeline Execution
926
+ \`\`\`typescript
927
+ // Sequential pipeline with dependencies
928
+ await swarm.pipeline([
929
+ { stage: 'design', agent: 'architect' },
930
+ { stage: 'implement', agent: 'coder', after: 'design' },
931
+ { stage: 'test', agent: 'tester', after: 'implement' },
932
+ { stage: 'review', agent: 'reviewer', after: 'test' }
933
+ ]);
934
+ \`\`\`
935
+
936
+ ### Adaptive Execution
937
+ \`\`\`typescript
938
+ // Let swarm decide execution strategy
939
+ await swarm.autoOrchestrate({
940
+ goal: 'Build production-ready API',
941
+ constraints: {
942
+ maxTime: 3600,
943
+ maxAgents: 8,
944
+ quality: 'high'
945
+ }
946
+ });
947
+ \`\`\`
948
+
949
+ ## Memory Coordination
950
+
951
+ \`\`\`typescript
952
+ // Share state across swarm
953
+ await swarm.memory.store('api-schema', {
954
+ endpoints: [...],
955
+ models: [...]
956
+ });
957
+
958
+ // Agents read shared memory
959
+ const schema = await swarm.memory.retrieve('api-schema');
960
+ \`\`\`
961
+
962
+ ## Advanced Features
963
+
964
+ ### Load Balancing
965
+ \`\`\`typescript
966
+ // Automatic work distribution
967
+ await swarm.enableLoadBalancing({
968
+ strategy: 'dynamic',
969
+ metrics: ['cpu', 'memory', 'task-queue']
970
+ });
971
+ \`\`\`
972
+
973
+ ### Fault Tolerance
974
+ \`\`\`typescript
975
+ // Handle agent failures
976
+ await swarm.setResiliency({
977
+ retry: { maxAttempts: 3, backoff: 'exponential' },
978
+ fallback: 'reassign-task'
979
+ });
980
+ \`\`\`
981
+
982
+ ### Performance Monitoring
983
+ \`\`\`typescript
984
+ // Track swarm metrics
985
+ const metrics = await swarm.getMetrics();
986
+ // { throughput, latency, success_rate, agent_utilization }
987
+ \`\`\`
988
+
989
+ ## Integration with Hooks
990
+
991
+ \`\`\`bash
992
+ # Pre-task coordination
993
+ npx agentic-flow hooks pre-task --description "Build API"
994
+
995
+ # Post-task synchronization
996
+ npx agentic-flow hooks post-task --task-id "task-123"
997
+
998
+ # Session restore
999
+ npx agentic-flow hooks session-restore --session-id "swarm-001"
1000
+ \`\`\`
1001
+
1002
+ ## Best Practices
1003
+
1004
+ 1. **Start small**: Begin with 2-3 agents, scale up
1005
+ 2. **Use memory**: Share context through swarm memory
1006
+ 3. **Monitor metrics**: Track performance and bottlenecks
1007
+ 4. **Enable hooks**: Automatic coordination and sync
1008
+ 5. **Set timeouts**: Prevent hung tasks
1009
+
1010
+ ## Troubleshooting
1011
+
1012
+ ### Issue: Agents not coordinating
1013
+ **Solution**: Verify memory access and enable hooks
1014
+
1015
+ ### Issue: Poor performance
1016
+ **Solution**: Check topology (use adaptive) and enable load balancing
1017
+
1018
+ ## Learn More
1019
+
1020
+ - Swarm Guide: docs/swarm/orchestration.md
1021
+ - Topology Patterns: docs/swarm/topologies.md
1022
+ - Hooks Integration: docs/hooks/coordination.md
1023
+ `;
1024
+ }
1025
+ /**
1026
+ * Create ReasoningBank skill
1027
+ */
1028
+ function createReasoningBankSkill() {
1029
+ return `---
1030
+ name: "ReasoningBank Intelligence"
1031
+ description: "Implement adaptive learning with ReasoningBank for pattern recognition, strategy optimization, and continuous improvement. Use when building self-learning agents, optimizing workflows, or implementing meta-cognitive systems."
1032
+ ---
1033
+
1034
+ # ReasoningBank Intelligence
1035
+
1036
+ ## What This Skill Does
1037
+
1038
+ Implements ReasoningBank's adaptive learning system for AI agents to learn from experience, recognize patterns, and optimize strategies over time. Enables meta-cognitive capabilities and continuous improvement.
1039
+
1040
+ ## Prerequisites
1041
+
1042
+ - agentic-flow v1.5.11+
1043
+ - AgentDB v1.0.4+ (for persistence)
1044
+ - Node.js 18+
1045
+
1046
+ ## Quick Start
1047
+
1048
+ \`\`\`typescript
1049
+ import { ReasoningBank } from 'agentic-flow/reasoningbank';
1050
+
1051
+ // Initialize ReasoningBank
1052
+ const rb = new ReasoningBank({
1053
+ persist: true,
1054
+ learningRate: 0.1,
1055
+ adapter: 'agentdb' // Use AgentDB for storage
1056
+ });
1057
+
1058
+ // Record task outcome
1059
+ await rb.recordExperience({
1060
+ task: 'code_review',
1061
+ approach: 'static_analysis_first',
1062
+ outcome: {
1063
+ success: true,
1064
+ metrics: {
1065
+ bugs_found: 5,
1066
+ time_taken: 120,
1067
+ false_positives: 1
1068
+ }
1069
+ },
1070
+ context: {
1071
+ language: 'typescript',
1072
+ complexity: 'medium'
1073
+ }
1074
+ });
1075
+
1076
+ // Get optimal strategy
1077
+ const strategy = await rb.recommendStrategy('code_review', {
1078
+ language: 'typescript',
1079
+ complexity: 'high'
1080
+ });
1081
+ \`\`\`
1082
+
1083
+ ## Core Features
1084
+
1085
+ ### 1. Pattern Recognition
1086
+ \`\`\`typescript
1087
+ // Learn patterns from data
1088
+ await rb.learnPattern({
1089
+ pattern: 'api_errors_increase_after_deploy',
1090
+ triggers: ['deployment', 'traffic_spike'],
1091
+ actions: ['rollback', 'scale_up'],
1092
+ confidence: 0.85
1093
+ });
1094
+
1095
+ // Match patterns
1096
+ const matches = await rb.matchPatterns(currentSituation);
1097
+ \`\`\`
1098
+
1099
+ ### 2. Strategy Optimization
1100
+ \`\`\`typescript
1101
+ // Compare strategies
1102
+ const comparison = await rb.compareStrategies('bug_fixing', [
1103
+ 'tdd_approach',
1104
+ 'debug_first',
1105
+ 'reproduce_then_fix'
1106
+ ]);
1107
+
1108
+ // Get best strategy
1109
+ const best = comparison.strategies[0];
1110
+ console.log(\`Best: \${best.name} (score: \${best.score})\`);
1111
+ \`\`\`
1112
+
1113
+ ### 3. Continuous Learning
1114
+ \`\`\`typescript
1115
+ // Enable auto-learning from all tasks
1116
+ await rb.enableAutoLearning({
1117
+ threshold: 0.7, // Only learn from high-confidence outcomes
1118
+ updateFrequency: 100 // Update models every 100 experiences
1119
+ });
1120
+ \`\`\`
1121
+
1122
+ ## Advanced Usage
1123
+
1124
+ ### Meta-Learning
1125
+ \`\`\`typescript
1126
+ // Learn about learning
1127
+ await rb.metaLearn({
1128
+ observation: 'parallel_execution_faster_for_independent_tasks',
1129
+ confidence: 0.95,
1130
+ applicability: {
1131
+ task_types: ['batch_processing', 'data_transformation'],
1132
+ conditions: ['tasks_independent', 'io_bound']
1133
+ }
1134
+ });
1135
+ \`\`\`
1136
+
1137
+ ### Transfer Learning
1138
+ \`\`\`typescript
1139
+ // Apply knowledge from one domain to another
1140
+ await rb.transferKnowledge({
1141
+ from: 'code_review_javascript',
1142
+ to: 'code_review_typescript',
1143
+ similarity: 0.8
1144
+ });
1145
+ \`\`\`
1146
+
1147
+ ### Adaptive Agents
1148
+ \`\`\`typescript
1149
+ // Create self-improving agent
1150
+ class AdaptiveAgent {
1151
+ async execute(task: Task) {
1152
+ // Get optimal strategy
1153
+ const strategy = await rb.recommendStrategy(task.type, task.context);
1154
+
1155
+ // Execute with strategy
1156
+ const result = await this.executeWithStrategy(task, strategy);
1157
+
1158
+ // Learn from outcome
1159
+ await rb.recordExperience({
1160
+ task: task.type,
1161
+ approach: strategy.name,
1162
+ outcome: result,
1163
+ context: task.context
1164
+ });
1165
+
1166
+ return result;
1167
+ }
1168
+ }
1169
+ \`\`\`
1170
+
1171
+ ## Integration with AgentDB
1172
+
1173
+ \`\`\`typescript
1174
+ // Persist ReasoningBank data
1175
+ await rb.configure({
1176
+ storage: {
1177
+ type: 'agentdb',
1178
+ options: {
1179
+ database: './reasoning-bank.db',
1180
+ enableVectorSearch: true
1181
+ }
1182
+ }
1183
+ });
1184
+
1185
+ // Query learned patterns
1186
+ const patterns = await rb.query({
1187
+ category: 'optimization',
1188
+ minConfidence: 0.8,
1189
+ timeRange: { last: '30d' }
1190
+ });
1191
+ \`\`\`
1192
+
1193
+ ## Performance Metrics
1194
+
1195
+ \`\`\`typescript
1196
+ // Track learning effectiveness
1197
+ const metrics = await rb.getMetrics();
1198
+ console.log(\`
1199
+ Total Experiences: \${metrics.totalExperiences}
1200
+ Patterns Learned: \${metrics.patternsLearned}
1201
+ Strategy Success Rate: \${metrics.strategySuccessRate}
1202
+ Improvement Over Time: \${metrics.improvement}
1203
+ \`);
1204
+ \`\`\`
1205
+
1206
+ ## Best Practices
1207
+
1208
+ 1. **Record consistently**: Log all task outcomes, not just successes
1209
+ 2. **Provide context**: Rich context improves pattern matching
1210
+ 3. **Set thresholds**: Filter low-confidence learnings
1211
+ 4. **Review periodically**: Audit learned patterns for quality
1212
+ 5. **Use vector search**: Enable semantic pattern matching
1213
+
1214
+ ## Troubleshooting
1215
+
1216
+ ### Issue: Poor recommendations
1217
+ **Solution**: Ensure sufficient training data (100+ experiences per task type)
1218
+
1219
+ ### Issue: Slow pattern matching
1220
+ **Solution**: Enable vector indexing in AgentDB
1221
+
1222
+ ### Issue: Memory growing large
1223
+ **Solution**: Set TTL for old experiences or enable pruning
1224
+
1225
+ ## Learn More
1226
+
1227
+ - ReasoningBank Guide: agentic-flow/src/reasoningbank/README.md
1228
+ - AgentDB Integration: packages/agentdb/docs/reasoningbank.md
1229
+ - Pattern Learning: docs/reasoning/patterns.md
1230
+ `;
1231
+ }
1232
+ /**
1233
+ * Print skills help
1234
+ */
1235
+ function printSkillsHelp() {
1236
+ console.log(`
1237
+ ${chalk.bold.cyan('🎨 agentic-flow Skills Manager')}
1238
+
1239
+ ${chalk.white('USAGE:')}
1240
+ npx agentic-flow skills <command> [options]
1241
+
1242
+ ${chalk.white('COMMANDS:')}
1243
+ ${chalk.cyan('init')} [location] [--with-builder]
1244
+ Initialize skills directories
1245
+ location: personal | project | both (default: both)
1246
+ --with-builder: Also install skill-builder framework
1247
+
1248
+ ${chalk.cyan('init-builder')} [location]
1249
+ Install skill-builder framework only
1250
+ location: personal | project | both (default: project)
1251
+
1252
+ ${chalk.cyan('list')} List all installed skills
1253
+
1254
+ ${chalk.cyan('create')} Create example agentic-flow skills
1255
+ (AgentDB, swarm orchestration, reasoning bank)
1256
+
1257
+ ${chalk.cyan('help')} Show this help message
1258
+
1259
+ ${chalk.white('SKILLS LOCATIONS:')}
1260
+ ${chalk.gray('Personal:')} ~/.claude/skills/ (Available across all projects)
1261
+ ${chalk.gray('Project:')} <project>/.claude/skills/ (Team-shared, version controlled)
1262
+
1263
+ ${chalk.white('EXAMPLES:')}
1264
+ # Initialize with skill-builder
1265
+ npx agentic-flow skills init --with-builder
1266
+
1267
+ # Install skill-builder only
1268
+ npx agentic-flow skills init-builder
1269
+
1270
+ # Create agentic-flow specific skills
1271
+ npx agentic-flow skills create
1272
+
1273
+ # List all installed skills
1274
+ npx agentic-flow skills list
1275
+
1276
+ ${chalk.white('SKILL-BUILDER FEATURES:')}
1277
+ • Complete Claude Code Skills specification
1278
+ • Interactive skill generator script
1279
+ • 10-step validation script
1280
+ • Templates (minimal + full-featured)
1281
+ • JSON schema for validation
1282
+ • Official Anthropic docs included
1283
+
1284
+ ${chalk.white('DOCUMENTATION:')}
1285
+ Plan: docs/plans/skills/SKILLS_PLAN.md
1286
+ Roadmap: docs/plans/skills/IMPLEMENTATION_ROADMAP.md
1287
+ Builder: .claude/skills/skill-builder/README.md
1288
+
1289
+ ${chalk.white('HOW IT WORKS:')}
1290
+ 1. Skills are auto-detected by Claude Code on startup
1291
+ 2. Claude loads name + description into system prompt
1292
+ 3. When triggered, Claude reads SKILL.md from filesystem
1293
+ 4. Only active skill enters context (zero penalty for 100+ skills)
1294
+ `);
1295
+ }