skilld 1.7.2 → 1.7.4
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/dist/_chunks/agent.mjs +693 -599
- package/dist/_chunks/agent.mjs.map +1 -1
- package/dist/_chunks/assemble.mjs +3 -3
- package/dist/_chunks/assemble.mjs.map +1 -1
- package/dist/_chunks/author-group.mjs.map +1 -1
- package/dist/_chunks/author.mjs +51 -121
- package/dist/_chunks/author.mjs.map +1 -1
- package/dist/_chunks/cache.mjs +315 -9
- package/dist/_chunks/cache.mjs.map +1 -1
- package/dist/_chunks/cache2.mjs +2 -2
- package/dist/_chunks/cache2.mjs.map +1 -1
- package/dist/_chunks/cli-helpers.mjs +3 -3
- package/dist/_chunks/cli-helpers.mjs.map +1 -1
- package/dist/_chunks/core.mjs +7 -4
- package/dist/_chunks/detect.mjs +1 -1
- package/dist/_chunks/detect.mjs.map +1 -1
- package/dist/_chunks/embedding-cache2.mjs +2 -2
- package/dist/_chunks/embedding-cache2.mjs.map +1 -1
- package/dist/_chunks/index.d.mts +305 -112
- package/dist/_chunks/index.d.mts.map +1 -1
- package/dist/_chunks/index2.d.mts +267 -32
- package/dist/_chunks/index2.d.mts.map +1 -1
- package/dist/_chunks/index3.d.mts +32 -577
- package/dist/_chunks/index3.d.mts.map +1 -1
- package/dist/_chunks/index4.d.mts +553 -0
- package/dist/_chunks/index4.d.mts.map +1 -0
- package/dist/_chunks/install.mjs +48 -88
- package/dist/_chunks/install.mjs.map +1 -1
- package/dist/_chunks/list.mjs +1 -1
- package/dist/_chunks/list.mjs.map +1 -1
- package/dist/_chunks/lockfile.mjs +29 -6
- package/dist/_chunks/lockfile.mjs.map +1 -1
- package/dist/_chunks/markdown.mjs.map +1 -1
- package/dist/_chunks/monorepo.mjs +71 -0
- package/dist/_chunks/monorepo.mjs.map +1 -0
- package/dist/_chunks/package-json.mjs.map +1 -1
- package/dist/_chunks/{shared.mjs → package-registry.mjs} +2 -40
- package/dist/_chunks/package-registry.mjs.map +1 -0
- package/dist/_chunks/paths.mjs +49 -0
- package/dist/_chunks/paths.mjs.map +1 -0
- package/dist/_chunks/pool2.mjs +7 -2
- package/dist/_chunks/pool2.mjs.map +1 -1
- package/dist/_chunks/prepare.mjs +1 -1
- package/dist/_chunks/prepare.mjs.map +1 -1
- package/dist/_chunks/prepare2.mjs +5 -5
- package/dist/_chunks/prepare2.mjs.map +1 -1
- package/dist/_chunks/prompts.mjs +366 -18
- package/dist/_chunks/prompts.mjs.map +1 -1
- package/dist/_chunks/retriv.mjs.map +1 -1
- package/dist/_chunks/sanitize.mjs.map +1 -1
- package/dist/_chunks/search-helpers.mjs +5 -6
- package/dist/_chunks/search-helpers.mjs.map +1 -1
- package/dist/_chunks/search-interactive.mjs +1 -1
- package/dist/_chunks/search-interactive.mjs.map +1 -1
- package/dist/_chunks/search.mjs +1 -2
- package/dist/_chunks/search.mjs.map +1 -1
- package/dist/_chunks/semver.mjs +13 -0
- package/dist/_chunks/semver.mjs.map +1 -0
- package/dist/_chunks/setup.mjs.map +1 -1
- package/dist/_chunks/skill-installer.mjs +2 -0
- package/dist/_chunks/skill-installer2.mjs +155 -0
- package/dist/_chunks/skill-installer2.mjs.map +1 -0
- package/dist/_chunks/skills.mjs +10 -9
- package/dist/_chunks/skills.mjs.map +1 -1
- package/dist/_chunks/sources.mjs +575 -386
- package/dist/_chunks/sources.mjs.map +1 -1
- package/dist/_chunks/sync-pipeline.mjs +952 -0
- package/dist/_chunks/sync-pipeline.mjs.map +1 -0
- package/dist/_chunks/sync-registry.mjs +19 -13
- package/dist/_chunks/sync-registry.mjs.map +1 -1
- package/dist/_chunks/sync.mjs +797 -886
- package/dist/_chunks/sync.mjs.map +1 -1
- package/dist/_chunks/sync2.mjs +4 -2
- package/dist/_chunks/types.d.mts +65 -77
- package/dist/_chunks/types.d.mts.map +1 -1
- package/dist/_chunks/types2.d.mts +88 -0
- package/dist/_chunks/types2.d.mts.map +1 -0
- package/dist/_chunks/uninstall.mjs +7 -8
- package/dist/_chunks/uninstall.mjs.map +1 -1
- package/dist/_chunks/upload.mjs +2 -2
- package/dist/_chunks/upload.mjs.map +1 -1
- package/dist/_chunks/validate.mjs +1 -1
- package/dist/_chunks/validate.mjs.map +1 -1
- package/dist/_chunks/version.mjs +3 -13
- package/dist/_chunks/version.mjs.map +1 -1
- package/dist/_chunks/wizard.mjs +2 -2
- package/dist/_chunks/wizard.mjs.map +1 -1
- package/dist/_chunks/yaml.mjs.map +1 -1
- package/dist/agent/index.d.mts +2 -346
- package/dist/agent/index.mjs +2 -3
- package/dist/cache/index.d.mts +2 -2
- package/dist/cache/index.mjs +4 -3
- package/dist/cli.mjs +12 -13
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +5 -4
- package/dist/index.mjs +4 -3
- package/dist/prepare.mjs +2 -2
- package/dist/prepare.mjs.map +1 -1
- package/dist/retriv/index.d.mts +2 -2
- package/dist/retriv/worker.d.mts +2 -1
- package/dist/retriv/worker.d.mts.map +1 -1
- package/dist/retriv/worker.mjs +2 -1
- package/dist/retriv/worker.mjs.map +1 -1
- package/dist/sources/index.d.mts +3 -2
- package/dist/sources/index.mjs +3 -3
- package/dist/types.d.mts +3 -3
- package/package.json +5 -5
- package/dist/_chunks/config.mjs +0 -122
- package/dist/_chunks/config.mjs.map +0 -1
- package/dist/_chunks/prefix.mjs +0 -108
- package/dist/_chunks/prefix.mjs.map +0 -1
- package/dist/_chunks/shared.mjs.map +0 -1
- package/dist/_chunks/skill.mjs +0 -329
- package/dist/_chunks/skill.mjs.map +0 -1
- package/dist/_chunks/sync-shared.mjs +0 -2
- package/dist/_chunks/sync-shared2.mjs +0 -1020
- package/dist/_chunks/sync-shared2.mjs.map +0 -1
- package/dist/agent/index.d.mts.map +0 -1
package/dist/agent/index.d.mts
CHANGED
|
@@ -1,346 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
issues: boolean;
|
|
4
|
-
discussions: boolean;
|
|
5
|
-
releases: boolean;
|
|
6
|
-
}
|
|
7
|
-
interface SectionValidationWarning {
|
|
8
|
-
warning: string;
|
|
9
|
-
}
|
|
10
|
-
interface CustomPrompt {
|
|
11
|
-
heading: string;
|
|
12
|
-
body: string;
|
|
13
|
-
}
|
|
14
|
-
type SkillSection = 'api-changes' | 'best-practices' | 'custom';
|
|
15
|
-
/** Output file per section (inside .skilld/) */
|
|
16
|
-
declare const SECTION_OUTPUT_FILES: Record<SkillSection, string>;
|
|
17
|
-
/** Merge order for final SKILL.md body */
|
|
18
|
-
declare const SECTION_MERGE_ORDER: SkillSection[];
|
|
19
|
-
/** Wrap section content with HTML comment markers for targeted re-assembly */
|
|
20
|
-
declare function wrapSection(section: SkillSection, content: string): string;
|
|
21
|
-
/** Extract marker-delimited sections from existing SKILL.md */
|
|
22
|
-
declare function extractMarkedSections(md: string): Map<SkillSection, {
|
|
23
|
-
start: number;
|
|
24
|
-
end: number;
|
|
25
|
-
}>;
|
|
26
|
-
interface BuildSkillPromptOptions {
|
|
27
|
-
packageName: string;
|
|
28
|
-
/** Absolute path to skill directory with ./.skilld/ */
|
|
29
|
-
skillDir: string;
|
|
30
|
-
/** Package version (e.g., "3.5.13") */
|
|
31
|
-
version?: string;
|
|
32
|
-
/** Has GitHub issues indexed */
|
|
33
|
-
hasIssues?: boolean;
|
|
34
|
-
/** Has GitHub discussions indexed */
|
|
35
|
-
hasDiscussions?: boolean;
|
|
36
|
-
/** Has release notes */
|
|
37
|
-
hasReleases?: boolean;
|
|
38
|
-
/** CHANGELOG filename if found in package (e.g. CHANGELOG.md, changelog.md) */
|
|
39
|
-
hasChangelog?: string | false;
|
|
40
|
-
/** Resolved absolute paths to .md doc files */
|
|
41
|
-
docFiles?: string[];
|
|
42
|
-
/** Doc source type */
|
|
43
|
-
docsType?: 'llms.txt' | 'readme' | 'docs';
|
|
44
|
-
/** Package ships its own docs */
|
|
45
|
-
hasShippedDocs?: boolean;
|
|
46
|
-
/** Custom instructions from the user (when 'custom' section selected) */
|
|
47
|
-
customPrompt?: CustomPrompt;
|
|
48
|
-
/** Resolved feature flags */
|
|
49
|
-
features?: FeaturesConfig;
|
|
50
|
-
/** Total number of enabled sections — adjusts per-section line budgets */
|
|
51
|
-
enabledSectionCount?: number;
|
|
52
|
-
/** Key files from the package (e.g., dist/pkg.d.ts) — surfaced in prompt for tool hints */
|
|
53
|
-
pkgFiles?: string[];
|
|
54
|
-
/** Lines consumed by SKILL.md overhead (frontmatter + header + search + footer) */
|
|
55
|
-
overheadLines?: number;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Get the validate function for a section using default context (validators use fixed thresholds).
|
|
59
|
-
* Returns null if section has no validator.
|
|
60
|
-
*/
|
|
61
|
-
declare function getSectionValidator(section: SkillSection): ((content: string) => SectionValidationWarning[]) | null;
|
|
62
|
-
/**
|
|
63
|
-
* Build prompt for a single section
|
|
64
|
-
*/
|
|
65
|
-
declare function buildSectionPrompt(opts: BuildSkillPromptOptions & {
|
|
66
|
-
section: SkillSection;
|
|
67
|
-
}): string;
|
|
68
|
-
/**
|
|
69
|
-
* Build prompts for all selected sections, sharing the computed preamble
|
|
70
|
-
*/
|
|
71
|
-
declare function buildAllSectionPrompts(opts: BuildSkillPromptOptions & {
|
|
72
|
-
sections: SkillSection[];
|
|
73
|
-
}): Map<SkillSection, string>;
|
|
74
|
-
/**
|
|
75
|
-
* Transform an agent-specific prompt into a portable prompt for any LLM.
|
|
76
|
-
* - Rewrites .skilld/ paths → ./references/
|
|
77
|
-
* - Strips ## Output section (file-writing instructions)
|
|
78
|
-
* - Strips skilld search/validate instructions
|
|
79
|
-
* - Replaces tool-specific language with generic equivalents
|
|
80
|
-
* - Strips agent-specific rules
|
|
81
|
-
*/
|
|
82
|
-
declare function portabilizePrompt(prompt: string, section?: SkillSection): string;
|
|
83
|
-
interface SkillOptions {
|
|
84
|
-
name: string;
|
|
85
|
-
version?: string;
|
|
86
|
-
releasedAt?: string;
|
|
87
|
-
/** npm dist-tags with version and release date */
|
|
88
|
-
distTags?: Record<string, {
|
|
89
|
-
version: string;
|
|
90
|
-
releasedAt?: string;
|
|
91
|
-
}>;
|
|
92
|
-
globs?: string[];
|
|
93
|
-
description?: string;
|
|
94
|
-
/** LLM-generated body — replaces default heading + description */
|
|
95
|
-
body?: string;
|
|
96
|
-
relatedSkills: string[];
|
|
97
|
-
hasIssues?: boolean;
|
|
98
|
-
hasDiscussions?: boolean;
|
|
99
|
-
hasReleases?: boolean;
|
|
100
|
-
hasChangelog?: string | false;
|
|
101
|
-
docsType?: 'llms.txt' | 'readme' | 'docs';
|
|
102
|
-
hasShippedDocs?: boolean;
|
|
103
|
-
/** Key files in package (entry points + docs) */
|
|
104
|
-
pkgFiles?: string[];
|
|
105
|
-
/** Model used to generate LLM sections */
|
|
106
|
-
generatedBy?: string;
|
|
107
|
-
/** Override directory name for frontmatter (repo-based, e.g. "vuejs-core") */
|
|
108
|
-
dirName?: string;
|
|
109
|
-
/** All packages tracked by this skill (multi-package skills) */
|
|
110
|
-
packages?: Array<{
|
|
111
|
-
name: string;
|
|
112
|
-
}>;
|
|
113
|
-
/** GitHub repo URL (owner/repo format or full URL) */
|
|
114
|
-
repoUrl?: string;
|
|
115
|
-
/** Resolved feature flags */
|
|
116
|
-
features?: FeaturesConfig;
|
|
117
|
-
/** Eject mode: use ./references/ paths instead of ./.skilld/ for portable skills */
|
|
118
|
-
eject?: boolean;
|
|
119
|
-
}
|
|
120
|
-
declare function writeSkillMd(skillDir: string, content: string): void;
|
|
121
|
-
declare function writeGeneratedSkillMd(skillDir: string, opts: SkillOptions): string;
|
|
122
|
-
declare function generateSkillMd(opts: SkillOptions): string;
|
|
123
|
-
/**
|
|
124
|
-
* Agent types and interfaces
|
|
125
|
-
*/
|
|
126
|
-
type AgentType = 'claude-code' | 'cursor' | 'windsurf' | 'cline' | 'codex' | 'github-copilot' | 'gemini-cli' | 'goose' | 'amp' | 'opencode' | 'roo' | 'antigravity';
|
|
127
|
-
interface SkillMetadata {
|
|
128
|
-
name: string;
|
|
129
|
-
version?: string;
|
|
130
|
-
/** ISO date string when this version was released */
|
|
131
|
-
releasedAt?: string;
|
|
132
|
-
description?: string;
|
|
133
|
-
}
|
|
134
|
-
type OptimizeModel = 'opus' | 'sonnet' | 'haiku' | 'gemini-3.1-pro' | 'gemini-3-flash' | 'gpt-5.3-codex' | 'gpt-5.3-codex-spark' | 'gpt-5.2-codex' | `pi:${string}`;
|
|
135
|
-
interface ModelInfo {
|
|
136
|
-
id: OptimizeModel;
|
|
137
|
-
name: string;
|
|
138
|
-
hint: string;
|
|
139
|
-
recommended?: boolean;
|
|
140
|
-
agentId: string;
|
|
141
|
-
agentName: string;
|
|
142
|
-
/** Grouping key for provider selection (e.g. 'claude-code', 'pi:anthropic') */
|
|
143
|
-
provider: string;
|
|
144
|
-
/** Human-readable provider name */
|
|
145
|
-
providerName: string;
|
|
146
|
-
/** Normalized vendor name for UI grouping (e.g. 'Anthropic') — merges CLI and API entries */
|
|
147
|
-
vendorGroup: string;
|
|
148
|
-
}
|
|
149
|
-
interface StreamProgress {
|
|
150
|
-
chunk: string;
|
|
151
|
-
type: 'reasoning' | 'text';
|
|
152
|
-
text: string;
|
|
153
|
-
reasoning: string;
|
|
154
|
-
section?: SkillSection;
|
|
155
|
-
}
|
|
156
|
-
interface OptimizeDocsOptions {
|
|
157
|
-
packageName: string;
|
|
158
|
-
skillDir: string;
|
|
159
|
-
model?: OptimizeModel;
|
|
160
|
-
version?: string;
|
|
161
|
-
hasGithub?: boolean;
|
|
162
|
-
hasReleases?: boolean;
|
|
163
|
-
hasChangelog?: string | false;
|
|
164
|
-
docFiles?: string[];
|
|
165
|
-
docsType?: 'llms.txt' | 'readme' | 'docs';
|
|
166
|
-
hasShippedDocs?: boolean;
|
|
167
|
-
onProgress?: (progress: StreamProgress) => void;
|
|
168
|
-
timeout?: number;
|
|
169
|
-
verbose?: boolean;
|
|
170
|
-
debug?: boolean;
|
|
171
|
-
noCache?: boolean;
|
|
172
|
-
/** Which sections to generate */
|
|
173
|
-
sections?: SkillSection[];
|
|
174
|
-
/** Custom instructions from the user */
|
|
175
|
-
customPrompt?: CustomPrompt;
|
|
176
|
-
/** Resolved feature flags */
|
|
177
|
-
features?: FeaturesConfig;
|
|
178
|
-
/** Key files from the package (e.g., dist/pkg.d.ts) */
|
|
179
|
-
pkgFiles?: string[];
|
|
180
|
-
/** Lines consumed by SKILL.md overhead (frontmatter + header + search + footer) */
|
|
181
|
-
overheadLines?: number;
|
|
182
|
-
}
|
|
183
|
-
interface OptimizeResult {
|
|
184
|
-
optimized: string;
|
|
185
|
-
wasOptimized: boolean;
|
|
186
|
-
error?: string;
|
|
187
|
-
warnings?: string[];
|
|
188
|
-
reasoning?: string;
|
|
189
|
-
finishReason?: string;
|
|
190
|
-
usage?: {
|
|
191
|
-
inputTokens: number;
|
|
192
|
-
outputTokens: number;
|
|
193
|
-
totalTokens: number;
|
|
194
|
-
};
|
|
195
|
-
cost?: number;
|
|
196
|
-
debugLogsDir?: string;
|
|
197
|
-
}
|
|
198
|
-
interface ToolProgressLog {
|
|
199
|
-
message: (msg: string) => void;
|
|
200
|
-
}
|
|
201
|
-
/** Create a progress callback that emits one line per tool call, Claude Code style */
|
|
202
|
-
declare function createToolProgress(log: ToolProgressLog): (progress: StreamProgress) => void;
|
|
203
|
-
declare function getModelName(id: OptimizeModel): string;
|
|
204
|
-
declare function getModelLabel(id: OptimizeModel): string;
|
|
205
|
-
declare function getAvailableModels(): Promise<ModelInfo[]>;
|
|
206
|
-
declare function optimizeDocs(opts: OptimizeDocsOptions): Promise<OptimizeResult>;
|
|
207
|
-
/**
|
|
208
|
-
* Detect directly-used npm packages by scanning source files
|
|
209
|
-
* Uses mlly for proper ES module parsing + tinyglobby for file discovery
|
|
210
|
-
*/
|
|
211
|
-
interface PackageUsage {
|
|
212
|
-
name: string;
|
|
213
|
-
count: number;
|
|
214
|
-
source?: 'import' | 'preset';
|
|
215
|
-
}
|
|
216
|
-
interface DetectResult {
|
|
217
|
-
packages: PackageUsage[];
|
|
218
|
-
error?: string;
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* Scan source files to detect all directly-imported npm packages
|
|
222
|
-
* Async with gitignore support for proper spinner animation
|
|
223
|
-
*/
|
|
224
|
-
declare function detectImportedPackages(cwd?: string): Promise<DetectResult>;
|
|
225
|
-
/**
|
|
226
|
-
* Detect which agents are installed on the system
|
|
227
|
-
*/
|
|
228
|
-
declare function detectInstalledAgents(): AgentType[];
|
|
229
|
-
/**
|
|
230
|
-
* Detect the target agent (where skills are installed) from env vars and cwd.
|
|
231
|
-
* This is NOT the generator LLM — it determines the skills directory.
|
|
232
|
-
*
|
|
233
|
-
* Priority: env vars first (running inside agent = unambiguous), then project dirs.
|
|
234
|
-
* When multiple agents match project dirs, returns null to trigger user prompt
|
|
235
|
-
* rather than silently picking the first match.
|
|
236
|
-
*/
|
|
237
|
-
declare function detectTargetAgent(): AgentType | null;
|
|
238
|
-
/**
|
|
239
|
-
* Get all agents matching the current project directory.
|
|
240
|
-
* Used by promptForAgent to show relevant agents first when disambiguation is needed.
|
|
241
|
-
*/
|
|
242
|
-
declare function detectProjectAgents(): AgentType[];
|
|
243
|
-
/**
|
|
244
|
-
* Get the version of an agent's CLI (if available)
|
|
245
|
-
*/
|
|
246
|
-
declare function getAgentVersion(agentType: AgentType): string | null;
|
|
247
|
-
/**
|
|
248
|
-
* Sanitize skill name for filesystem
|
|
249
|
-
*/
|
|
250
|
-
declare function sanitizeName(name: string): string;
|
|
251
|
-
/**
|
|
252
|
-
* Compute skill directory name from package name with -skilld suffix.
|
|
253
|
-
* No collisions for monorepo packages (each gets a unique name).
|
|
254
|
-
*
|
|
255
|
-
* Examples:
|
|
256
|
-
* vue → vue-skilld
|
|
257
|
-
* @unhead/vue → unhead-vue-skilld
|
|
258
|
-
* @unhead/react → unhead-react-skilld
|
|
259
|
-
*/
|
|
260
|
-
declare function computeSkillDirName(packageName: string): string;
|
|
261
|
-
/**
|
|
262
|
-
* Install a skill directly to agent skill directories.
|
|
263
|
-
* When agents are explicitly specified, creates directories as needed.
|
|
264
|
-
* When falling back to auto-detection, only writes to agents whose skills dir already exists.
|
|
265
|
-
*/
|
|
266
|
-
declare function installSkillForAgents(skillName: string, skillContent: string, options?: {
|
|
267
|
-
global?: boolean;
|
|
268
|
-
cwd?: string;
|
|
269
|
-
agents?: AgentType[]; /** Additional files to write (filename -> content) */
|
|
270
|
-
files?: Record<string, string>;
|
|
271
|
-
}): {
|
|
272
|
-
installed: AgentType[];
|
|
273
|
-
skipped: Array<{
|
|
274
|
-
agent: AgentType;
|
|
275
|
-
reason: string;
|
|
276
|
-
}>;
|
|
277
|
-
paths: string[];
|
|
278
|
-
};
|
|
279
|
-
/**
|
|
280
|
-
* Create a relative symlink from the target agent's skills dir to the shared .skills/ dir.
|
|
281
|
-
* Only creates directories for the explicit target agent; other agents must already have
|
|
282
|
-
* their skills dir present. This prevents skilld from polluting projects with dirs
|
|
283
|
-
* for agents the user doesn't use (e.g. .gemini/, .agent/).
|
|
284
|
-
*/
|
|
285
|
-
declare function linkSkillToAgents(skillName: string, sharedDir: string, cwd: string, agentType?: AgentType): void;
|
|
286
|
-
/**
|
|
287
|
-
* Remove per-agent symlinks for a skill when removing from shared dir.
|
|
288
|
-
*/
|
|
289
|
-
declare function unlinkSkillFromAgents(skillName: string, cwd: string, agentType?: AgentType): void;
|
|
290
|
-
interface FrontmatterField {
|
|
291
|
-
/** Field name in YAML frontmatter */
|
|
292
|
-
name: string;
|
|
293
|
-
/** Whether the field is required by the agent */
|
|
294
|
-
required: boolean;
|
|
295
|
-
/** Description of what the field does */
|
|
296
|
-
description: string;
|
|
297
|
-
/** Constraints (max length, regex, etc.) */
|
|
298
|
-
constraints?: string;
|
|
299
|
-
}
|
|
300
|
-
interface AgentTarget {
|
|
301
|
-
/** Agent identifier */
|
|
302
|
-
agent: AgentType;
|
|
303
|
-
/** Human-readable agent name */
|
|
304
|
-
displayName: string;
|
|
305
|
-
/** Check if agent is installed on the system */
|
|
306
|
-
detectInstalled: () => boolean;
|
|
307
|
-
/** Check env vars to detect if running inside this agent */
|
|
308
|
-
detectEnv: () => boolean;
|
|
309
|
-
/** Check project-level config dirs/files to detect this agent */
|
|
310
|
-
detectProject: (cwd: string) => boolean;
|
|
311
|
-
/** CLI command name (if agent has a CLI for skill generation) */
|
|
312
|
-
cli?: string;
|
|
313
|
-
/** Project-level instruction file for always-on rules (e.g. CLAUDE.md, AGENTS.md) */
|
|
314
|
-
instructionFile?: string;
|
|
315
|
-
/** Required skill filename (always SKILL.md for Agent Skills spec agents) */
|
|
316
|
-
skillFilename: string;
|
|
317
|
-
/** Project-level skill directory */
|
|
318
|
-
skillsDir: string;
|
|
319
|
-
/** Global (user-level) skill directory (resolved absolute path) */
|
|
320
|
-
globalSkillsDir: string;
|
|
321
|
-
/** Additional directories this agent scans for skills (cross-compat) */
|
|
322
|
-
additionalSkillsDirs: string[];
|
|
323
|
-
/** Supported frontmatter fields */
|
|
324
|
-
frontmatter: FrontmatterField[];
|
|
325
|
-
/** Whether `name` must exactly match the parent directory name */
|
|
326
|
-
nameMatchesDir: boolean;
|
|
327
|
-
/** Name field regex constraint */
|
|
328
|
-
namePattern: string;
|
|
329
|
-
/** How skills are discovered: 'eager' (startup scan) or 'lazy' (on-demand) */
|
|
330
|
-
discoveryStrategy: 'eager' | 'lazy';
|
|
331
|
-
/** Brief description of how discovery works */
|
|
332
|
-
discoveryNotes: string;
|
|
333
|
-
/** Whether this agent follows the agentskills.io spec */
|
|
334
|
-
agentSkillsSpec: boolean;
|
|
335
|
-
/** Agent-specific extensions beyond the spec */
|
|
336
|
-
extensions: string[];
|
|
337
|
-
/** Link to official documentation */
|
|
338
|
-
docs: string;
|
|
339
|
-
/** Additional notes, quirks, known issues */
|
|
340
|
-
notes: string[];
|
|
341
|
-
/** Agent-specific instruction text for skill activation (written to instructionFile) */
|
|
342
|
-
skillActivationHint?: string;
|
|
343
|
-
}
|
|
344
|
-
declare const targets: Record<AgentType, AgentTarget>;
|
|
345
|
-
export { type AgentTarget, type AgentType, type CustomPrompt, type FrontmatterField, type ModelInfo, type OptimizeDocsOptions, type OptimizeModel, type OptimizeResult, SECTION_MERGE_ORDER, SECTION_OUTPUT_FILES, type SkillMetadata, type SkillOptions, type SkillSection, type StreamProgress, targets as agents, buildAllSectionPrompts, buildSectionPrompt, computeSkillDirName, createToolProgress, detectImportedPackages, detectInstalledAgents, detectProjectAgents, detectTargetAgent, extractMarkedSections, generateSkillMd, getAgentVersion, getAvailableModels, getModelLabel, getModelName, getSectionValidator, installSkillForAgents, linkSkillToAgents, optimizeDocs, portabilizePrompt, sanitizeName, unlinkSkillFromAgents, wrapSection, writeGeneratedSkillMd, writeSkillMd };
|
|
346
|
-
//# sourceMappingURL=index.d.mts.map
|
|
1
|
+
import { A as buildAllSectionPrompts, C as StreamProgress, D as generateSkillMd, E as SkillOptions, F as wrapSection, I as SECTION_MERGE_ORDER, L as SECTION_OUTPUT_FILES, M as extractMarkedSections, N as getSectionValidator, O as writeGeneratedSkillMd, P as portabilizePrompt, R as SkillSection, S as OptimizeResult, T as SkillMetadata, _ as getModelName, a as computeSkillDirName, b as OptimizeDocsOptions, c as sanitizeName, d as detectProjectAgents, f as detectTargetAgent, g as getModelLabel, h as getAvailableModels, i as optimizeDocs, j as buildSectionPrompt, k as writeSkillMd, l as unlinkSkillFromAgents, m as detectImportedPackages, n as AgentTarget, o as installSkillForAgents, p as getAgentVersion, r as FrontmatterField, s as linkSkillToAgents, t as targets, u as detectInstalledAgents, v as createToolProgress, w as AgentType, x as OptimizeModel, y as ModelInfo, z as CustomPrompt } from "../_chunks/index.mjs";
|
|
2
|
+
export { AgentTarget, AgentType, CustomPrompt, FrontmatterField, ModelInfo, OptimizeDocsOptions, OptimizeModel, OptimizeResult, SECTION_MERGE_ORDER, SECTION_OUTPUT_FILES, SkillMetadata, SkillOptions, SkillSection, StreamProgress, targets as agents, buildAllSectionPrompts, buildSectionPrompt, computeSkillDirName, createToolProgress, detectImportedPackages, detectInstalledAgents, detectProjectAgents, detectTargetAgent, extractMarkedSections, generateSkillMd, getAgentVersion, getAvailableModels, getModelLabel, getModelName, getSectionValidator, installSkillForAgents, linkSkillToAgents, optimizeDocs, portabilizePrompt, sanitizeName, unlinkSkillFromAgents, wrapSection, writeGeneratedSkillMd, writeSkillMd };
|
package/dist/agent/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { a as getModelLabel, i as getAvailableModels, o as getModelName, r as createToolProgress, s as optimizeDocs, t as detectImportedPackages } from "../_chunks/agent.mjs";
|
|
2
1
|
import { a as targets, i as getAgentVersion, n as detectProjectAgents, r as detectTargetAgent, t as detectInstalledAgents } from "../_chunks/detect.mjs";
|
|
3
|
-
import { a as
|
|
4
|
-
import { a as installSkillForAgents, c as unlinkSkillFromAgents, i as computeSkillDirName, n as writeGeneratedSkillMd, o as linkSkillToAgents, r as writeSkillMd, s as sanitizeName, t as generateSkillMd } from "../_chunks/
|
|
2
|
+
import { a as getModelName, i as getModelLabel, n as detectImportedPackages, o as createToolProgress, r as getAvailableModels, t as optimizeDocs } from "../_chunks/agent.mjs";
|
|
3
|
+
import { C as portabilizePrompt, E as SECTION_OUTPUT_FILES, S as getSectionValidator, T as SECTION_MERGE_ORDER, a as installSkillForAgents, b as buildSectionPrompt, c as unlinkSkillFromAgents, i as computeSkillDirName, n as writeGeneratedSkillMd, o as linkSkillToAgents, r as writeSkillMd, s as sanitizeName, t as generateSkillMd, w as wrapSection, x as extractMarkedSections, y as buildAllSectionPrompts } from "../_chunks/prompts.mjs";
|
|
5
4
|
export { SECTION_MERGE_ORDER, SECTION_OUTPUT_FILES, targets as agents, buildAllSectionPrompts, buildSectionPrompt, computeSkillDirName, createToolProgress, detectImportedPackages, detectInstalledAgents, detectProjectAgents, detectTargetAgent, extractMarkedSections, generateSkillMd, getAgentVersion, getAvailableModels, getModelLabel, getModelName, getSectionValidator, installSkillForAgents, linkSkillToAgents, optimizeDocs, portabilizePrompt, sanitizeName, unlinkSkillFromAgents, wrapSection, writeGeneratedSkillMd, writeSkillMd };
|
package/dist/cache/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { CACHE_DIR, CacheConfig, CachedDoc, CachedPackage, REFERENCES_DIR, REPOS_DIR, ShippedSkill, clearAllCache, clearCache, ensureCacheDir, getCacheDir, getCacheKey, getPackageDbPath, getPkgKeyFiles, getRepoCacheDir, getShippedSkills, getVersionKey, hasShippedDocs, inferDocsTypeFromCache, isCached, isReadmeOnlyCache, linkCachedDir, linkPkg, linkPkgNamed, linkRepoCachedDir, linkShippedSkill, listCached, listReferenceFiles, readCachedDocs, readCachedSection, resolvePkgDir, writeSections, writeToCache, writeToRepoCache };
|
|
1
|
+
import { A as createReferenceCache, B as forceClearCache, C as ShippedSkill, D as ReferenceCache, E as resolvePkgDir, F as LoadCachedReferencesOptions, G as REFERENCES_DIR, H as linkAllReferences, I as classifyCachedDoc, J as getRepoCacheDir, K as REPOS_DIR, L as clearSkillInternalDir, M as CachedDoc, N as CachedPackage, O as ReferenceCacheEjectOpts, P as CachedReferencesResult, R as detectDocsType, S as writeToRepoCache, T as linkShippedSkill, U as loadCachedReferences, V as getSkillReferenceDirs, W as CACHE_DIR, _ as listReferenceFiles, a as clearCache, b as writeSections, c as hasShippedDocs, d as isReadmeOnlyCache, f as linkCachedDir, g as listCached, h as linkRepoCachedDir, i as clearAllCache, j as CacheConfig, k as ReferenceCacheLinkOpts, l as inferDocsTypeFromCache, m as linkPkgNamed, n as getCacheKey, o as ensureCacheDir, p as linkPkg, q as getPackageDbPath, r as getVersionKey, s as getPkgKeyFiles, t as getCacheDir, u as isCached, v as readCachedDocs, w as getShippedSkills, x as writeToCache, y as readCachedSection, z as ejectReferences } from "../_chunks/index2.mjs";
|
|
2
|
+
export { CACHE_DIR, CacheConfig, CachedDoc, CachedPackage, CachedReferencesResult, LoadCachedReferencesOptions, REFERENCES_DIR, REPOS_DIR, ReferenceCache, ReferenceCacheEjectOpts, ReferenceCacheLinkOpts, ShippedSkill, classifyCachedDoc, clearAllCache, clearCache, clearSkillInternalDir, createReferenceCache, detectDocsType, ejectReferences, ensureCacheDir, forceClearCache, getCacheDir, getCacheKey, getPackageDbPath, getPkgKeyFiles, getRepoCacheDir, getShippedSkills, getSkillReferenceDirs, getVersionKey, hasShippedDocs, inferDocsTypeFromCache, isCached, isReadmeOnlyCache, linkAllReferences, linkCachedDir, linkPkg, linkPkgNamed, linkRepoCachedDir, linkShippedSkill, listCached, listReferenceFiles, loadCachedReferences, readCachedDocs, readCachedSection, resolvePkgDir, writeSections, writeToCache, writeToRepoCache };
|
package/dist/cache/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l as getPackageDbPath, o as REFERENCES_DIR, s as REPOS_DIR, t as CACHE_DIR, u as getRepoCacheDir } from "../_chunks/paths.mjs";
|
|
2
|
+
import { C as detectDocsType, D as linkAllReferences, E as getSkillReferenceDirs, O as loadCachedReferences, S as clearSkillInternalDir, T as forceClearCache, _ as readCachedSection, a as getPkgKeyFiles, b as writeToRepoCache, c as isCached, d as linkPkg, f as linkPkgNamed, g as readCachedDocs, h as listReferenceFiles, i as ensureCacheDir, l as isReadmeOnlyCache, m as listCached, n as clearAllCache, o as hasShippedDocs, p as linkRepoCachedDir, r as clearCache, s as inferDocsTypeFromCache, t as createReferenceCache, u as linkCachedDir, v as writeSections, w as ejectReferences, x as classifyCachedDoc, y as writeToCache } from "../_chunks/cache.mjs";
|
|
3
|
+
import { n as getCacheKey, r as getVersionKey, t as getCacheDir } from "../_chunks/version.mjs";
|
|
2
4
|
import { n as linkShippedSkill, r as resolvePkgDir, t as getShippedSkills } from "../_chunks/prepare.mjs";
|
|
3
|
-
|
|
4
|
-
export { CACHE_DIR, REFERENCES_DIR, REPOS_DIR, clearAllCache, clearCache, ensureCacheDir, getCacheDir, getCacheKey, getPackageDbPath, getPkgKeyFiles, getRepoCacheDir, getShippedSkills, getVersionKey, hasShippedDocs, inferDocsTypeFromCache, isCached, isReadmeOnlyCache, linkCachedDir, linkPkg, linkPkgNamed, linkRepoCachedDir, linkShippedSkill, listCached, listReferenceFiles, readCachedDocs, readCachedSection, resolvePkgDir, writeSections, writeToCache, writeToRepoCache };
|
|
5
|
+
export { CACHE_DIR, REFERENCES_DIR, REPOS_DIR, classifyCachedDoc, clearAllCache, clearCache, clearSkillInternalDir, createReferenceCache, detectDocsType, ejectReferences, ensureCacheDir, forceClearCache, getCacheDir, getCacheKey, getPackageDbPath, getPkgKeyFiles, getRepoCacheDir, getShippedSkills, getSkillReferenceDirs, getVersionKey, hasShippedDocs, inferDocsTypeFromCache, isCached, isReadmeOnlyCache, linkAllReferences, linkCachedDir, linkPkg, linkPkgNamed, linkRepoCachedDir, linkShippedSkill, listCached, listReferenceFiles, loadCachedReferences, readCachedDocs, readCachedSection, resolvePkgDir, writeSections, writeToCache, writeToRepoCache };
|
package/dist/cli.mjs
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { d as getSharedSkillsDir, l as getPackageDbPath, p as skillInternalDir, t as CACHE_DIR } from "./_chunks/paths.mjs";
|
|
3
|
+
import { L as updateConfig, M as hasCompletedWizard, N as hasConfig, P as readConfig, k as defaultFeatures } from "./_chunks/cache.mjs";
|
|
4
4
|
import { i as readPackageJsonSafe } from "./_chunks/package-json.mjs";
|
|
5
|
-
import "./_chunks/
|
|
6
|
-
import {
|
|
7
|
-
import { r as fetchNpmRegistryMeta, t as fetchLatestVersion } from "./_chunks/sources.mjs";
|
|
5
|
+
import { t as getCacheDir } from "./_chunks/version.mjs";
|
|
6
|
+
import { X as mapInsert, a as toStoragePackageName, c as fetchNpmRegistryMeta, i as resolveSkillName, o as fetchLatestVersion } from "./_chunks/sources.mjs";
|
|
8
7
|
import { a as targets, i as getAgentVersion, r as detectTargetAgent, t as detectInstalledAgents } from "./_chunks/detect.mjs";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { a as getModelName, c as getOAuthProviderList, l as loginOAuthProvider, n as detectImportedPackages, r as getAvailableModels, u as logoutOAuthProvider } from "./_chunks/agent.mjs";
|
|
9
|
+
import { _ as timedSpinner, c as unlinkSkillFromAgents, f as formatSource, g as timeAgo } from "./_chunks/prompts.mjs";
|
|
11
10
|
import { C as version, S as suggestPrepareHook, _ as promptForAgent, a as formatStatus, b as resolveAgent, c as getRepoHint, d as hasPrepareHook, f as introLine, g as pickModel, h as menuLoop, m as isRunningInsideAgent, n as NO_MODELS_MESSAGE, o as getInstalledGenerators, p as isInteractive, r as OAUTH_NOTE, u as guard, v as relativeTime, x as sharedArgs, y as requireInteractive } from "./_chunks/cli-helpers.mjs";
|
|
12
|
-
import {
|
|
11
|
+
import { l as removeLockEntry, o as parsePackages } from "./_chunks/lockfile.mjs";
|
|
12
|
+
import { n as semverGt } from "./_chunks/semver.mjs";
|
|
13
13
|
import { i as iterateSkills, n as getSkillsDir, r as isOutdated, t as getProjectState } from "./_chunks/skills.mjs";
|
|
14
|
-
import { n as resolveSkillName, r as toStoragePackageName } from "./_chunks/prefix.mjs";
|
|
15
14
|
import { t as runWizard } from "./_chunks/wizard.mjs";
|
|
16
15
|
import "./_chunks/core.mjs";
|
|
17
|
-
import { join, resolve } from "pathe";
|
|
18
16
|
import { existsSync, readFileSync, readdirSync, realpathSync, rmSync, statSync } from "node:fs";
|
|
17
|
+
import { join, resolve } from "pathe";
|
|
19
18
|
import pLimit from "p-limit";
|
|
20
19
|
import * as p from "@clack/prompts";
|
|
21
20
|
import { defineCommand, runMain } from "citty";
|
|
@@ -393,7 +392,7 @@ async function countEmbeddings(packageName, version) {
|
|
|
393
392
|
}
|
|
394
393
|
}
|
|
395
394
|
function countRefDocs(skillDir) {
|
|
396
|
-
const refsDir =
|
|
395
|
+
const refsDir = skillInternalDir(skillDir);
|
|
397
396
|
if (!existsSync(refsDir)) return 0;
|
|
398
397
|
let count = 0;
|
|
399
398
|
const walk = (dir, depth = 0) => {
|
|
@@ -798,7 +797,7 @@ runMain(defineCommand({
|
|
|
798
797
|
return;
|
|
799
798
|
}
|
|
800
799
|
if (source === "shipped") {
|
|
801
|
-
const { handleShippedSkills: installShipped } = await import("./_chunks/
|
|
800
|
+
const { handleShippedSkills: installShipped } = await import("./_chunks/skill-installer.mjs");
|
|
802
801
|
for (const pkg of state.shipped) {
|
|
803
802
|
const version = state.deps.get(pkg.packageName)?.replace(/^[\^~>=<]+/, "") || "0.0.0";
|
|
804
803
|
installShipped(pkg.packageName, version, cwd, agent, false);
|
|
@@ -1018,7 +1017,7 @@ runMain(defineCommand({
|
|
|
1018
1017
|
initialValues: allShipped
|
|
1019
1018
|
}));
|
|
1020
1019
|
if (selected.length === 0) return;
|
|
1021
|
-
const { handleShippedSkills: installShipped } = await import("./_chunks/
|
|
1020
|
+
const { handleShippedSkills: installShipped } = await import("./_chunks/skill-installer.mjs");
|
|
1022
1021
|
const seen = /* @__PURE__ */ new Set();
|
|
1023
1022
|
for (const s of selected) {
|
|
1024
1023
|
if (seen.has(s.packageName)) continue;
|