@skillkit/core 1.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.
@@ -0,0 +1,2234 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const AgentType: z.ZodEnum<["claude-code", "codex", "cursor", "antigravity", "opencode", "gemini-cli", "amp", "clawdbot", "droid", "github-copilot", "goose", "kilo", "kiro-cli", "roo", "trae", "windsurf", "universal"]>;
4
+ type AgentType = z.infer<typeof AgentType>;
5
+ declare const GitProvider: z.ZodEnum<["github", "gitlab", "bitbucket", "local"]>;
6
+ type GitProvider = z.infer<typeof GitProvider>;
7
+ declare const SkillFrontmatter: z.ZodObject<{
8
+ name: z.ZodString;
9
+ description: z.ZodString;
10
+ license: z.ZodOptional<z.ZodString>;
11
+ compatibility: z.ZodOptional<z.ZodString>;
12
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
13
+ 'allowed-tools': z.ZodOptional<z.ZodString>;
14
+ version: z.ZodOptional<z.ZodString>;
15
+ author: z.ZodOptional<z.ZodString>;
16
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
17
+ agents: z.ZodOptional<z.ZodArray<z.ZodEnum<["claude-code", "codex", "cursor", "antigravity", "opencode", "gemini-cli", "amp", "clawdbot", "droid", "github-copilot", "goose", "kilo", "kiro-cli", "roo", "trae", "windsurf", "universal"]>, "many">>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ name: string;
20
+ description: string;
21
+ license?: string | undefined;
22
+ compatibility?: string | undefined;
23
+ metadata?: Record<string, string> | undefined;
24
+ 'allowed-tools'?: string | undefined;
25
+ version?: string | undefined;
26
+ author?: string | undefined;
27
+ tags?: string[] | undefined;
28
+ agents?: ("claude-code" | "codex" | "cursor" | "antigravity" | "opencode" | "gemini-cli" | "amp" | "clawdbot" | "droid" | "github-copilot" | "goose" | "kilo" | "kiro-cli" | "roo" | "trae" | "windsurf" | "universal")[] | undefined;
29
+ }, {
30
+ name: string;
31
+ description: string;
32
+ license?: string | undefined;
33
+ compatibility?: string | undefined;
34
+ metadata?: Record<string, string> | undefined;
35
+ 'allowed-tools'?: string | undefined;
36
+ version?: string | undefined;
37
+ author?: string | undefined;
38
+ tags?: string[] | undefined;
39
+ agents?: ("claude-code" | "codex" | "cursor" | "antigravity" | "opencode" | "gemini-cli" | "amp" | "clawdbot" | "droid" | "github-copilot" | "goose" | "kilo" | "kiro-cli" | "roo" | "trae" | "windsurf" | "universal")[] | undefined;
40
+ }>;
41
+ type SkillFrontmatter = z.infer<typeof SkillFrontmatter>;
42
+ declare const SkillMetadata: z.ZodObject<{
43
+ name: z.ZodString;
44
+ description: z.ZodString;
45
+ source: z.ZodString;
46
+ sourceType: z.ZodEnum<["github", "gitlab", "bitbucket", "local"]>;
47
+ subpath: z.ZodOptional<z.ZodString>;
48
+ installedAt: z.ZodString;
49
+ updatedAt: z.ZodOptional<z.ZodString>;
50
+ enabled: z.ZodDefault<z.ZodBoolean>;
51
+ version: z.ZodOptional<z.ZodString>;
52
+ checksum: z.ZodOptional<z.ZodString>;
53
+ }, "strip", z.ZodTypeAny, {
54
+ name: string;
55
+ description: string;
56
+ source: string;
57
+ sourceType: "github" | "gitlab" | "bitbucket" | "local";
58
+ installedAt: string;
59
+ enabled: boolean;
60
+ version?: string | undefined;
61
+ subpath?: string | undefined;
62
+ updatedAt?: string | undefined;
63
+ checksum?: string | undefined;
64
+ }, {
65
+ name: string;
66
+ description: string;
67
+ source: string;
68
+ sourceType: "github" | "gitlab" | "bitbucket" | "local";
69
+ installedAt: string;
70
+ version?: string | undefined;
71
+ subpath?: string | undefined;
72
+ updatedAt?: string | undefined;
73
+ enabled?: boolean | undefined;
74
+ checksum?: string | undefined;
75
+ }>;
76
+ type SkillMetadata = z.infer<typeof SkillMetadata>;
77
+ declare const SkillLocation: z.ZodEnum<["project", "global"]>;
78
+ type SkillLocation = z.infer<typeof SkillLocation>;
79
+ declare const Skill: z.ZodObject<{
80
+ name: z.ZodString;
81
+ description: z.ZodString;
82
+ path: z.ZodString;
83
+ location: z.ZodEnum<["project", "global"]>;
84
+ metadata: z.ZodOptional<z.ZodObject<{
85
+ name: z.ZodString;
86
+ description: z.ZodString;
87
+ source: z.ZodString;
88
+ sourceType: z.ZodEnum<["github", "gitlab", "bitbucket", "local"]>;
89
+ subpath: z.ZodOptional<z.ZodString>;
90
+ installedAt: z.ZodString;
91
+ updatedAt: z.ZodOptional<z.ZodString>;
92
+ enabled: z.ZodDefault<z.ZodBoolean>;
93
+ version: z.ZodOptional<z.ZodString>;
94
+ checksum: z.ZodOptional<z.ZodString>;
95
+ }, "strip", z.ZodTypeAny, {
96
+ name: string;
97
+ description: string;
98
+ source: string;
99
+ sourceType: "github" | "gitlab" | "bitbucket" | "local";
100
+ installedAt: string;
101
+ enabled: boolean;
102
+ version?: string | undefined;
103
+ subpath?: string | undefined;
104
+ updatedAt?: string | undefined;
105
+ checksum?: string | undefined;
106
+ }, {
107
+ name: string;
108
+ description: string;
109
+ source: string;
110
+ sourceType: "github" | "gitlab" | "bitbucket" | "local";
111
+ installedAt: string;
112
+ version?: string | undefined;
113
+ subpath?: string | undefined;
114
+ updatedAt?: string | undefined;
115
+ enabled?: boolean | undefined;
116
+ checksum?: string | undefined;
117
+ }>>;
118
+ enabled: z.ZodDefault<z.ZodBoolean>;
119
+ }, "strip", z.ZodTypeAny, {
120
+ path: string;
121
+ name: string;
122
+ description: string;
123
+ enabled: boolean;
124
+ location: "project" | "global";
125
+ metadata?: {
126
+ name: string;
127
+ description: string;
128
+ source: string;
129
+ sourceType: "github" | "gitlab" | "bitbucket" | "local";
130
+ installedAt: string;
131
+ enabled: boolean;
132
+ version?: string | undefined;
133
+ subpath?: string | undefined;
134
+ updatedAt?: string | undefined;
135
+ checksum?: string | undefined;
136
+ } | undefined;
137
+ }, {
138
+ path: string;
139
+ name: string;
140
+ description: string;
141
+ location: "project" | "global";
142
+ metadata?: {
143
+ name: string;
144
+ description: string;
145
+ source: string;
146
+ sourceType: "github" | "gitlab" | "bitbucket" | "local";
147
+ installedAt: string;
148
+ version?: string | undefined;
149
+ subpath?: string | undefined;
150
+ updatedAt?: string | undefined;
151
+ enabled?: boolean | undefined;
152
+ checksum?: string | undefined;
153
+ } | undefined;
154
+ enabled?: boolean | undefined;
155
+ }>;
156
+ type Skill = z.infer<typeof Skill>;
157
+ declare const SkillkitConfig: z.ZodObject<{
158
+ version: z.ZodLiteral<1>;
159
+ agent: z.ZodDefault<z.ZodEnum<["claude-code", "codex", "cursor", "antigravity", "opencode", "gemini-cli", "amp", "clawdbot", "droid", "github-copilot", "goose", "kilo", "kiro-cli", "roo", "trae", "windsurf", "universal"]>>;
160
+ skillsDir: z.ZodOptional<z.ZodString>;
161
+ enabledSkills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
162
+ disabledSkills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
163
+ autoSync: z.ZodDefault<z.ZodBoolean>;
164
+ }, "strip", z.ZodTypeAny, {
165
+ version: 1;
166
+ agent: "claude-code" | "codex" | "cursor" | "antigravity" | "opencode" | "gemini-cli" | "amp" | "clawdbot" | "droid" | "github-copilot" | "goose" | "kilo" | "kiro-cli" | "roo" | "trae" | "windsurf" | "universal";
167
+ autoSync: boolean;
168
+ skillsDir?: string | undefined;
169
+ enabledSkills?: string[] | undefined;
170
+ disabledSkills?: string[] | undefined;
171
+ }, {
172
+ version: 1;
173
+ agent?: "claude-code" | "codex" | "cursor" | "antigravity" | "opencode" | "gemini-cli" | "amp" | "clawdbot" | "droid" | "github-copilot" | "goose" | "kilo" | "kiro-cli" | "roo" | "trae" | "windsurf" | "universal" | undefined;
174
+ skillsDir?: string | undefined;
175
+ enabledSkills?: string[] | undefined;
176
+ disabledSkills?: string[] | undefined;
177
+ autoSync?: boolean | undefined;
178
+ }>;
179
+ type SkillkitConfig = z.infer<typeof SkillkitConfig>;
180
+ interface InstallOptions {
181
+ global?: boolean;
182
+ skills?: string[];
183
+ provider?: GitProvider;
184
+ yes?: boolean;
185
+ force?: boolean;
186
+ }
187
+ interface SyncOptions {
188
+ output?: string;
189
+ agent?: AgentType;
190
+ yes?: boolean;
191
+ enabledOnly?: boolean;
192
+ }
193
+ interface UpdateOptions {
194
+ skills?: string[];
195
+ all?: boolean;
196
+ force?: boolean;
197
+ }
198
+ interface RegistrySkill {
199
+ name: string;
200
+ description: string;
201
+ source: string;
202
+ provider: GitProvider;
203
+ downloads?: number;
204
+ stars?: number;
205
+ tags?: string[];
206
+ }
207
+ interface DiscoveredSkill {
208
+ name: string;
209
+ dirName: string;
210
+ path: string;
211
+ }
212
+ interface CloneResult {
213
+ success: boolean;
214
+ path?: string;
215
+ tempRoot?: string;
216
+ error?: string;
217
+ skills?: string[];
218
+ discoveredSkills?: DiscoveredSkill[];
219
+ }
220
+ interface CommandResult {
221
+ success: boolean;
222
+ message: string;
223
+ data?: unknown;
224
+ }
225
+ interface AgentAdapterInfo {
226
+ type: AgentType;
227
+ name: string;
228
+ skillsDir: string;
229
+ configFile: string;
230
+ }
231
+
232
+ declare const SKILL_DISCOVERY_PATHS: string[];
233
+ declare function discoverSkills(rootDir: string): Skill[];
234
+ declare function parseSkill(skillPath: string, location?: SkillLocation): Skill | null;
235
+ declare function extractFrontmatter(content: string): Record<string, unknown> | null;
236
+ declare function extractField(content: string, field: string): string | null;
237
+ declare function loadMetadata(skillPath: string): SkillMetadata | null;
238
+ declare function readSkillContent(skillPath: string): string | null;
239
+ declare function findSkill(name: string, searchDirs: string[]): Skill | null;
240
+ declare function findAllSkills(searchDirs: string[]): Skill[];
241
+ declare function validateSkill(skillPath: string): {
242
+ valid: boolean;
243
+ errors: string[];
244
+ warnings?: string[];
245
+ };
246
+ declare function isPathInside(child: string, parent: string): boolean;
247
+
248
+ declare function getProjectConfigPath(): string;
249
+ declare function getGlobalConfigPath(): string;
250
+ declare function loadConfig(): SkillkitConfig;
251
+ declare function saveConfig(config: SkillkitConfig, global?: boolean): void;
252
+ declare function getSearchDirs(adapter: AgentAdapterInfo): string[];
253
+ declare function getInstallDir(adapter: AgentAdapterInfo, global?: boolean): string;
254
+ declare function getAgentConfigPath(adapter: AgentAdapterInfo): string;
255
+ declare function saveSkillMetadata(skillPath: string, metadata: SkillMetadata): void;
256
+ declare function loadSkillMetadata(skillPath: string): SkillMetadata | null;
257
+ declare function setSkillEnabled(skillPath: string, enabled: boolean): boolean;
258
+ declare function initProject(type: AgentType, adapter: AgentAdapterInfo): Promise<void>;
259
+
260
+ interface GitProviderAdapter {
261
+ readonly type: GitProvider;
262
+ readonly name: string;
263
+ readonly baseUrl: string;
264
+ parseSource(source: string): {
265
+ owner: string;
266
+ repo: string;
267
+ subpath?: string;
268
+ } | null;
269
+ matches(source: string): boolean;
270
+ getCloneUrl(owner: string, repo: string): string;
271
+ getSshUrl(owner: string, repo: string): string;
272
+ clone(source: string, targetDir: string, options?: CloneOptions): Promise<CloneResult>;
273
+ }
274
+ interface CloneOptions {
275
+ depth?: number;
276
+ branch?: string;
277
+ ssh?: boolean;
278
+ }
279
+ declare function parseShorthand(source: string): {
280
+ owner: string;
281
+ repo: string;
282
+ subpath?: string;
283
+ } | null;
284
+ declare function isLocalPath(source: string): boolean;
285
+ declare function isGitUrl(source: string): boolean;
286
+
287
+ declare class GitHubProvider implements GitProviderAdapter {
288
+ readonly type: GitProvider;
289
+ readonly name = "GitHub";
290
+ readonly baseUrl = "https://github.com";
291
+ parseSource(source: string): {
292
+ owner: string;
293
+ repo: string;
294
+ subpath?: string;
295
+ } | null;
296
+ matches(source: string): boolean;
297
+ getCloneUrl(owner: string, repo: string): string;
298
+ getSshUrl(owner: string, repo: string): string;
299
+ clone(source: string, _targetDir: string, options?: CloneOptions): Promise<CloneResult>;
300
+ }
301
+
302
+ declare class GitLabProvider implements GitProviderAdapter {
303
+ readonly type: GitProvider;
304
+ readonly name = "GitLab";
305
+ readonly baseUrl = "https://gitlab.com";
306
+ parseSource(source: string): {
307
+ owner: string;
308
+ repo: string;
309
+ subpath?: string;
310
+ } | null;
311
+ matches(source: string): boolean;
312
+ getCloneUrl(owner: string, repo: string): string;
313
+ getSshUrl(owner: string, repo: string): string;
314
+ clone(source: string, _targetDir: string, options?: CloneOptions): Promise<CloneResult>;
315
+ }
316
+
317
+ declare class BitbucketProvider implements GitProviderAdapter {
318
+ readonly type: GitProvider;
319
+ readonly name = "Bitbucket";
320
+ readonly baseUrl = "https://bitbucket.org";
321
+ parseSource(source: string): {
322
+ owner: string;
323
+ repo: string;
324
+ subpath?: string;
325
+ } | null;
326
+ matches(source: string): boolean;
327
+ getCloneUrl(owner: string, repo: string): string;
328
+ getSshUrl(owner: string, repo: string): string;
329
+ clone(source: string, _targetDir: string, options?: CloneOptions): Promise<CloneResult>;
330
+ }
331
+
332
+ declare class LocalProvider implements GitProviderAdapter {
333
+ readonly type: GitProvider;
334
+ readonly name = "Local Filesystem";
335
+ readonly baseUrl = "";
336
+ parseSource(source: string): {
337
+ owner: string;
338
+ repo: string;
339
+ subpath?: string;
340
+ } | null;
341
+ matches(source: string): boolean;
342
+ getCloneUrl(_owner: string, _repo: string): string;
343
+ getSshUrl(_owner: string, _repo: string): string;
344
+ clone(source: string, _targetDir: string, _options?: CloneOptions): Promise<CloneResult>;
345
+ }
346
+
347
+ declare function getProvider(type: GitProvider): GitProviderAdapter | undefined;
348
+ declare function getAllProviders(): GitProviderAdapter[];
349
+ declare function detectProvider(source: string): GitProviderAdapter | undefined;
350
+ declare function parseSource(source: string): {
351
+ provider: GitProviderAdapter;
352
+ owner: string;
353
+ repo: string;
354
+ subpath?: string;
355
+ } | null;
356
+
357
+ /**
358
+ * Format categories for skill translation
359
+ */
360
+ type FormatCategory = 'skill-md' | 'cursor-mdc' | 'markdown-rules' | 'external';
361
+ /**
362
+ * Mapping of agents to their format categories
363
+ */
364
+ declare const AGENT_FORMAT_MAP: Record<AgentType, FormatCategory>;
365
+ /**
366
+ * Extended skill frontmatter for translation
367
+ */
368
+ declare const TranslatableSkillFrontmatter: z.ZodObject<{
369
+ name: z.ZodString;
370
+ description: z.ZodString;
371
+ version: z.ZodOptional<z.ZodString>;
372
+ author: z.ZodOptional<z.ZodString>;
373
+ license: z.ZodOptional<z.ZodString>;
374
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
375
+ compatibility: z.ZodOptional<z.ZodString>;
376
+ 'allowed-tools': z.ZodOptional<z.ZodString>;
377
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
378
+ globs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
379
+ alwaysApply: z.ZodOptional<z.ZodBoolean>;
380
+ agents: z.ZodOptional<z.ZodObject<{
381
+ optimized: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
382
+ compatible: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
383
+ }, "strip", z.ZodTypeAny, {
384
+ optimized?: string[] | undefined;
385
+ compatible?: string[] | undefined;
386
+ }, {
387
+ optimized?: string[] | undefined;
388
+ compatible?: string[] | undefined;
389
+ }>>;
390
+ }, "strip", z.ZodTypeAny, {
391
+ name: string;
392
+ description: string;
393
+ license?: string | undefined;
394
+ compatibility?: string | undefined;
395
+ metadata?: Record<string, string> | undefined;
396
+ 'allowed-tools'?: string | undefined;
397
+ version?: string | undefined;
398
+ author?: string | undefined;
399
+ tags?: string[] | undefined;
400
+ agents?: {
401
+ optimized?: string[] | undefined;
402
+ compatible?: string[] | undefined;
403
+ } | undefined;
404
+ globs?: string[] | undefined;
405
+ alwaysApply?: boolean | undefined;
406
+ }, {
407
+ name: string;
408
+ description: string;
409
+ license?: string | undefined;
410
+ compatibility?: string | undefined;
411
+ metadata?: Record<string, string> | undefined;
412
+ 'allowed-tools'?: string | undefined;
413
+ version?: string | undefined;
414
+ author?: string | undefined;
415
+ tags?: string[] | undefined;
416
+ agents?: {
417
+ optimized?: string[] | undefined;
418
+ compatible?: string[] | undefined;
419
+ } | undefined;
420
+ globs?: string[] | undefined;
421
+ alwaysApply?: boolean | undefined;
422
+ }>;
423
+ type TranslatableSkillFrontmatter = z.infer<typeof TranslatableSkillFrontmatter>;
424
+ /**
425
+ * Canonical skill representation for translation
426
+ */
427
+ interface CanonicalSkill {
428
+ /** Skill name (kebab-case) */
429
+ name: string;
430
+ /** Human-readable description */
431
+ description: string;
432
+ /** Version string */
433
+ version?: string;
434
+ /** Author name or handle */
435
+ author?: string;
436
+ /** License identifier */
437
+ license?: string;
438
+ /** Categorization tags */
439
+ tags?: string[];
440
+ /** Compatibility description */
441
+ compatibility?: string;
442
+ /** Allowed tools list */
443
+ allowedTools?: string;
444
+ /** Additional metadata */
445
+ metadata?: Record<string, string>;
446
+ /** Main content (markdown) */
447
+ content: string;
448
+ /** Original format this was parsed from */
449
+ sourceFormat: FormatCategory;
450
+ /** Source agent type */
451
+ sourceAgent?: AgentType;
452
+ /** Cursor-specific: glob patterns */
453
+ globs?: string[];
454
+ /** Cursor-specific: always apply flag */
455
+ alwaysApply?: boolean;
456
+ /** Agent optimization hints */
457
+ agentHints?: {
458
+ optimized?: string[];
459
+ compatible?: string[];
460
+ };
461
+ }
462
+ /**
463
+ * Result of a translation operation
464
+ */
465
+ interface TranslationResult {
466
+ /** Whether translation succeeded */
467
+ success: boolean;
468
+ /** Translated content */
469
+ content: string;
470
+ /** Output filename */
471
+ filename: string;
472
+ /** Warnings during translation */
473
+ warnings: string[];
474
+ /** Features that couldn't be translated */
475
+ incompatible: string[];
476
+ /** Target format */
477
+ targetFormat: FormatCategory;
478
+ /** Target agent */
479
+ targetAgent: AgentType;
480
+ }
481
+ /**
482
+ * Options for translation
483
+ */
484
+ interface TranslationOptions {
485
+ /** Preserve original comments */
486
+ preserveComments?: boolean;
487
+ /** Add translation metadata */
488
+ addMetadata?: boolean;
489
+ /** Custom output filename */
490
+ outputFilename?: string;
491
+ /** For Cursor: glob patterns to include */
492
+ globs?: string[];
493
+ /** For Cursor: always apply setting */
494
+ alwaysApply?: boolean;
495
+ }
496
+ /**
497
+ * Interface for format-specific translators
498
+ */
499
+ interface FormatTranslator {
500
+ /** Format this translator handles */
501
+ readonly format: FormatCategory;
502
+ /** Agents this translator is optimized for */
503
+ readonly agents: AgentType[];
504
+ /**
505
+ * Parse content into canonical format
506
+ */
507
+ parse(content: string, filename?: string): CanonicalSkill | null;
508
+ /**
509
+ * Check if content matches this format
510
+ */
511
+ detect(content: string, filename?: string): boolean;
512
+ /**
513
+ * Generate content for target agent
514
+ */
515
+ generate(skill: CanonicalSkill, targetAgent: AgentType, options?: TranslationOptions): TranslationResult;
516
+ /**
517
+ * Get the expected filename for this format
518
+ */
519
+ getFilename(skillName: string, targetAgent: AgentType): string;
520
+ }
521
+ /**
522
+ * Translation path between formats
523
+ */
524
+ interface TranslationPath {
525
+ from: FormatCategory;
526
+ to: FormatCategory;
527
+ steps: FormatCategory[];
528
+ }
529
+
530
+ /**
531
+ * SKILL.md Format Translator
532
+ *
533
+ * This is the canonical format used by most AI coding agents.
534
+ * Format:
535
+ * ```
536
+ * ---
537
+ * name: skill-name
538
+ * description: What it does
539
+ * version: 1.0.0
540
+ * tags: [tag1, tag2]
541
+ * ---
542
+ * # Instructions
543
+ * Markdown content here...
544
+ * ```
545
+ */
546
+ declare class SkillMdTranslator implements FormatTranslator {
547
+ readonly format: FormatCategory;
548
+ readonly agents: AgentType[];
549
+ /**
550
+ * Parse SKILL.md content into canonical format
551
+ */
552
+ parse(content: string, filename?: string): CanonicalSkill | null;
553
+ /**
554
+ * Check if content is SKILL.md format
555
+ */
556
+ detect(content: string, filename?: string): boolean;
557
+ /**
558
+ * Generate SKILL.md content for target agent
559
+ */
560
+ generate(skill: CanonicalSkill, targetAgent: AgentType, options?: TranslationOptions): TranslationResult;
561
+ /**
562
+ * Get the expected filename for SKILL.md format
563
+ */
564
+ getFilename(_skillName: string, _targetAgent: AgentType): string;
565
+ }
566
+ /**
567
+ * Singleton instance
568
+ */
569
+ declare const skillMdTranslator: SkillMdTranslator;
570
+
571
+ /**
572
+ * Cursor MDC Format Translator
573
+ *
574
+ * Cursor uses two formats:
575
+ * 1. .cursorrules - Global rules file in project root
576
+ * 2. .cursor/rules/*.mdc - Individual rule files with frontmatter
577
+ *
578
+ * MDC Format:
579
+ * ```
580
+ * ---
581
+ * description: What this rule does
582
+ * globs: ["**\/*.tsx", "**\/*.jsx"]
583
+ * alwaysApply: false
584
+ * ---
585
+ * Instructions here...
586
+ * ```
587
+ */
588
+ declare class CursorTranslator implements FormatTranslator {
589
+ readonly format: FormatCategory;
590
+ readonly agents: AgentType[];
591
+ /**
592
+ * Parse Cursor MDC content into canonical format
593
+ */
594
+ parse(content: string, filename?: string): CanonicalSkill | null;
595
+ /**
596
+ * Check if content is Cursor MDC format
597
+ */
598
+ detect(content: string, filename?: string): boolean;
599
+ /**
600
+ * Generate Cursor MDC content
601
+ */
602
+ generate(skill: CanonicalSkill, targetAgent: AgentType, options?: TranslationOptions): TranslationResult;
603
+ /**
604
+ * Generate .cursorrules content (alternative format)
605
+ */
606
+ generateCursorrules(skill: CanonicalSkill): string;
607
+ /**
608
+ * Get the expected filename for Cursor format
609
+ */
610
+ getFilename(skillName: string, _targetAgent: AgentType): string;
611
+ }
612
+ /**
613
+ * Singleton instance
614
+ */
615
+ declare const cursorTranslator: CursorTranslator;
616
+
617
+ /**
618
+ * Windsurf Rules Format Translator
619
+ *
620
+ * Windsurf uses plain markdown files (.windsurfrules) without YAML frontmatter.
621
+ * Metadata can be embedded in HTML comments at the top.
622
+ *
623
+ * Format:
624
+ * ```
625
+ * <!-- name: skill-name -->
626
+ * <!-- description: What it does -->
627
+ *
628
+ * # Guidelines
629
+ *
630
+ * Instructions here...
631
+ * ```
632
+ */
633
+ declare class WindsurfTranslator implements FormatTranslator {
634
+ readonly format: FormatCategory;
635
+ readonly agents: AgentType[];
636
+ /**
637
+ * Parse Windsurf rules content into canonical format
638
+ */
639
+ parse(content: string, filename?: string): CanonicalSkill | null;
640
+ /**
641
+ * Check if content is Windsurf format
642
+ */
643
+ detect(content: string, filename?: string): boolean;
644
+ /**
645
+ * Generate Windsurf rules content
646
+ */
647
+ generate(skill: CanonicalSkill, targetAgent: AgentType, options?: TranslationOptions): TranslationResult;
648
+ /**
649
+ * Get the expected filename for Windsurf format
650
+ */
651
+ getFilename(_skillName: string, _targetAgent: AgentType): string;
652
+ }
653
+ /**
654
+ * Singleton instance
655
+ */
656
+ declare const windsurfTranslator: WindsurfTranslator;
657
+
658
+ /**
659
+ * GitHub Copilot Instructions Format Translator
660
+ *
661
+ * GitHub Copilot uses a markdown file at `.github/copilot-instructions.md`
662
+ * for custom instructions. It's plain markdown with optional metadata comments.
663
+ *
664
+ * Format:
665
+ * ```
666
+ * <!-- This file provides custom instructions for GitHub Copilot -->
667
+ *
668
+ * # Coding Guidelines
669
+ *
670
+ * ## React Components
671
+ * - Use functional components with hooks
672
+ * - Prefer TypeScript
673
+ * ```
674
+ */
675
+ declare class CopilotTranslator implements FormatTranslator {
676
+ readonly format: FormatCategory;
677
+ readonly agents: AgentType[];
678
+ /**
679
+ * Parse Copilot instructions into canonical format
680
+ */
681
+ parse(content: string, filename?: string): CanonicalSkill | null;
682
+ /**
683
+ * Check if content is GitHub Copilot format
684
+ */
685
+ detect(content: string, filename?: string): boolean;
686
+ /**
687
+ * Generate GitHub Copilot instructions content
688
+ */
689
+ generate(skill: CanonicalSkill, targetAgent: AgentType, options?: TranslationOptions): TranslationResult;
690
+ /**
691
+ * Get the expected filename for GitHub Copilot format
692
+ */
693
+ getFilename(_skillName: string, _targetAgent: AgentType): string;
694
+ /**
695
+ * Get the expected path for the instructions file
696
+ */
697
+ getPath(_skillName: string): string;
698
+ }
699
+ /**
700
+ * Singleton instance
701
+ */
702
+ declare const copilotTranslator: CopilotTranslator;
703
+
704
+ /**
705
+ * Translator Registry
706
+ *
707
+ * Central registry for all format translators. Handles:
708
+ * - Format detection
709
+ * - Translation between any supported formats
710
+ * - Finding the optimal translation path
711
+ */
712
+ declare class TranslatorRegistry {
713
+ private translators;
714
+ private agentTranslators;
715
+ constructor();
716
+ /**
717
+ * Register a format translator
718
+ */
719
+ register(translator: FormatTranslator): void;
720
+ /**
721
+ * Get translator for a specific format
722
+ */
723
+ getTranslator(format: FormatCategory): FormatTranslator | undefined;
724
+ /**
725
+ * Get translator for a specific agent
726
+ */
727
+ getTranslatorForAgent(agent: AgentType): FormatTranslator;
728
+ /**
729
+ * Get the format category for an agent
730
+ */
731
+ getFormatForAgent(agent: AgentType): FormatCategory;
732
+ /**
733
+ * Detect the format of content
734
+ */
735
+ detectFormat(content: string, filename?: string): FormatCategory | null;
736
+ /**
737
+ * Detect the source agent from content
738
+ */
739
+ detectSourceAgent(content: string, filename?: string): AgentType | null;
740
+ /**
741
+ * Parse content into canonical format
742
+ */
743
+ parse(content: string, filename?: string): CanonicalSkill | null;
744
+ /**
745
+ * Translate skill to target agent format
746
+ */
747
+ translate(skill: CanonicalSkill, targetAgent: AgentType, options?: TranslationOptions): TranslationResult;
748
+ /**
749
+ * Translate content directly from one agent to another
750
+ */
751
+ translateContent(content: string, targetAgent: AgentType, options?: TranslationOptions & {
752
+ sourceFilename?: string;
753
+ }): TranslationResult;
754
+ /**
755
+ * Translate a skill file to target agent format
756
+ */
757
+ translateFile(sourcePath: string, targetAgent: AgentType, options?: TranslationOptions): TranslationResult;
758
+ /**
759
+ * Translate and write to target path
760
+ */
761
+ translateAndWrite(sourcePath: string, targetPath: string, targetAgent: AgentType, options?: TranslationOptions): TranslationResult;
762
+ /**
763
+ * Get all supported agents
764
+ */
765
+ getSupportedAgents(): AgentType[];
766
+ /**
767
+ * Get all registered formats
768
+ */
769
+ getRegisteredFormats(): FormatCategory[];
770
+ /**
771
+ * Check if translation is supported between two agents
772
+ */
773
+ canTranslate(from: AgentType, to: AgentType): boolean;
774
+ /**
775
+ * Get translation compatibility info
776
+ */
777
+ getCompatibilityInfo(from: AgentType, to: AgentType): {
778
+ supported: boolean;
779
+ warnings: string[];
780
+ lossyFields: string[];
781
+ };
782
+ }
783
+ /**
784
+ * Default registry instance
785
+ */
786
+ declare const translatorRegistry: TranslatorRegistry;
787
+
788
+ /**
789
+ * Translate skill content from one agent format to another
790
+ *
791
+ * @example
792
+ * ```ts
793
+ * import { translateSkill } from '@skillkit/core';
794
+ *
795
+ * const result = translateSkill(skillMdContent, 'cursor');
796
+ * console.log(result.content); // Cursor MDC format
797
+ * ```
798
+ */
799
+ declare function translateSkill(content: string, targetAgent: AgentType, options?: TranslationOptions & {
800
+ sourceFilename?: string;
801
+ }): TranslationResult;
802
+ /**
803
+ * Translate a skill file to target agent format
804
+ *
805
+ * @example
806
+ * ```ts
807
+ * import { translateSkillFile } from '@skillkit/core';
808
+ *
809
+ * const result = translateSkillFile('./skills/my-skill/SKILL.md', 'cursor');
810
+ * console.log(result.filename); // 'my-skill.mdc'
811
+ * ```
812
+ */
813
+ declare function translateSkillFile(sourcePath: string, targetAgent: AgentType, options?: TranslationOptions): TranslationResult;
814
+ /**
815
+ * Parse skill content into canonical format
816
+ *
817
+ * @example
818
+ * ```ts
819
+ * import { parseSkillContent } from '@skillkit/core';
820
+ *
821
+ * const skill = parseSkillContent(cursorMdcContent, 'my-rule.mdc');
822
+ * console.log(skill.name); // 'my-rule'
823
+ * ```
824
+ */
825
+ declare function parseSkillContent(content: string, filename?: string): CanonicalSkill | null;
826
+ /**
827
+ * Detect the format of skill content
828
+ *
829
+ * @example
830
+ * ```ts
831
+ * import { detectSkillFormat } from '@skillkit/core';
832
+ *
833
+ * const format = detectSkillFormat(content, 'SKILL.md');
834
+ * console.log(format); // 'skill-md'
835
+ * ```
836
+ */
837
+ declare function detectSkillFormat(content: string, filename?: string): string | null;
838
+ /**
839
+ * Get all supported agent types for translation
840
+ */
841
+ declare function getSupportedTranslationAgents(): AgentType[];
842
+ /**
843
+ * Check if translation is possible between two agents
844
+ */
845
+ declare function canTranslate(from: AgentType, to: AgentType): boolean;
846
+
847
+ /**
848
+ * Detected dependency with version
849
+ */
850
+ declare const DependencyInfo: z.ZodObject<{
851
+ name: z.ZodString;
852
+ version: z.ZodOptional<z.ZodString>;
853
+ dev: z.ZodDefault<z.ZodBoolean>;
854
+ }, "strip", z.ZodTypeAny, {
855
+ name: string;
856
+ dev: boolean;
857
+ version?: string | undefined;
858
+ }, {
859
+ name: string;
860
+ version?: string | undefined;
861
+ dev?: boolean | undefined;
862
+ }>;
863
+ type DependencyInfo = z.infer<typeof DependencyInfo>;
864
+ /**
865
+ * Detection result with confidence
866
+ */
867
+ declare const Detection: z.ZodObject<{
868
+ name: z.ZodString;
869
+ version: z.ZodOptional<z.ZodString>;
870
+ confidence: z.ZodDefault<z.ZodNumber>;
871
+ source: z.ZodOptional<z.ZodString>;
872
+ }, "strip", z.ZodTypeAny, {
873
+ name: string;
874
+ confidence: number;
875
+ version?: string | undefined;
876
+ source?: string | undefined;
877
+ }, {
878
+ name: string;
879
+ version?: string | undefined;
880
+ source?: string | undefined;
881
+ confidence?: number | undefined;
882
+ }>;
883
+ type Detection = z.infer<typeof Detection>;
884
+ /**
885
+ * Project stack detection results
886
+ */
887
+ declare const ProjectStack: z.ZodObject<{
888
+ languages: z.ZodDefault<z.ZodArray<z.ZodObject<{
889
+ name: z.ZodString;
890
+ version: z.ZodOptional<z.ZodString>;
891
+ confidence: z.ZodDefault<z.ZodNumber>;
892
+ source: z.ZodOptional<z.ZodString>;
893
+ }, "strip", z.ZodTypeAny, {
894
+ name: string;
895
+ confidence: number;
896
+ version?: string | undefined;
897
+ source?: string | undefined;
898
+ }, {
899
+ name: string;
900
+ version?: string | undefined;
901
+ source?: string | undefined;
902
+ confidence?: number | undefined;
903
+ }>, "many">>;
904
+ frameworks: z.ZodDefault<z.ZodArray<z.ZodObject<{
905
+ name: z.ZodString;
906
+ version: z.ZodOptional<z.ZodString>;
907
+ confidence: z.ZodDefault<z.ZodNumber>;
908
+ source: z.ZodOptional<z.ZodString>;
909
+ }, "strip", z.ZodTypeAny, {
910
+ name: string;
911
+ confidence: number;
912
+ version?: string | undefined;
913
+ source?: string | undefined;
914
+ }, {
915
+ name: string;
916
+ version?: string | undefined;
917
+ source?: string | undefined;
918
+ confidence?: number | undefined;
919
+ }>, "many">>;
920
+ libraries: z.ZodDefault<z.ZodArray<z.ZodObject<{
921
+ name: z.ZodString;
922
+ version: z.ZodOptional<z.ZodString>;
923
+ confidence: z.ZodDefault<z.ZodNumber>;
924
+ source: z.ZodOptional<z.ZodString>;
925
+ }, "strip", z.ZodTypeAny, {
926
+ name: string;
927
+ confidence: number;
928
+ version?: string | undefined;
929
+ source?: string | undefined;
930
+ }, {
931
+ name: string;
932
+ version?: string | undefined;
933
+ source?: string | undefined;
934
+ confidence?: number | undefined;
935
+ }>, "many">>;
936
+ styling: z.ZodDefault<z.ZodArray<z.ZodObject<{
937
+ name: z.ZodString;
938
+ version: z.ZodOptional<z.ZodString>;
939
+ confidence: z.ZodDefault<z.ZodNumber>;
940
+ source: z.ZodOptional<z.ZodString>;
941
+ }, "strip", z.ZodTypeAny, {
942
+ name: string;
943
+ confidence: number;
944
+ version?: string | undefined;
945
+ source?: string | undefined;
946
+ }, {
947
+ name: string;
948
+ version?: string | undefined;
949
+ source?: string | undefined;
950
+ confidence?: number | undefined;
951
+ }>, "many">>;
952
+ testing: z.ZodDefault<z.ZodArray<z.ZodObject<{
953
+ name: z.ZodString;
954
+ version: z.ZodOptional<z.ZodString>;
955
+ confidence: z.ZodDefault<z.ZodNumber>;
956
+ source: z.ZodOptional<z.ZodString>;
957
+ }, "strip", z.ZodTypeAny, {
958
+ name: string;
959
+ confidence: number;
960
+ version?: string | undefined;
961
+ source?: string | undefined;
962
+ }, {
963
+ name: string;
964
+ version?: string | undefined;
965
+ source?: string | undefined;
966
+ confidence?: number | undefined;
967
+ }>, "many">>;
968
+ databases: z.ZodDefault<z.ZodArray<z.ZodObject<{
969
+ name: z.ZodString;
970
+ version: z.ZodOptional<z.ZodString>;
971
+ confidence: z.ZodDefault<z.ZodNumber>;
972
+ source: z.ZodOptional<z.ZodString>;
973
+ }, "strip", z.ZodTypeAny, {
974
+ name: string;
975
+ confidence: number;
976
+ version?: string | undefined;
977
+ source?: string | undefined;
978
+ }, {
979
+ name: string;
980
+ version?: string | undefined;
981
+ source?: string | undefined;
982
+ confidence?: number | undefined;
983
+ }>, "many">>;
984
+ tools: z.ZodDefault<z.ZodArray<z.ZodObject<{
985
+ name: z.ZodString;
986
+ version: z.ZodOptional<z.ZodString>;
987
+ confidence: z.ZodDefault<z.ZodNumber>;
988
+ source: z.ZodOptional<z.ZodString>;
989
+ }, "strip", z.ZodTypeAny, {
990
+ name: string;
991
+ confidence: number;
992
+ version?: string | undefined;
993
+ source?: string | undefined;
994
+ }, {
995
+ name: string;
996
+ version?: string | undefined;
997
+ source?: string | undefined;
998
+ confidence?: number | undefined;
999
+ }>, "many">>;
1000
+ runtime: z.ZodDefault<z.ZodArray<z.ZodObject<{
1001
+ name: z.ZodString;
1002
+ version: z.ZodOptional<z.ZodString>;
1003
+ confidence: z.ZodDefault<z.ZodNumber>;
1004
+ source: z.ZodOptional<z.ZodString>;
1005
+ }, "strip", z.ZodTypeAny, {
1006
+ name: string;
1007
+ confidence: number;
1008
+ version?: string | undefined;
1009
+ source?: string | undefined;
1010
+ }, {
1011
+ name: string;
1012
+ version?: string | undefined;
1013
+ source?: string | undefined;
1014
+ confidence?: number | undefined;
1015
+ }>, "many">>;
1016
+ }, "strip", z.ZodTypeAny, {
1017
+ testing: {
1018
+ name: string;
1019
+ confidence: number;
1020
+ version?: string | undefined;
1021
+ source?: string | undefined;
1022
+ }[];
1023
+ languages: {
1024
+ name: string;
1025
+ confidence: number;
1026
+ version?: string | undefined;
1027
+ source?: string | undefined;
1028
+ }[];
1029
+ frameworks: {
1030
+ name: string;
1031
+ confidence: number;
1032
+ version?: string | undefined;
1033
+ source?: string | undefined;
1034
+ }[];
1035
+ libraries: {
1036
+ name: string;
1037
+ confidence: number;
1038
+ version?: string | undefined;
1039
+ source?: string | undefined;
1040
+ }[];
1041
+ styling: {
1042
+ name: string;
1043
+ confidence: number;
1044
+ version?: string | undefined;
1045
+ source?: string | undefined;
1046
+ }[];
1047
+ databases: {
1048
+ name: string;
1049
+ confidence: number;
1050
+ version?: string | undefined;
1051
+ source?: string | undefined;
1052
+ }[];
1053
+ tools: {
1054
+ name: string;
1055
+ confidence: number;
1056
+ version?: string | undefined;
1057
+ source?: string | undefined;
1058
+ }[];
1059
+ runtime: {
1060
+ name: string;
1061
+ confidence: number;
1062
+ version?: string | undefined;
1063
+ source?: string | undefined;
1064
+ }[];
1065
+ }, {
1066
+ testing?: {
1067
+ name: string;
1068
+ version?: string | undefined;
1069
+ source?: string | undefined;
1070
+ confidence?: number | undefined;
1071
+ }[] | undefined;
1072
+ languages?: {
1073
+ name: string;
1074
+ version?: string | undefined;
1075
+ source?: string | undefined;
1076
+ confidence?: number | undefined;
1077
+ }[] | undefined;
1078
+ frameworks?: {
1079
+ name: string;
1080
+ version?: string | undefined;
1081
+ source?: string | undefined;
1082
+ confidence?: number | undefined;
1083
+ }[] | undefined;
1084
+ libraries?: {
1085
+ name: string;
1086
+ version?: string | undefined;
1087
+ source?: string | undefined;
1088
+ confidence?: number | undefined;
1089
+ }[] | undefined;
1090
+ styling?: {
1091
+ name: string;
1092
+ version?: string | undefined;
1093
+ source?: string | undefined;
1094
+ confidence?: number | undefined;
1095
+ }[] | undefined;
1096
+ databases?: {
1097
+ name: string;
1098
+ version?: string | undefined;
1099
+ source?: string | undefined;
1100
+ confidence?: number | undefined;
1101
+ }[] | undefined;
1102
+ tools?: {
1103
+ name: string;
1104
+ version?: string | undefined;
1105
+ source?: string | undefined;
1106
+ confidence?: number | undefined;
1107
+ }[] | undefined;
1108
+ runtime?: {
1109
+ name: string;
1110
+ version?: string | undefined;
1111
+ source?: string | undefined;
1112
+ confidence?: number | undefined;
1113
+ }[] | undefined;
1114
+ }>;
1115
+ type ProjectStack = z.infer<typeof ProjectStack>;
1116
+ /**
1117
+ * Project patterns and conventions
1118
+ */
1119
+ declare const ProjectPatterns: z.ZodObject<{
1120
+ components: z.ZodOptional<z.ZodString>;
1121
+ stateManagement: z.ZodOptional<z.ZodString>;
1122
+ apiStyle: z.ZodOptional<z.ZodString>;
1123
+ styling: z.ZodOptional<z.ZodString>;
1124
+ testing: z.ZodOptional<z.ZodString>;
1125
+ linting: z.ZodOptional<z.ZodString>;
1126
+ formatting: z.ZodOptional<z.ZodString>;
1127
+ }, "strip", z.ZodTypeAny, {
1128
+ testing?: string | undefined;
1129
+ styling?: string | undefined;
1130
+ components?: string | undefined;
1131
+ stateManagement?: string | undefined;
1132
+ apiStyle?: string | undefined;
1133
+ linting?: string | undefined;
1134
+ formatting?: string | undefined;
1135
+ }, {
1136
+ testing?: string | undefined;
1137
+ styling?: string | undefined;
1138
+ components?: string | undefined;
1139
+ stateManagement?: string | undefined;
1140
+ apiStyle?: string | undefined;
1141
+ linting?: string | undefined;
1142
+ formatting?: string | undefined;
1143
+ }>;
1144
+ type ProjectPatterns = z.infer<typeof ProjectPatterns>;
1145
+ /**
1146
+ * Skill preferences for the project
1147
+ */
1148
+ declare const SkillPreferences: z.ZodObject<{
1149
+ installed: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1150
+ recommended: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1151
+ excluded: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1152
+ autoSync: z.ZodDefault<z.ZodBoolean>;
1153
+ securityLevel: z.ZodDefault<z.ZodEnum<["low", "medium", "high"]>>;
1154
+ testingRequired: z.ZodDefault<z.ZodBoolean>;
1155
+ }, "strip", z.ZodTypeAny, {
1156
+ autoSync: boolean;
1157
+ installed: string[];
1158
+ recommended: string[];
1159
+ excluded: string[];
1160
+ securityLevel: "low" | "medium" | "high";
1161
+ testingRequired: boolean;
1162
+ }, {
1163
+ autoSync?: boolean | undefined;
1164
+ installed?: string[] | undefined;
1165
+ recommended?: string[] | undefined;
1166
+ excluded?: string[] | undefined;
1167
+ securityLevel?: "low" | "medium" | "high" | undefined;
1168
+ testingRequired?: boolean | undefined;
1169
+ }>;
1170
+ type SkillPreferences = z.infer<typeof SkillPreferences>;
1171
+ /**
1172
+ * Agent configuration for the project
1173
+ */
1174
+ declare const AgentConfig: z.ZodObject<{
1175
+ primary: z.ZodOptional<z.ZodString>;
1176
+ detected: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1177
+ synced: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1178
+ disabled: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1179
+ }, "strip", z.ZodTypeAny, {
1180
+ detected: string[];
1181
+ synced: string[];
1182
+ disabled: string[];
1183
+ primary?: string | undefined;
1184
+ }, {
1185
+ primary?: string | undefined;
1186
+ detected?: string[] | undefined;
1187
+ synced?: string[] | undefined;
1188
+ disabled?: string[] | undefined;
1189
+ }>;
1190
+ type AgentConfig = z.infer<typeof AgentConfig>;
1191
+ /**
1192
+ * Full project context
1193
+ */
1194
+ declare const ProjectContext: z.ZodObject<{
1195
+ version: z.ZodLiteral<1>;
1196
+ project: z.ZodObject<{
1197
+ name: z.ZodString;
1198
+ description: z.ZodOptional<z.ZodString>;
1199
+ type: z.ZodOptional<z.ZodString>;
1200
+ path: z.ZodOptional<z.ZodString>;
1201
+ }, "strip", z.ZodTypeAny, {
1202
+ name: string;
1203
+ path?: string | undefined;
1204
+ type?: string | undefined;
1205
+ description?: string | undefined;
1206
+ }, {
1207
+ name: string;
1208
+ path?: string | undefined;
1209
+ type?: string | undefined;
1210
+ description?: string | undefined;
1211
+ }>;
1212
+ stack: z.ZodObject<{
1213
+ languages: z.ZodDefault<z.ZodArray<z.ZodObject<{
1214
+ name: z.ZodString;
1215
+ version: z.ZodOptional<z.ZodString>;
1216
+ confidence: z.ZodDefault<z.ZodNumber>;
1217
+ source: z.ZodOptional<z.ZodString>;
1218
+ }, "strip", z.ZodTypeAny, {
1219
+ name: string;
1220
+ confidence: number;
1221
+ version?: string | undefined;
1222
+ source?: string | undefined;
1223
+ }, {
1224
+ name: string;
1225
+ version?: string | undefined;
1226
+ source?: string | undefined;
1227
+ confidence?: number | undefined;
1228
+ }>, "many">>;
1229
+ frameworks: z.ZodDefault<z.ZodArray<z.ZodObject<{
1230
+ name: z.ZodString;
1231
+ version: z.ZodOptional<z.ZodString>;
1232
+ confidence: z.ZodDefault<z.ZodNumber>;
1233
+ source: z.ZodOptional<z.ZodString>;
1234
+ }, "strip", z.ZodTypeAny, {
1235
+ name: string;
1236
+ confidence: number;
1237
+ version?: string | undefined;
1238
+ source?: string | undefined;
1239
+ }, {
1240
+ name: string;
1241
+ version?: string | undefined;
1242
+ source?: string | undefined;
1243
+ confidence?: number | undefined;
1244
+ }>, "many">>;
1245
+ libraries: z.ZodDefault<z.ZodArray<z.ZodObject<{
1246
+ name: z.ZodString;
1247
+ version: z.ZodOptional<z.ZodString>;
1248
+ confidence: z.ZodDefault<z.ZodNumber>;
1249
+ source: z.ZodOptional<z.ZodString>;
1250
+ }, "strip", z.ZodTypeAny, {
1251
+ name: string;
1252
+ confidence: number;
1253
+ version?: string | undefined;
1254
+ source?: string | undefined;
1255
+ }, {
1256
+ name: string;
1257
+ version?: string | undefined;
1258
+ source?: string | undefined;
1259
+ confidence?: number | undefined;
1260
+ }>, "many">>;
1261
+ styling: z.ZodDefault<z.ZodArray<z.ZodObject<{
1262
+ name: z.ZodString;
1263
+ version: z.ZodOptional<z.ZodString>;
1264
+ confidence: z.ZodDefault<z.ZodNumber>;
1265
+ source: z.ZodOptional<z.ZodString>;
1266
+ }, "strip", z.ZodTypeAny, {
1267
+ name: string;
1268
+ confidence: number;
1269
+ version?: string | undefined;
1270
+ source?: string | undefined;
1271
+ }, {
1272
+ name: string;
1273
+ version?: string | undefined;
1274
+ source?: string | undefined;
1275
+ confidence?: number | undefined;
1276
+ }>, "many">>;
1277
+ testing: z.ZodDefault<z.ZodArray<z.ZodObject<{
1278
+ name: z.ZodString;
1279
+ version: z.ZodOptional<z.ZodString>;
1280
+ confidence: z.ZodDefault<z.ZodNumber>;
1281
+ source: z.ZodOptional<z.ZodString>;
1282
+ }, "strip", z.ZodTypeAny, {
1283
+ name: string;
1284
+ confidence: number;
1285
+ version?: string | undefined;
1286
+ source?: string | undefined;
1287
+ }, {
1288
+ name: string;
1289
+ version?: string | undefined;
1290
+ source?: string | undefined;
1291
+ confidence?: number | undefined;
1292
+ }>, "many">>;
1293
+ databases: z.ZodDefault<z.ZodArray<z.ZodObject<{
1294
+ name: z.ZodString;
1295
+ version: z.ZodOptional<z.ZodString>;
1296
+ confidence: z.ZodDefault<z.ZodNumber>;
1297
+ source: z.ZodOptional<z.ZodString>;
1298
+ }, "strip", z.ZodTypeAny, {
1299
+ name: string;
1300
+ confidence: number;
1301
+ version?: string | undefined;
1302
+ source?: string | undefined;
1303
+ }, {
1304
+ name: string;
1305
+ version?: string | undefined;
1306
+ source?: string | undefined;
1307
+ confidence?: number | undefined;
1308
+ }>, "many">>;
1309
+ tools: z.ZodDefault<z.ZodArray<z.ZodObject<{
1310
+ name: z.ZodString;
1311
+ version: z.ZodOptional<z.ZodString>;
1312
+ confidence: z.ZodDefault<z.ZodNumber>;
1313
+ source: z.ZodOptional<z.ZodString>;
1314
+ }, "strip", z.ZodTypeAny, {
1315
+ name: string;
1316
+ confidence: number;
1317
+ version?: string | undefined;
1318
+ source?: string | undefined;
1319
+ }, {
1320
+ name: string;
1321
+ version?: string | undefined;
1322
+ source?: string | undefined;
1323
+ confidence?: number | undefined;
1324
+ }>, "many">>;
1325
+ runtime: z.ZodDefault<z.ZodArray<z.ZodObject<{
1326
+ name: z.ZodString;
1327
+ version: z.ZodOptional<z.ZodString>;
1328
+ confidence: z.ZodDefault<z.ZodNumber>;
1329
+ source: z.ZodOptional<z.ZodString>;
1330
+ }, "strip", z.ZodTypeAny, {
1331
+ name: string;
1332
+ confidence: number;
1333
+ version?: string | undefined;
1334
+ source?: string | undefined;
1335
+ }, {
1336
+ name: string;
1337
+ version?: string | undefined;
1338
+ source?: string | undefined;
1339
+ confidence?: number | undefined;
1340
+ }>, "many">>;
1341
+ }, "strip", z.ZodTypeAny, {
1342
+ testing: {
1343
+ name: string;
1344
+ confidence: number;
1345
+ version?: string | undefined;
1346
+ source?: string | undefined;
1347
+ }[];
1348
+ languages: {
1349
+ name: string;
1350
+ confidence: number;
1351
+ version?: string | undefined;
1352
+ source?: string | undefined;
1353
+ }[];
1354
+ frameworks: {
1355
+ name: string;
1356
+ confidence: number;
1357
+ version?: string | undefined;
1358
+ source?: string | undefined;
1359
+ }[];
1360
+ libraries: {
1361
+ name: string;
1362
+ confidence: number;
1363
+ version?: string | undefined;
1364
+ source?: string | undefined;
1365
+ }[];
1366
+ styling: {
1367
+ name: string;
1368
+ confidence: number;
1369
+ version?: string | undefined;
1370
+ source?: string | undefined;
1371
+ }[];
1372
+ databases: {
1373
+ name: string;
1374
+ confidence: number;
1375
+ version?: string | undefined;
1376
+ source?: string | undefined;
1377
+ }[];
1378
+ tools: {
1379
+ name: string;
1380
+ confidence: number;
1381
+ version?: string | undefined;
1382
+ source?: string | undefined;
1383
+ }[];
1384
+ runtime: {
1385
+ name: string;
1386
+ confidence: number;
1387
+ version?: string | undefined;
1388
+ source?: string | undefined;
1389
+ }[];
1390
+ }, {
1391
+ testing?: {
1392
+ name: string;
1393
+ version?: string | undefined;
1394
+ source?: string | undefined;
1395
+ confidence?: number | undefined;
1396
+ }[] | undefined;
1397
+ languages?: {
1398
+ name: string;
1399
+ version?: string | undefined;
1400
+ source?: string | undefined;
1401
+ confidence?: number | undefined;
1402
+ }[] | undefined;
1403
+ frameworks?: {
1404
+ name: string;
1405
+ version?: string | undefined;
1406
+ source?: string | undefined;
1407
+ confidence?: number | undefined;
1408
+ }[] | undefined;
1409
+ libraries?: {
1410
+ name: string;
1411
+ version?: string | undefined;
1412
+ source?: string | undefined;
1413
+ confidence?: number | undefined;
1414
+ }[] | undefined;
1415
+ styling?: {
1416
+ name: string;
1417
+ version?: string | undefined;
1418
+ source?: string | undefined;
1419
+ confidence?: number | undefined;
1420
+ }[] | undefined;
1421
+ databases?: {
1422
+ name: string;
1423
+ version?: string | undefined;
1424
+ source?: string | undefined;
1425
+ confidence?: number | undefined;
1426
+ }[] | undefined;
1427
+ tools?: {
1428
+ name: string;
1429
+ version?: string | undefined;
1430
+ source?: string | undefined;
1431
+ confidence?: number | undefined;
1432
+ }[] | undefined;
1433
+ runtime?: {
1434
+ name: string;
1435
+ version?: string | undefined;
1436
+ source?: string | undefined;
1437
+ confidence?: number | undefined;
1438
+ }[] | undefined;
1439
+ }>;
1440
+ patterns: z.ZodOptional<z.ZodObject<{
1441
+ components: z.ZodOptional<z.ZodString>;
1442
+ stateManagement: z.ZodOptional<z.ZodString>;
1443
+ apiStyle: z.ZodOptional<z.ZodString>;
1444
+ styling: z.ZodOptional<z.ZodString>;
1445
+ testing: z.ZodOptional<z.ZodString>;
1446
+ linting: z.ZodOptional<z.ZodString>;
1447
+ formatting: z.ZodOptional<z.ZodString>;
1448
+ }, "strip", z.ZodTypeAny, {
1449
+ testing?: string | undefined;
1450
+ styling?: string | undefined;
1451
+ components?: string | undefined;
1452
+ stateManagement?: string | undefined;
1453
+ apiStyle?: string | undefined;
1454
+ linting?: string | undefined;
1455
+ formatting?: string | undefined;
1456
+ }, {
1457
+ testing?: string | undefined;
1458
+ styling?: string | undefined;
1459
+ components?: string | undefined;
1460
+ stateManagement?: string | undefined;
1461
+ apiStyle?: string | undefined;
1462
+ linting?: string | undefined;
1463
+ formatting?: string | undefined;
1464
+ }>>;
1465
+ skills: z.ZodOptional<z.ZodObject<{
1466
+ installed: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1467
+ recommended: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1468
+ excluded: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1469
+ autoSync: z.ZodDefault<z.ZodBoolean>;
1470
+ securityLevel: z.ZodDefault<z.ZodEnum<["low", "medium", "high"]>>;
1471
+ testingRequired: z.ZodDefault<z.ZodBoolean>;
1472
+ }, "strip", z.ZodTypeAny, {
1473
+ autoSync: boolean;
1474
+ installed: string[];
1475
+ recommended: string[];
1476
+ excluded: string[];
1477
+ securityLevel: "low" | "medium" | "high";
1478
+ testingRequired: boolean;
1479
+ }, {
1480
+ autoSync?: boolean | undefined;
1481
+ installed?: string[] | undefined;
1482
+ recommended?: string[] | undefined;
1483
+ excluded?: string[] | undefined;
1484
+ securityLevel?: "low" | "medium" | "high" | undefined;
1485
+ testingRequired?: boolean | undefined;
1486
+ }>>;
1487
+ agents: z.ZodOptional<z.ZodObject<{
1488
+ primary: z.ZodOptional<z.ZodString>;
1489
+ detected: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1490
+ synced: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1491
+ disabled: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1492
+ }, "strip", z.ZodTypeAny, {
1493
+ detected: string[];
1494
+ synced: string[];
1495
+ disabled: string[];
1496
+ primary?: string | undefined;
1497
+ }, {
1498
+ primary?: string | undefined;
1499
+ detected?: string[] | undefined;
1500
+ synced?: string[] | undefined;
1501
+ disabled?: string[] | undefined;
1502
+ }>>;
1503
+ createdAt: z.ZodOptional<z.ZodString>;
1504
+ updatedAt: z.ZodOptional<z.ZodString>;
1505
+ }, "strip", z.ZodTypeAny, {
1506
+ version: 1;
1507
+ project: {
1508
+ name: string;
1509
+ path?: string | undefined;
1510
+ type?: string | undefined;
1511
+ description?: string | undefined;
1512
+ };
1513
+ stack: {
1514
+ testing: {
1515
+ name: string;
1516
+ confidence: number;
1517
+ version?: string | undefined;
1518
+ source?: string | undefined;
1519
+ }[];
1520
+ languages: {
1521
+ name: string;
1522
+ confidence: number;
1523
+ version?: string | undefined;
1524
+ source?: string | undefined;
1525
+ }[];
1526
+ frameworks: {
1527
+ name: string;
1528
+ confidence: number;
1529
+ version?: string | undefined;
1530
+ source?: string | undefined;
1531
+ }[];
1532
+ libraries: {
1533
+ name: string;
1534
+ confidence: number;
1535
+ version?: string | undefined;
1536
+ source?: string | undefined;
1537
+ }[];
1538
+ styling: {
1539
+ name: string;
1540
+ confidence: number;
1541
+ version?: string | undefined;
1542
+ source?: string | undefined;
1543
+ }[];
1544
+ databases: {
1545
+ name: string;
1546
+ confidence: number;
1547
+ version?: string | undefined;
1548
+ source?: string | undefined;
1549
+ }[];
1550
+ tools: {
1551
+ name: string;
1552
+ confidence: number;
1553
+ version?: string | undefined;
1554
+ source?: string | undefined;
1555
+ }[];
1556
+ runtime: {
1557
+ name: string;
1558
+ confidence: number;
1559
+ version?: string | undefined;
1560
+ source?: string | undefined;
1561
+ }[];
1562
+ };
1563
+ agents?: {
1564
+ detected: string[];
1565
+ synced: string[];
1566
+ disabled: string[];
1567
+ primary?: string | undefined;
1568
+ } | undefined;
1569
+ updatedAt?: string | undefined;
1570
+ skills?: {
1571
+ autoSync: boolean;
1572
+ installed: string[];
1573
+ recommended: string[];
1574
+ excluded: string[];
1575
+ securityLevel: "low" | "medium" | "high";
1576
+ testingRequired: boolean;
1577
+ } | undefined;
1578
+ patterns?: {
1579
+ testing?: string | undefined;
1580
+ styling?: string | undefined;
1581
+ components?: string | undefined;
1582
+ stateManagement?: string | undefined;
1583
+ apiStyle?: string | undefined;
1584
+ linting?: string | undefined;
1585
+ formatting?: string | undefined;
1586
+ } | undefined;
1587
+ createdAt?: string | undefined;
1588
+ }, {
1589
+ version: 1;
1590
+ project: {
1591
+ name: string;
1592
+ path?: string | undefined;
1593
+ type?: string | undefined;
1594
+ description?: string | undefined;
1595
+ };
1596
+ stack: {
1597
+ testing?: {
1598
+ name: string;
1599
+ version?: string | undefined;
1600
+ source?: string | undefined;
1601
+ confidence?: number | undefined;
1602
+ }[] | undefined;
1603
+ languages?: {
1604
+ name: string;
1605
+ version?: string | undefined;
1606
+ source?: string | undefined;
1607
+ confidence?: number | undefined;
1608
+ }[] | undefined;
1609
+ frameworks?: {
1610
+ name: string;
1611
+ version?: string | undefined;
1612
+ source?: string | undefined;
1613
+ confidence?: number | undefined;
1614
+ }[] | undefined;
1615
+ libraries?: {
1616
+ name: string;
1617
+ version?: string | undefined;
1618
+ source?: string | undefined;
1619
+ confidence?: number | undefined;
1620
+ }[] | undefined;
1621
+ styling?: {
1622
+ name: string;
1623
+ version?: string | undefined;
1624
+ source?: string | undefined;
1625
+ confidence?: number | undefined;
1626
+ }[] | undefined;
1627
+ databases?: {
1628
+ name: string;
1629
+ version?: string | undefined;
1630
+ source?: string | undefined;
1631
+ confidence?: number | undefined;
1632
+ }[] | undefined;
1633
+ tools?: {
1634
+ name: string;
1635
+ version?: string | undefined;
1636
+ source?: string | undefined;
1637
+ confidence?: number | undefined;
1638
+ }[] | undefined;
1639
+ runtime?: {
1640
+ name: string;
1641
+ version?: string | undefined;
1642
+ source?: string | undefined;
1643
+ confidence?: number | undefined;
1644
+ }[] | undefined;
1645
+ };
1646
+ agents?: {
1647
+ primary?: string | undefined;
1648
+ detected?: string[] | undefined;
1649
+ synced?: string[] | undefined;
1650
+ disabled?: string[] | undefined;
1651
+ } | undefined;
1652
+ updatedAt?: string | undefined;
1653
+ skills?: {
1654
+ autoSync?: boolean | undefined;
1655
+ installed?: string[] | undefined;
1656
+ recommended?: string[] | undefined;
1657
+ excluded?: string[] | undefined;
1658
+ securityLevel?: "low" | "medium" | "high" | undefined;
1659
+ testingRequired?: boolean | undefined;
1660
+ } | undefined;
1661
+ patterns?: {
1662
+ testing?: string | undefined;
1663
+ styling?: string | undefined;
1664
+ components?: string | undefined;
1665
+ stateManagement?: string | undefined;
1666
+ apiStyle?: string | undefined;
1667
+ linting?: string | undefined;
1668
+ formatting?: string | undefined;
1669
+ } | undefined;
1670
+ createdAt?: string | undefined;
1671
+ }>;
1672
+ type ProjectContext = z.infer<typeof ProjectContext>;
1673
+ /**
1674
+ * Context file location
1675
+ */
1676
+ declare const CONTEXT_FILE = ".skillkit/context.yaml";
1677
+ declare const CONTEXT_DIR = ".skillkit";
1678
+ /**
1679
+ * Detection source types
1680
+ */
1681
+ type DetectionSource = 'package.json' | 'tsconfig.json' | 'pyproject.toml' | 'Cargo.toml' | 'go.mod' | 'pubspec.yaml' | 'folder-structure' | 'config-file' | 'manual';
1682
+ /**
1683
+ * Project type hints based on detection
1684
+ */
1685
+ declare const PROJECT_TYPE_HINTS: Record<string, string[]>;
1686
+ /**
1687
+ * Context sync options
1688
+ */
1689
+ interface ContextSyncOptions {
1690
+ agents?: AgentType[];
1691
+ force?: boolean;
1692
+ dryRun?: boolean;
1693
+ skillsOnly?: boolean;
1694
+ }
1695
+ /**
1696
+ * Context export options
1697
+ */
1698
+ interface ContextExportOptions {
1699
+ output?: string;
1700
+ format?: 'yaml' | 'json';
1701
+ includeSkills?: boolean;
1702
+ includeAgents?: boolean;
1703
+ }
1704
+ /**
1705
+ * Context import options
1706
+ */
1707
+ interface ContextImportOptions {
1708
+ merge?: boolean;
1709
+ overwrite?: boolean;
1710
+ skipDetection?: boolean;
1711
+ }
1712
+
1713
+ /**
1714
+ * Project Detector
1715
+ *
1716
+ * Analyzes a project directory to detect the technology stack,
1717
+ * frameworks, libraries, and patterns used.
1718
+ */
1719
+ declare class ProjectDetector {
1720
+ private projectPath;
1721
+ private packageJson;
1722
+ private files;
1723
+ constructor(projectPath: string);
1724
+ /**
1725
+ * Analyze the project and return detected stack
1726
+ */
1727
+ analyze(): ProjectStack;
1728
+ /**
1729
+ * Detect project patterns and conventions
1730
+ */
1731
+ detectPatterns(): ProjectPatterns;
1732
+ /**
1733
+ * Detect project type
1734
+ */
1735
+ detectProjectType(): string;
1736
+ /**
1737
+ * Get project name
1738
+ */
1739
+ getProjectName(): string;
1740
+ /**
1741
+ * Get project description
1742
+ */
1743
+ getProjectDescription(): string | undefined;
1744
+ private loadPackageJson;
1745
+ private scanFiles;
1746
+ private getDependencies;
1747
+ private getVersion;
1748
+ private hasFile;
1749
+ private detectLanguages;
1750
+ private detectRuntime;
1751
+ private detectFromPatterns;
1752
+ }
1753
+ /**
1754
+ * Analyze a project and return the detected stack
1755
+ */
1756
+ declare function analyzeProject(projectPath: string): ProjectStack;
1757
+ /**
1758
+ * Get all relevant tags from a project stack
1759
+ */
1760
+ declare function getStackTags(stack: ProjectStack): string[];
1761
+
1762
+ /**
1763
+ * Context Manager
1764
+ *
1765
+ * Handles loading, saving, and managing project contexts.
1766
+ * The context is stored in .skillkit/context.yaml
1767
+ */
1768
+ declare class ContextManager {
1769
+ private projectPath;
1770
+ private context;
1771
+ constructor(projectPath?: string);
1772
+ /**
1773
+ * Get the context file path
1774
+ */
1775
+ getContextPath(): string;
1776
+ /**
1777
+ * Check if context exists
1778
+ */
1779
+ exists(): boolean;
1780
+ /**
1781
+ * Load context from file
1782
+ */
1783
+ load(): ProjectContext | null;
1784
+ /**
1785
+ * Save context to file
1786
+ */
1787
+ save(context: ProjectContext): void;
1788
+ /**
1789
+ * Initialize a new context from project detection
1790
+ */
1791
+ init(options?: {
1792
+ force?: boolean;
1793
+ skipDetection?: boolean;
1794
+ }): ProjectContext;
1795
+ /**
1796
+ * Update context with new detection
1797
+ */
1798
+ refresh(): ProjectContext;
1799
+ /**
1800
+ * Get current context (load if not loaded)
1801
+ */
1802
+ get(): ProjectContext | null;
1803
+ /**
1804
+ * Update skills in context
1805
+ */
1806
+ updateSkills(skills: Partial<SkillPreferences>): void;
1807
+ /**
1808
+ * Update agents in context
1809
+ */
1810
+ updateAgents(agents: Partial<AgentConfig>): void;
1811
+ /**
1812
+ * Set primary agent
1813
+ */
1814
+ setPrimaryAgent(agent: AgentType): void;
1815
+ /**
1816
+ * Add agent to synced list
1817
+ */
1818
+ addSyncedAgent(agent: AgentType): void;
1819
+ /**
1820
+ * Remove agent from synced list
1821
+ */
1822
+ removeSyncedAgent(agent: AgentType): void;
1823
+ /**
1824
+ * Add installed skill
1825
+ */
1826
+ addInstalledSkill(skillName: string): void;
1827
+ /**
1828
+ * Remove installed skill
1829
+ */
1830
+ removeInstalledSkill(skillName: string): void;
1831
+ /**
1832
+ * Export context to file
1833
+ */
1834
+ export(options?: ContextExportOptions): string;
1835
+ /**
1836
+ * Import context from content
1837
+ */
1838
+ import(content: string, options?: ContextImportOptions): ProjectContext;
1839
+ /**
1840
+ * Merge two contexts
1841
+ */
1842
+ private mergeContexts;
1843
+ /**
1844
+ * Merge two stacks
1845
+ */
1846
+ private mergeStacks;
1847
+ /**
1848
+ * Get empty stack
1849
+ */
1850
+ private getEmptyStack;
1851
+ /**
1852
+ * Get recommended skill tags based on stack
1853
+ */
1854
+ getRecommendedTags(): string[];
1855
+ }
1856
+ /**
1857
+ * Create a context manager for the current directory
1858
+ */
1859
+ declare function createContextManager(projectPath?: string): ContextManager;
1860
+ /**
1861
+ * Load context from the current directory
1862
+ */
1863
+ declare function loadContext(projectPath?: string): ProjectContext | null;
1864
+ /**
1865
+ * Initialize context in the current directory
1866
+ */
1867
+ declare function initContext(projectPath?: string, options?: {
1868
+ force?: boolean;
1869
+ }): ProjectContext;
1870
+
1871
+ /**
1872
+ * Result of a sync operation
1873
+ */
1874
+ interface SyncResult {
1875
+ success: boolean;
1876
+ agent: AgentType;
1877
+ skillsSynced: number;
1878
+ skillsSkipped: number;
1879
+ errors: string[];
1880
+ warnings: string[];
1881
+ files: string[];
1882
+ }
1883
+ /**
1884
+ * Overall sync report
1885
+ */
1886
+ interface SyncReport {
1887
+ totalAgents: number;
1888
+ successfulAgents: number;
1889
+ totalSkills: number;
1890
+ results: SyncResult[];
1891
+ }
1892
+ /**
1893
+ * Context Sync
1894
+ *
1895
+ * Handles syncing skills across multiple AI agents.
1896
+ * Skills are translated to the appropriate format for each agent.
1897
+ */
1898
+ declare class ContextSync {
1899
+ private projectPath;
1900
+ private contextManager;
1901
+ constructor(projectPath?: string);
1902
+ /**
1903
+ * Detect which agents are installed/configured on the system
1904
+ */
1905
+ detectAgents(): AgentType[];
1906
+ /**
1907
+ * Get agents to sync to based on context
1908
+ */
1909
+ getTargetAgents(options?: ContextSyncOptions): AgentType[];
1910
+ /**
1911
+ * Sync all skills to all target agents
1912
+ */
1913
+ syncAll(options?: ContextSyncOptions): Promise<SyncReport>;
1914
+ /**
1915
+ * Sync skills to a specific agent
1916
+ */
1917
+ syncToAgent(agent: AgentType, skills?: Array<{
1918
+ name: string;
1919
+ path: string;
1920
+ }>, options?: ContextSyncOptions): Promise<SyncResult>;
1921
+ /**
1922
+ * Sync a single skill to an agent
1923
+ */
1924
+ private syncSkill;
1925
+ /**
1926
+ * Copy additional skill assets (references, scripts, etc.)
1927
+ */
1928
+ private copySkillAssets;
1929
+ /**
1930
+ * Get source skills to sync
1931
+ */
1932
+ private getSourceSkills;
1933
+ /**
1934
+ * Check sync status - which agents have which skills
1935
+ */
1936
+ checkStatus(): Record<AgentType, {
1937
+ hasSkills: boolean;
1938
+ skillCount: number;
1939
+ skills: string[];
1940
+ }>;
1941
+ }
1942
+ /**
1943
+ * Create a context sync instance
1944
+ */
1945
+ declare function createContextSync(projectPath?: string): ContextSync;
1946
+ /**
1947
+ * Sync skills to all detected agents
1948
+ */
1949
+ declare function syncToAllAgents(projectPath?: string, options?: ContextSyncOptions): Promise<SyncReport>;
1950
+ /**
1951
+ * Sync skills to a specific agent
1952
+ */
1953
+ declare function syncToAgent(agent: AgentType, projectPath?: string, options?: ContextSyncOptions): Promise<SyncResult>;
1954
+
1955
+ /**
1956
+ * Skill summary for recommendation matching
1957
+ */
1958
+ declare const SkillSummary: z.ZodObject<{
1959
+ name: z.ZodString;
1960
+ description: z.ZodOptional<z.ZodString>;
1961
+ source: z.ZodOptional<z.ZodString>;
1962
+ tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1963
+ compatibility: z.ZodOptional<z.ZodObject<{
1964
+ frameworks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1965
+ languages: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1966
+ libraries: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1967
+ minVersion: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1968
+ }, "strip", z.ZodTypeAny, {
1969
+ languages: string[];
1970
+ frameworks: string[];
1971
+ libraries: string[];
1972
+ minVersion?: Record<string, string> | undefined;
1973
+ }, {
1974
+ languages?: string[] | undefined;
1975
+ frameworks?: string[] | undefined;
1976
+ libraries?: string[] | undefined;
1977
+ minVersion?: Record<string, string> | undefined;
1978
+ }>>;
1979
+ popularity: z.ZodDefault<z.ZodNumber>;
1980
+ quality: z.ZodDefault<z.ZodNumber>;
1981
+ lastUpdated: z.ZodOptional<z.ZodString>;
1982
+ verified: z.ZodDefault<z.ZodBoolean>;
1983
+ }, "strip", z.ZodTypeAny, {
1984
+ name: string;
1985
+ tags: string[];
1986
+ popularity: number;
1987
+ quality: number;
1988
+ verified: boolean;
1989
+ description?: string | undefined;
1990
+ compatibility?: {
1991
+ languages: string[];
1992
+ frameworks: string[];
1993
+ libraries: string[];
1994
+ minVersion?: Record<string, string> | undefined;
1995
+ } | undefined;
1996
+ source?: string | undefined;
1997
+ lastUpdated?: string | undefined;
1998
+ }, {
1999
+ name: string;
2000
+ description?: string | undefined;
2001
+ compatibility?: {
2002
+ languages?: string[] | undefined;
2003
+ frameworks?: string[] | undefined;
2004
+ libraries?: string[] | undefined;
2005
+ minVersion?: Record<string, string> | undefined;
2006
+ } | undefined;
2007
+ tags?: string[] | undefined;
2008
+ source?: string | undefined;
2009
+ popularity?: number | undefined;
2010
+ quality?: number | undefined;
2011
+ lastUpdated?: string | undefined;
2012
+ verified?: boolean | undefined;
2013
+ }>;
2014
+ type SkillSummary = z.infer<typeof SkillSummary>;
2015
+ /**
2016
+ * Scored skill with match explanation
2017
+ */
2018
+ interface ScoredSkill {
2019
+ skill: SkillSummary;
2020
+ score: number;
2021
+ reasons: MatchReason[];
2022
+ warnings: string[];
2023
+ }
2024
+ /**
2025
+ * Match reason with category and weight
2026
+ */
2027
+ interface MatchReason {
2028
+ category: MatchCategory;
2029
+ description: string;
2030
+ weight: number;
2031
+ matched: string[];
2032
+ }
2033
+ /**
2034
+ * Categories of matching
2035
+ */
2036
+ type MatchCategory = 'framework' | 'language' | 'library' | 'tag' | 'pattern' | 'popularity' | 'quality' | 'freshness';
2037
+ /**
2038
+ * Weight configuration for scoring
2039
+ */
2040
+ interface ScoringWeights {
2041
+ framework: number;
2042
+ language: number;
2043
+ library: number;
2044
+ tag: number;
2045
+ popularity: number;
2046
+ quality: number;
2047
+ freshness: number;
2048
+ }
2049
+ declare const DEFAULT_SCORING_WEIGHTS: ScoringWeights;
2050
+ /**
2051
+ * Project profile for matching (derived from ProjectContext)
2052
+ */
2053
+ interface ProjectProfile {
2054
+ name: string;
2055
+ type?: string;
2056
+ stack: ProjectStack;
2057
+ patterns?: {
2058
+ components?: string;
2059
+ stateManagement?: string;
2060
+ apiStyle?: string;
2061
+ styling?: string;
2062
+ testing?: string;
2063
+ };
2064
+ installedSkills: string[];
2065
+ excludedSkills: string[];
2066
+ }
2067
+ /**
2068
+ * Skill index for efficient lookup
2069
+ */
2070
+ interface SkillIndex {
2071
+ version: number;
2072
+ lastUpdated: string;
2073
+ skills: SkillSummary[];
2074
+ sources: IndexSource[];
2075
+ }
2076
+ /**
2077
+ * Source repository in the index
2078
+ */
2079
+ interface IndexSource {
2080
+ name: string;
2081
+ url: string;
2082
+ lastFetched: string;
2083
+ skillCount: number;
2084
+ }
2085
+ /**
2086
+ * Recommendation options
2087
+ */
2088
+ interface RecommendOptions {
2089
+ limit?: number;
2090
+ minScore?: number;
2091
+ categories?: string[];
2092
+ excludeInstalled?: boolean;
2093
+ weights?: Partial<ScoringWeights>;
2094
+ includeReasons?: boolean;
2095
+ }
2096
+ /**
2097
+ * Recommendation result
2098
+ */
2099
+ interface RecommendationResult {
2100
+ recommendations: ScoredSkill[];
2101
+ profile: ProjectProfile;
2102
+ totalSkillsScanned: number;
2103
+ timestamp: string;
2104
+ }
2105
+ /**
2106
+ * Search options for task-based search
2107
+ */
2108
+ interface SearchOptions {
2109
+ query: string;
2110
+ limit?: number;
2111
+ semantic?: boolean;
2112
+ filters?: {
2113
+ tags?: string[];
2114
+ minScore?: number;
2115
+ verified?: boolean;
2116
+ };
2117
+ }
2118
+ /**
2119
+ * Search result
2120
+ */
2121
+ interface SearchResult {
2122
+ skill: SkillSummary;
2123
+ relevance: number;
2124
+ matchedTerms: string[];
2125
+ snippet?: string;
2126
+ }
2127
+ /**
2128
+ * Freshness check result
2129
+ */
2130
+ interface FreshnessResult {
2131
+ skill: string;
2132
+ status: 'current' | 'outdated' | 'unknown';
2133
+ details?: {
2134
+ skillVersion?: string;
2135
+ projectVersion?: string;
2136
+ message: string;
2137
+ };
2138
+ }
2139
+ /**
2140
+ * Tag to technology mapping for smart inference
2141
+ */
2142
+ declare const TAG_TO_TECH: Record<string, string[]>;
2143
+ /**
2144
+ * Reverse mapping: tech to tags
2145
+ */
2146
+ declare function getTechTags(techName: string): string[];
2147
+
2148
+ /**
2149
+ * Recommendation engine for matching skills to project profiles
2150
+ */
2151
+ declare class RecommendationEngine {
2152
+ private weights;
2153
+ private index;
2154
+ constructor(weights?: Partial<ScoringWeights>);
2155
+ /**
2156
+ * Load skill index from cache or generate from local skills
2157
+ */
2158
+ loadIndex(index: SkillIndex): void;
2159
+ /**
2160
+ * Get loaded index
2161
+ */
2162
+ getIndex(): SkillIndex | null;
2163
+ /**
2164
+ * Score a single skill against a project profile
2165
+ */
2166
+ scoreSkill(profile: ProjectProfile, skill: SkillSummary): ScoredSkill;
2167
+ /**
2168
+ * Match frameworks in project stack against skill
2169
+ */
2170
+ private matchFrameworks;
2171
+ /**
2172
+ * Match languages in project stack against skill
2173
+ */
2174
+ private matchLanguages;
2175
+ /**
2176
+ * Match libraries in project stack against skill
2177
+ */
2178
+ private matchLibraries;
2179
+ /**
2180
+ * Match tags based on project patterns and type
2181
+ */
2182
+ private matchTags;
2183
+ /**
2184
+ * Extract relevant tags from project profile
2185
+ */
2186
+ private extractProjectTags;
2187
+ /**
2188
+ * Score based on popularity (downloads/stars)
2189
+ */
2190
+ private scorePopularity;
2191
+ /**
2192
+ * Score based on quality metrics
2193
+ */
2194
+ private scoreQuality;
2195
+ /**
2196
+ * Score based on freshness (last update)
2197
+ */
2198
+ private scoreFreshness;
2199
+ /**
2200
+ * Find detected version for a technology
2201
+ */
2202
+ private findDetectedVersion;
2203
+ /**
2204
+ * Compare semantic versions (basic implementation)
2205
+ */
2206
+ private isVersionLower;
2207
+ /**
2208
+ * Get top recommendations for a project profile
2209
+ */
2210
+ recommend(profile: ProjectProfile, options?: RecommendOptions): RecommendationResult;
2211
+ /**
2212
+ * Search skills by query (task-based search)
2213
+ */
2214
+ search(options: SearchOptions): SearchResult[];
2215
+ /**
2216
+ * Calculate search relevance for a skill
2217
+ */
2218
+ private calculateRelevance;
2219
+ /**
2220
+ * Check freshness of installed skills against project dependencies
2221
+ *
2222
+ * A skill is considered:
2223
+ * - 'current': skill's minVersion is <= project version (compatible and up to date)
2224
+ * - 'outdated': skill targets a significantly older major version
2225
+ * - 'unknown': no version requirements specified
2226
+ */
2227
+ checkFreshness(profile: ProjectProfile, installedSkills: SkillSummary[]): FreshnessResult[];
2228
+ }
2229
+ /**
2230
+ * Create a recommendation engine with default settings
2231
+ */
2232
+ declare function createRecommendationEngine(weights?: Partial<ScoringWeights>): RecommendationEngine;
2233
+
2234
+ export { AGENT_FORMAT_MAP, type AgentAdapterInfo, AgentConfig, AgentType, BitbucketProvider, CONTEXT_DIR, CONTEXT_FILE, type CanonicalSkill, type CloneOptions, type CloneResult, type CommandResult, type ContextExportOptions, type ContextImportOptions, ContextManager, ContextSync, type ContextSyncOptions, CopilotTranslator, CursorTranslator, DEFAULT_SCORING_WEIGHTS, DependencyInfo, Detection, type DetectionSource, type DiscoveredSkill, type FormatCategory, type FormatTranslator, type FreshnessResult, GitHubProvider, GitLabProvider, GitProvider, type GitProviderAdapter, type IndexSource, type InstallOptions, LocalProvider, type MatchCategory, type MatchReason, PROJECT_TYPE_HINTS, ProjectContext, ProjectDetector, ProjectPatterns, type ProjectProfile, ProjectStack, type RecommendOptions, RecommendationEngine, type RecommendationResult, type RegistrySkill, SKILL_DISCOVERY_PATHS, type ScoredSkill, type ScoringWeights, type SearchOptions, type SearchResult, Skill, SkillFrontmatter, type SkillIndex, SkillLocation, SkillMdTranslator, SkillMetadata, SkillPreferences, SkillSummary, SkillkitConfig, type SyncOptions, type SyncReport, type SyncResult, TAG_TO_TECH, TranslatableSkillFrontmatter, type TranslationOptions, type TranslationPath, type TranslationResult, TranslatorRegistry, type UpdateOptions, WindsurfTranslator, analyzeProject, canTranslate, copilotTranslator, createContextManager, createContextSync, createRecommendationEngine, cursorTranslator, detectProvider, detectSkillFormat, discoverSkills, extractField, extractFrontmatter, findAllSkills, findSkill, getAgentConfigPath, getAllProviders, getGlobalConfigPath, getInstallDir, getProjectConfigPath, getProvider, getSearchDirs, getStackTags, getSupportedTranslationAgents, getTechTags, initContext, initProject, isGitUrl, isLocalPath, isPathInside, loadConfig, loadContext, loadMetadata, loadSkillMetadata, parseShorthand, parseSkill, parseSkillContent, parseSource, readSkillContent, saveConfig, saveSkillMetadata, setSkillEnabled, skillMdTranslator, syncToAgent, syncToAllAgents, translateSkill, translateSkillFile, translatorRegistry, validateSkill, windsurfTranslator };