@skillkit/cli 1.3.1 → 1.5.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 CHANGED
@@ -1,39 +1,192 @@
1
1
  # @skillkit/cli
2
2
 
3
- CLI commands for SkillKit - install, manage, and sync skills across AI agents.
3
+ [![npm version](https://img.shields.io/npm/v/@skillkit/cli.svg)](https://www.npmjs.com/package/@skillkit/cli)
4
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
5
+
6
+ **Command-line interface for SkillKit** - install, manage, translate, and sync skills across 17 AI coding agents.
4
7
 
5
8
  ## Installation
6
9
 
7
10
  ```bash
8
- npm install @skillkit/cli
11
+ npm install -g @skillkit/cli
12
+ # or
13
+ npm install -g skillkit # includes CLI
14
+ ```
15
+
16
+ ## Quick Start
17
+
18
+ ```bash
19
+ # Get skill recommendations for your project
20
+ skillkit recommend
21
+
22
+ # Install skills from GitHub
23
+ skillkit install anthropics/skills
24
+
25
+ # Translate skills between agents
26
+ skillkit translate my-skill --to cursor
27
+
28
+ # Launch interactive TUI
29
+ skillkit ui
30
+ ```
31
+
32
+ ## All Commands
33
+
34
+ ### Skill Management
35
+
36
+ ```bash
37
+ skillkit install <source> # Install from GitHub/GitLab/Bitbucket/local
38
+ skillkit remove <skills> # Remove installed skills
39
+ skillkit update [skills] # Update skills from source
40
+ skillkit list # List installed skills
41
+ skillkit enable <skills> # Enable specific skills
42
+ skillkit disable <skills> # Disable specific skills
43
+ skillkit sync # Sync to agent config
44
+ skillkit read <skills> # Read skill content
45
+ ```
46
+
47
+ ### Discovery & Recommendations
48
+
49
+ ```bash
50
+ skillkit recommend # Project-based recommendations
51
+ skillkit recommend --search "auth" # Task-based search
52
+ skillkit recommend --category security # Filter by category
53
+ skillkit recommend --min-score 80 # Quality threshold
54
+
55
+ skillkit marketplace # Browse skills
56
+ skillkit marketplace search "react" # Search marketplace
57
+ skillkit marketplace --tags typescript # Filter by tags
58
+ skillkit marketplace refresh # Refresh index
59
+ ```
60
+
61
+ ### Translation
62
+
63
+ ```bash
64
+ skillkit translate <skill> --to <agent> # Translate single skill
65
+ skillkit translate --all --to cursor # Translate all skills
66
+ skillkit translate skill --dry-run # Preview without writing
67
+ ```
68
+
69
+ ### Context Management
70
+
71
+ ```bash
72
+ skillkit context init # Analyze project, create context
73
+ skillkit context show # Display current context
74
+ skillkit context sync --all # Sync to all detected agents
75
+ skillkit context export # Export context file
9
76
  ```
10
77
 
11
- ## Commands
78
+ ### Session Memory
12
79
 
13
80
  ```bash
14
- skillkit init # Initialize skillkit in project
15
- skillkit install <skill> # Install a skill
16
- skillkit remove <skill> # Remove a skill
17
- skillkit list # List installed skills
18
- skillkit update # Update installed skills
19
- skillkit sync # Sync skills across agents
20
- skillkit translate # Translate skills between formats
21
- skillkit recommend # Get skill recommendations
22
- skillkit context # Manage project context
23
- skillkit ui # Launch interactive TUI
81
+ skillkit memory status # View memory status
82
+ skillkit memory search "auth" # Search learnings
83
+ skillkit memory list # List all learnings
84
+ skillkit memory compress # Compress observations
85
+ skillkit memory export <id> # Export as skill
86
+ skillkit memory add # Add manual learning
87
+ skillkit memory --global # Use global scope
88
+ ```
89
+
90
+ ### Testing & Workflows
91
+
92
+ ```bash
93
+ skillkit test # Run all skill tests
94
+ skillkit test ./my-skill # Test specific skill
95
+ skillkit test --tags unit # Run tagged tests
96
+
97
+ skillkit workflow list # List workflows
98
+ skillkit workflow run <name> # Execute workflow
99
+ skillkit workflow create # Create new workflow
100
+
101
+ skillkit cicd github-action # Generate GitHub Actions
102
+ skillkit cicd gitlab-ci # Generate GitLab CI
103
+ skillkit cicd pre-commit # Generate pre-commit hook
24
104
  ```
25
105
 
26
- ## Usage
106
+ ### Utilities
107
+
108
+ ```bash
109
+ skillkit init # Initialize in project
110
+ skillkit init --agent cursor # Initialize for specific agent
111
+ skillkit validate ./skill # Validate skill format
112
+ skillkit create my-skill # Create new skill
113
+ ```
114
+
115
+ ## Install Options
116
+
117
+ ```bash
118
+ skillkit install owner/repo # GitHub repository
119
+ skillkit install gitlab:owner/repo # GitLab repository
120
+ skillkit install ./local/path # Local directory
121
+
122
+ # Options
123
+ --list # List available skills without installing
124
+ --skills=pdf,xlsx # Install specific skills
125
+ --all # Install all discovered skills
126
+ --yes # Skip confirmation prompts
127
+ --global # Install globally
128
+ --force # Overwrite existing
129
+ --agent=cursor,windsurf # Install to specific agents
130
+ ```
131
+
132
+ ## Programmatic Usage
27
133
 
28
134
  ```typescript
29
- import { installCommand, listCommand, syncCommand } from '@skillkit/cli';
135
+ import {
136
+ installCommand,
137
+ listCommand,
138
+ syncCommand,
139
+ translateCommand,
140
+ recommendCommand,
141
+ } from '@skillkit/cli';
30
142
 
31
- // Programmatic access to CLI commands
32
- await installCommand('github.com/owner/repo:skill-name');
33
- await listCommand();
143
+ // Install skills programmatically
144
+ await installCommand('anthropics/skills', {
145
+ agent: ['claude-code', 'cursor'],
146
+ yes: true,
147
+ });
148
+
149
+ // List installed skills
150
+ const skills = await listCommand({ json: true });
151
+
152
+ // Sync to agent
34
153
  await syncCommand({ all: true });
154
+
155
+ // Translate skill
156
+ await translateCommand('my-skill', {
157
+ to: 'cursor',
158
+ dryRun: false,
159
+ });
160
+
161
+ // Get recommendations
162
+ const recs = await recommendCommand({
163
+ path: './my-project',
164
+ minScore: 70,
165
+ });
166
+ ```
167
+
168
+ ## CI/CD Usage
169
+
170
+ ```yaml
171
+ # GitHub Actions example
172
+ - name: Setup skills
173
+ run: |
174
+ npx skillkit install owner/skills --skills=lint,test --yes
175
+ npx skillkit sync --yes
35
176
  ```
36
177
 
178
+ ## Supported Agents
179
+
180
+ | Agent | Format |
181
+ |-------|--------|
182
+ | Claude Code | SKILL.md |
183
+ | Cursor | MDC (.mdc) |
184
+ | Codex | SKILL.md |
185
+ | Gemini CLI | SKILL.md |
186
+ | Windsurf | Markdown |
187
+ | GitHub Copilot | Markdown |
188
+ | + 11 more | SKILL.md |
189
+
37
190
  ## Documentation
38
191
 
39
192
  Full documentation: https://github.com/rohitg00/skillkit
package/dist/index.d.ts CHANGED
@@ -205,6 +205,7 @@ declare class RecommendCommand extends Command {
205
205
  verbose: boolean;
206
206
  update: boolean;
207
207
  search: string | undefined;
208
+ task: string | undefined;
208
209
  includeInstalled: boolean;
209
210
  json: boolean;
210
211
  projectPath: string | undefined;
@@ -239,6 +240,323 @@ declare class RecommendCommand extends Command {
239
240
  private updateIndex;
240
241
  }
241
242
 
243
+ /**
244
+ * Status command - show current session state
245
+ */
246
+ declare class StatusCommand extends Command {
247
+ static paths: string[][];
248
+ static usage: clipanion.Usage;
249
+ history: boolean;
250
+ limit: string | undefined;
251
+ json: boolean;
252
+ projectPath: string | undefined;
253
+ execute(): Promise<number>;
254
+ private getStatusIcon;
255
+ private getStatusColor;
256
+ private formatDuration;
257
+ }
258
+
259
+ /**
260
+ * Pause command - pause current skill execution
261
+ */
262
+ declare class PauseCommand extends Command {
263
+ static paths: string[][];
264
+ static usage: clipanion.Usage;
265
+ projectPath: string | undefined;
266
+ execute(): Promise<number>;
267
+ }
268
+
269
+ /**
270
+ * Resume command - resume paused skill execution
271
+ */
272
+ declare class ResumeCommand extends Command {
273
+ static paths: string[][];
274
+ static usage: clipanion.Usage;
275
+ projectPath: string | undefined;
276
+ execute(): Promise<number>;
277
+ }
278
+
279
+ /**
280
+ * Workflow Run command - execute a workflow
281
+ */
282
+ declare class WorkflowRunCommand extends Command {
283
+ static paths: string[][];
284
+ static usage: clipanion.Usage;
285
+ workflowName: string | undefined;
286
+ file: string | undefined;
287
+ dryRun: boolean;
288
+ verbose: boolean;
289
+ continueOnError: boolean;
290
+ json: boolean;
291
+ projectPath: string | undefined;
292
+ agent: string | undefined;
293
+ simulate: boolean;
294
+ execute(): Promise<number>;
295
+ private showDryRun;
296
+ }
297
+
298
+ /**
299
+ * Workflow List command - list available workflows
300
+ */
301
+ declare class WorkflowListCommand extends Command {
302
+ static paths: string[][];
303
+ static usage: clipanion.Usage;
304
+ verbose: boolean;
305
+ json: boolean;
306
+ projectPath: string | undefined;
307
+ execute(): Promise<number>;
308
+ }
309
+
310
+ /**
311
+ * Workflow Create command - create a new workflow
312
+ */
313
+ declare class WorkflowCreateCommand extends Command {
314
+ static paths: string[][];
315
+ static usage: clipanion.Usage;
316
+ workflowName: string;
317
+ description: string | undefined;
318
+ stdout: boolean;
319
+ projectPath: string | undefined;
320
+ execute(): Promise<number>;
321
+ }
322
+
323
+ /**
324
+ * Run command - execute a skill
325
+ */
326
+ declare class RunCommand extends Command {
327
+ static paths: string[][];
328
+ static usage: clipanion.Usage;
329
+ skillRef: string;
330
+ agent: string | undefined;
331
+ dryRun: boolean;
332
+ verify: boolean;
333
+ autoCommit: boolean;
334
+ continueOnError: boolean;
335
+ verbose: boolean;
336
+ json: boolean;
337
+ projectPath: string | undefined;
338
+ execute(): Promise<number>;
339
+ private loadSkill;
340
+ private loadSkillFromFile;
341
+ private findInstalledSkill;
342
+ private parseTasksFromFrontmatter;
343
+ private showDryRun;
344
+ private getTaskTypeLabel;
345
+ private formatDuration;
346
+ }
347
+
348
+ /**
349
+ * Test command - run skill tests
350
+ */
351
+ declare class TestCommand extends Command {
352
+ static paths: string[][];
353
+ static usage: clipanion.Usage;
354
+ skill: string | undefined;
355
+ verbose: boolean;
356
+ bail: boolean;
357
+ tags: string | undefined;
358
+ skipTags: string | undefined;
359
+ json: boolean;
360
+ projectPath: string | undefined;
361
+ timeout: string | undefined;
362
+ execute(): Promise<number>;
363
+ /**
364
+ * Find skill files with tests
365
+ */
366
+ private findSkillFiles;
367
+ /**
368
+ * Parse skill file for tests
369
+ */
370
+ private parseSkillTests;
371
+ }
372
+
373
+ /**
374
+ * Marketplace command - browse and install skills from the marketplace
375
+ */
376
+ declare class MarketplaceCommand extends Command {
377
+ static paths: string[][];
378
+ static usage: clipanion.Usage;
379
+ action: string | undefined;
380
+ query: string | undefined;
381
+ limit: string | undefined;
382
+ tags: string | undefined;
383
+ source: string | undefined;
384
+ json: boolean;
385
+ execute(): Promise<number>;
386
+ private browseMarketplace;
387
+ private searchSkills;
388
+ private refreshIndex;
389
+ private showTags;
390
+ private showSources;
391
+ }
392
+
393
+ /**
394
+ * Memory command - manage session memory across AI agents
395
+ */
396
+ declare class MemoryCommand extends Command {
397
+ static paths: string[][];
398
+ static usage: clipanion.Usage;
399
+ action: string | undefined;
400
+ arg: string | undefined;
401
+ ratingArg: string | undefined;
402
+ global: boolean;
403
+ tags: string | undefined;
404
+ limit: string | undefined;
405
+ title: string | undefined;
406
+ content: string | undefined;
407
+ name: string | undefined;
408
+ output: string | undefined;
409
+ input: string | undefined;
410
+ keepLearnings: boolean;
411
+ dryRun: boolean;
412
+ json: boolean;
413
+ verbose: boolean;
414
+ execute(): Promise<number>;
415
+ /**
416
+ * Show memory status
417
+ */
418
+ private showStatus;
419
+ /**
420
+ * Search memories
421
+ */
422
+ private searchMemories;
423
+ /**
424
+ * List all learnings
425
+ */
426
+ private listLearnings;
427
+ /**
428
+ * Show a specific learning
429
+ */
430
+ private showLearning;
431
+ /**
432
+ * Compress observations into learnings
433
+ */
434
+ private compressObservations;
435
+ /**
436
+ * Export a learning as a skill
437
+ */
438
+ private exportLearning;
439
+ /**
440
+ * Import memories from another project
441
+ */
442
+ private importMemories;
443
+ /**
444
+ * Clear session observations
445
+ */
446
+ private clearMemory;
447
+ /**
448
+ * Add a manual learning
449
+ */
450
+ private addLearning;
451
+ /**
452
+ * Rate a learning's effectiveness
453
+ */
454
+ private rateLearning;
455
+ /**
456
+ * Show memory configuration
457
+ */
458
+ private showConfig;
459
+ /**
460
+ * Format relevance/effectiveness score with color
461
+ */
462
+ private formatScore;
463
+ /**
464
+ * Format matched by info
465
+ */
466
+ private formatMatchedBy;
467
+ /**
468
+ * Convert title to slug
469
+ */
470
+ private slugify;
471
+ /**
472
+ * Escape a YAML scalar value if it contains special characters
473
+ */
474
+ private escapeYamlValue;
475
+ /**
476
+ * Generate skill content from learning
477
+ */
478
+ private generateSkillContent;
479
+ }
480
+
481
+ /**
482
+ * Settings command - view and modify SkillKit configuration
483
+ */
484
+ declare class SettingsCommand extends Command {
485
+ static paths: string[][];
486
+ static usage: clipanion.Usage;
487
+ set: string | undefined;
488
+ get: string | undefined;
489
+ json: boolean;
490
+ global: boolean;
491
+ reset: boolean;
492
+ execute(): Promise<number>;
493
+ private getConfigValue;
494
+ private setConfigValue;
495
+ }
496
+
497
+ /**
498
+ * CICD command - initialize CI/CD workflows for skill validation and testing
499
+ */
500
+ declare class CICDCommand extends Command {
501
+ static paths: string[][];
502
+ static usage: clipanion.Usage;
503
+ provider: string;
504
+ all: boolean;
505
+ force: boolean;
506
+ targetPath: string | undefined;
507
+ execute(): Promise<number>;
508
+ private createWorkflow;
509
+ private createGitHubActions;
510
+ private createGitLabCI;
511
+ private createCircleCI;
512
+ }
513
+
514
+ declare class TeamCommand extends Command {
515
+ static paths: string[][];
516
+ static usage: clipanion.Usage;
517
+ action: string;
518
+ name: string | undefined;
519
+ registry: string | undefined;
520
+ description: string | undefined;
521
+ tags: string | undefined;
522
+ skills: string | undefined;
523
+ output: string | undefined;
524
+ source: string | undefined;
525
+ overwrite: boolean | undefined;
526
+ dryRun: boolean | undefined;
527
+ execute(): Promise<number>;
528
+ private initTeam;
529
+ private shareSkill;
530
+ private importSkill;
531
+ private listSkills;
532
+ private syncTeam;
533
+ private removeSkill;
534
+ private createBundle;
535
+ private exportSkillBundle;
536
+ private importSkillBundle;
537
+ }
538
+
539
+ declare class PluginCommand extends Command {
540
+ static paths: string[][];
541
+ static usage: clipanion.Usage;
542
+ action: string;
543
+ source: string | undefined;
544
+ name: string | undefined;
545
+ global: boolean | undefined;
546
+ execute(): Promise<number>;
547
+ private listPlugins;
548
+ /**
549
+ * Validate plugin name to prevent path traversal attacks
550
+ * Allows scoped npm names like @scope/name (mirrors loader.ts validation)
551
+ */
552
+ private isValidPluginName;
553
+ private installPlugin;
554
+ private uninstallPlugin;
555
+ private enablePlugin;
556
+ private disablePlugin;
557
+ private pluginInfo;
558
+ }
559
+
242
560
  declare const loadSkillMetadata: typeof loadSkillMetadata$1;
243
561
  declare const saveSkillMetadata: typeof saveSkillMetadata$1;
244
562
  declare function getSearchDirs(agentType?: AgentType): string[];
@@ -246,4 +564,4 @@ declare function getInstallDir(global?: boolean, agentType?: AgentType): string;
246
564
  declare function getAgentConfigPath(agentType?: AgentType): string;
247
565
  declare function initProject(agentType?: AgentType): Promise<void>;
248
566
 
249
- export { ContextCommand, CreateCommand, DisableCommand, EnableCommand, InitCommand, InstallCommand, ListCommand, ReadCommand, RecommendCommand, RemoveCommand, SyncCommand, TranslateCommand, UICommand, UpdateCommand, ValidateCommand, getAgentConfigPath, getInstallDir, getSearchDirs, initProject, loadSkillMetadata, saveSkillMetadata };
567
+ export { CICDCommand, ContextCommand, CreateCommand, DisableCommand, EnableCommand, InitCommand, InstallCommand, ListCommand, MarketplaceCommand, MemoryCommand, PauseCommand, PluginCommand, ReadCommand, RecommendCommand, RemoveCommand, ResumeCommand, RunCommand, SettingsCommand, StatusCommand, SyncCommand, TeamCommand, TestCommand, TranslateCommand, UICommand, UpdateCommand, ValidateCommand, WorkflowCreateCommand, WorkflowListCommand, WorkflowRunCommand, getAgentConfigPath, getInstallDir, getSearchDirs, initProject, loadSkillMetadata, saveSkillMetadata };