claude-skills-cli 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/commands/init.js +1 -4
- package/dist/commands/init.js.map +1 -1
- package/dist/core/templates.js +0 -15
- package/dist/core/templates.js.map +1 -1
- package/dist/help.js +291 -0
- package/dist/help.js.map +1 -0
- package/dist/index.js +32 -47
- package/dist/index.js.map +1 -1
- package/dist/skills/skill-creator/references/cli-reference.md +0 -1
- package/package.json +1 -1
- package/dist/commands/hook-config.js +0 -45
- package/dist/commands/hook-config.js.map +0 -1
- package/dist/commands/watch.js +0 -82
- package/dist/commands/watch.js.map +0 -1
- package/dist/utils/settings.js +0 -110
- package/dist/utils/settings.js.map +0 -1
package/README.md
CHANGED
|
@@ -46,8 +46,8 @@ pnpx claude-skills-cli init --name my-skill --description "Brief description wit
|
|
|
46
46
|
pnpx claude-skills-cli init --name my-skill --description "..." --with-examples
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
Creates minimal skill scaffolding by default (SKILL.md,
|
|
50
|
-
|
|
49
|
+
Creates minimal skill scaffolding by default (SKILL.md, references/).
|
|
50
|
+
Use `--with-examples` for example files.
|
|
51
51
|
|
|
52
52
|
### validate
|
|
53
53
|
|
package/dist/commands/init.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { join } from 'node:path';
|
|
2
|
-
import {
|
|
2
|
+
import { REFERENCE_TEMPLATE, SCRIPT_TEMPLATE, SKILL_MD_TEMPLATE, } from '../core/templates.js';
|
|
3
3
|
import { ensure_dir, is_lowercase, make_executable, to_title_case, write_file, } from '../utils/fs.js';
|
|
4
4
|
import { error, success } from '../utils/output.js';
|
|
5
5
|
export function init_command(options) {
|
|
@@ -46,9 +46,6 @@ function create_skill(path, name, description, with_examples = false) {
|
|
|
46
46
|
const title = to_title_case(name);
|
|
47
47
|
const skill_md = SKILL_MD_TEMPLATE(name, description, title, with_examples);
|
|
48
48
|
write_file(join(path, 'SKILL.md'), skill_md);
|
|
49
|
-
// Create README
|
|
50
|
-
const readme_md = README_TEMPLATE(title, description);
|
|
51
|
-
write_file(join(path, 'README.md'), readme_md);
|
|
52
49
|
// Only create example files if requested
|
|
53
50
|
if (with_examples) {
|
|
54
51
|
// Create example directories
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACN,
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,iBAAiB,GACjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACN,UAAU,EACV,YAAY,EACZ,eAAe,EACf,aAAa,EACb,UAAU,GACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,UAAU,YAAY,CAAC,OAAoB;IAChD,IAAI,UAAkB,CAAC;IACvB,IAAI,IAAY,CAAC;IACjB,IAAI,WAAmB,CAAC;IAExB,0BAA0B;IAC1B,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QAClB,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;QAC1B,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;QACzC,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,uBAAuB,CAAC;IAC9D,CAAC;SAAM,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QACzB,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACpB,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,uBAAuB,CA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AC;IAC9D,OAAO,CAAC,GAAG,CAAC,iCAAiC,IAAI,EAAE,CAAC,CAAC;IACrD,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;AAC/C,CAAC"}
|
package/dist/core/templates.js
CHANGED
|
@@ -188,21 +188,6 @@ function main() {
|
|
|
188
188
|
|
|
189
189
|
main();
|
|
190
190
|
`;
|
|
191
|
-
export const README_TEMPLATE = (title, description) => `# ${title}
|
|
192
|
-
|
|
193
|
-
${description}
|
|
194
|
-
|
|
195
|
-
## Structure
|
|
196
|
-
|
|
197
|
-
- \`SKILL.md\` - Main skill instructions
|
|
198
|
-
- \`references/\` - Detailed documentation loaded as needed
|
|
199
|
-
- \`scripts/\` - Executable code for deterministic operations
|
|
200
|
-
- \`assets/\` - Templates, images, or other resources
|
|
201
|
-
|
|
202
|
-
## Usage
|
|
203
|
-
|
|
204
|
-
This skill is automatically discovered by Claude when relevant to the task.
|
|
205
|
-
`;
|
|
206
191
|
// Hook templates for skill activation
|
|
207
192
|
export const SIMPLE_HOOK_TEMPLATE = () => `#!/bin/bash
|
|
208
193
|
echo 'INSTRUCTION: If the prompt matches any available skill keywords, use Skill(skill-name) to activate it.'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/core/templates.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAChC,IAAY,EACZ,WAAmB,EACnB,KAAa,EACb,mBAA4B,KAAK,EAChC,EAAE;IACH,MAAM,gBAAgB,GAAG;QAClB,IAAI;;;eAGG,WAAW;;;IAGtB,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDR,CAAC;IAED,MAAM,aAAa,GAAG;QACf,IAAI;;;eAGG,WAAW;;;IAGtB,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqDR,CAAC;IAED,OAAO,gBAA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AAE,CAAC;;CAEzC,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmC9C,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6J3C,CAAC"}
|
package/dist/help.js
ADDED
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
// Help data structures and formatting for commands
|
|
2
|
+
export const INIT_HELP = {
|
|
3
|
+
command: 'init',
|
|
4
|
+
description: 'Create a new skill',
|
|
5
|
+
usage: 'claude-skills-cli init [options]',
|
|
6
|
+
options: [
|
|
7
|
+
{
|
|
8
|
+
flag: '--name',
|
|
9
|
+
type: 'string',
|
|
10
|
+
required: true,
|
|
11
|
+
description: 'Skill name (kebab-case, lowercase)',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
flag: '--description',
|
|
15
|
+
type: 'string',
|
|
16
|
+
required: true,
|
|
17
|
+
description: 'Brief description with trigger keywords',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
flag: '--path',
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'Custom path (alternative to --name)',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
flag: '--with-examples',
|
|
26
|
+
type: 'boolean',
|
|
27
|
+
description: 'Include example files (scripts/, assets/)',
|
|
28
|
+
},
|
|
29
|
+
{ flag: '--help, -h', description: 'Show this help' },
|
|
30
|
+
],
|
|
31
|
+
examples: [
|
|
32
|
+
'claude-skills-cli init --name my-skill --description "Brief description"',
|
|
33
|
+
'claude-skills-cli init --name my-skill --description "..." --with-examples',
|
|
34
|
+
'claude-skills-cli init --path /custom/path/my-skill --description "..."',
|
|
35
|
+
],
|
|
36
|
+
};
|
|
37
|
+
export const INSTALL_HELP = {
|
|
38
|
+
command: 'install',
|
|
39
|
+
description: 'Install a bundled skill',
|
|
40
|
+
usage: 'claude-skills-cli install <skill-name> [options]',
|
|
41
|
+
options: [
|
|
42
|
+
{
|
|
43
|
+
flag: '<skill-name>',
|
|
44
|
+
required: true,
|
|
45
|
+
description: 'Name of bundled skill (e.g., skill-creator)',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
flag: '--force',
|
|
49
|
+
type: 'boolean',
|
|
50
|
+
description: 'Replace existing skill without prompting',
|
|
51
|
+
},
|
|
52
|
+
{ flag: '--help, -h', description: 'Show this help' },
|
|
53
|
+
],
|
|
54
|
+
examples: [
|
|
55
|
+
'claude-skills-cli install skill-creator',
|
|
56
|
+
'claude-skills-cli install skill-creator --force',
|
|
57
|
+
],
|
|
58
|
+
};
|
|
59
|
+
export const VALIDATE_HELP = {
|
|
60
|
+
command: 'validate',
|
|
61
|
+
description: 'Validate a skill',
|
|
62
|
+
usage: 'claude-skills-cli validate <skill-path> [options]',
|
|
63
|
+
options: [
|
|
64
|
+
{
|
|
65
|
+
flag: '<skill-path>',
|
|
66
|
+
required: true,
|
|
67
|
+
description: 'Path to skill directory',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
flag: '--format',
|
|
71
|
+
type: 'json|text',
|
|
72
|
+
description: 'Output format (default: text)',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
flag: '--strict',
|
|
76
|
+
type: 'boolean',
|
|
77
|
+
description: 'Fail validation if warnings present',
|
|
78
|
+
},
|
|
79
|
+
{ flag: '--help, -h', description: 'Show this help' },
|
|
80
|
+
],
|
|
81
|
+
examples: [
|
|
82
|
+
'claude-skills-cli validate .claude/skills/my-skill',
|
|
83
|
+
'claude-skills-cli validate .claude/skills/my-skill --format json',
|
|
84
|
+
'claude-skills-cli validate .claude/skills/my-skill --strict',
|
|
85
|
+
],
|
|
86
|
+
};
|
|
87
|
+
export const DOCTOR_HELP = {
|
|
88
|
+
command: 'doctor',
|
|
89
|
+
description: 'Fix common skill issues automatically',
|
|
90
|
+
usage: 'claude-skills-cli doctor <skill-path>',
|
|
91
|
+
options: [
|
|
92
|
+
{
|
|
93
|
+
flag: '<skill-path>',
|
|
94
|
+
required: true,
|
|
95
|
+
description: 'Path to skill directory',
|
|
96
|
+
},
|
|
97
|
+
{ flag: '--help, -h', description: 'Show this help' },
|
|
98
|
+
],
|
|
99
|
+
examples: ['claude-skills-cli doctor .claude/skills/my-skill'],
|
|
100
|
+
};
|
|
101
|
+
export const PACKAGE_HELP = {
|
|
102
|
+
command: 'package',
|
|
103
|
+
description: 'Package a skill to zip',
|
|
104
|
+
usage: 'claude-skills-cli package <skill-path> [options]',
|
|
105
|
+
options: [
|
|
106
|
+
{
|
|
107
|
+
flag: '<skill-path>',
|
|
108
|
+
required: true,
|
|
109
|
+
description: 'Path to skill directory',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
flag: '--output',
|
|
113
|
+
type: 'string',
|
|
114
|
+
description: 'Output path for zip file',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
flag: '--skip-validation',
|
|
118
|
+
type: 'boolean',
|
|
119
|
+
description: 'Skip validation before packaging',
|
|
120
|
+
},
|
|
121
|
+
{ flag: '--help, -h', description: 'Show this help' },
|
|
122
|
+
],
|
|
123
|
+
examples: [
|
|
124
|
+
'claude-skills-cli package .claude/skills/my-skill',
|
|
125
|
+
'claude-skills-cli package .claude/skills/my-skill --output my-skill.zip',
|
|
126
|
+
],
|
|
127
|
+
};
|
|
128
|
+
export const STATS_HELP = {
|
|
129
|
+
command: 'stats',
|
|
130
|
+
description: 'Show overview of all skills in a directory',
|
|
131
|
+
usage: 'claude-skills-cli stats [directory]',
|
|
132
|
+
options: [
|
|
133
|
+
{
|
|
134
|
+
flag: '[directory]',
|
|
135
|
+
description: 'Directory containing skills (default: .claude/skills)',
|
|
136
|
+
},
|
|
137
|
+
{ flag: '--help, -h', description: 'Show this help' },
|
|
138
|
+
],
|
|
139
|
+
examples: [
|
|
140
|
+
'claude-skills-cli stats',
|
|
141
|
+
'claude-skills-cli stats .claude/skills',
|
|
142
|
+
],
|
|
143
|
+
};
|
|
144
|
+
export const ADD_HOOK_HELP = {
|
|
145
|
+
command: 'add-hook',
|
|
146
|
+
description: 'Add skill activation hook to .claude/settings.json',
|
|
147
|
+
usage: 'claude-skills-cli add-hook [options]',
|
|
148
|
+
options: [
|
|
149
|
+
{
|
|
150
|
+
flag: '--type',
|
|
151
|
+
type: 'forced-eval|llm-eval|simple-script|simple-inline',
|
|
152
|
+
description: 'Hook type (default: forced-eval)',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
flag: '--project',
|
|
156
|
+
type: 'boolean',
|
|
157
|
+
description: 'Install in project .claude/settings.json',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
flag: '--local',
|
|
161
|
+
type: 'boolean',
|
|
162
|
+
description: 'Install in project .claude/settings.local.json',
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
flag: '--force',
|
|
166
|
+
type: 'boolean',
|
|
167
|
+
description: 'Replace existing hook without prompting',
|
|
168
|
+
},
|
|
169
|
+
{ flag: '--help, -h', description: 'Show this help' },
|
|
170
|
+
],
|
|
171
|
+
examples: [
|
|
172
|
+
'claude-skills-cli add-hook',
|
|
173
|
+
'claude-skills-cli add-hook --type llm-eval',
|
|
174
|
+
'claude-skills-cli add-hook --project',
|
|
175
|
+
'claude-skills-cli add-hook --type forced-eval --force',
|
|
176
|
+
],
|
|
177
|
+
};
|
|
178
|
+
export const MAIN_HELP = {
|
|
179
|
+
name: 'claude-skills-cli',
|
|
180
|
+
description: 'CLI toolkit for creating Claude Agent Skills',
|
|
181
|
+
usage: 'claude-skills-cli <command> [options]',
|
|
182
|
+
commands: [
|
|
183
|
+
{ command: 'init', description: 'Create a new skill' },
|
|
184
|
+
{
|
|
185
|
+
command: 'install',
|
|
186
|
+
description: 'Install a bundled skill (e.g., skill-creator)',
|
|
187
|
+
},
|
|
188
|
+
{ command: 'validate', description: 'Validate a skill' },
|
|
189
|
+
{
|
|
190
|
+
command: 'doctor',
|
|
191
|
+
description: 'Fix common skill issues automatically',
|
|
192
|
+
},
|
|
193
|
+
{ command: 'package', description: 'Package a skill to zip' },
|
|
194
|
+
{
|
|
195
|
+
command: 'stats',
|
|
196
|
+
description: 'Show overview of all skills in a directory',
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
command: 'add-hook',
|
|
200
|
+
description: 'Add skill activation hook to .claude/settings.json',
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
globalOptions: [
|
|
204
|
+
{ flag: '--help, -h', description: 'Show help' },
|
|
205
|
+
{ flag: '--version, -v', description: 'Show version' },
|
|
206
|
+
{
|
|
207
|
+
flag: '--format',
|
|
208
|
+
type: 'text|json',
|
|
209
|
+
description: 'Output format for help (default: text)',
|
|
210
|
+
},
|
|
211
|
+
],
|
|
212
|
+
examples: [
|
|
213
|
+
'claude-skills-cli init --name my-skill --description "Description"',
|
|
214
|
+
'claude-skills-cli validate .claude/skills/my-skill',
|
|
215
|
+
'claude-skills-cli add-hook',
|
|
216
|
+
'claude-skills-cli --help --format json',
|
|
217
|
+
],
|
|
218
|
+
notes: [
|
|
219
|
+
'IMPORTANT FOR LLMs:',
|
|
220
|
+
' ALWAYS run validate after creating or editing a skill:',
|
|
221
|
+
' claude-skills-cli validate <skill-path>',
|
|
222
|
+
' Skills MUST pass validation before use.',
|
|
223
|
+
' Fix all errors immediately. Address warnings promptly.',
|
|
224
|
+
],
|
|
225
|
+
};
|
|
226
|
+
export function show_command_help(help, format) {
|
|
227
|
+
if (format === 'json') {
|
|
228
|
+
console.log(JSON.stringify(help, null, 2));
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
// Text format (human-friendly)
|
|
232
|
+
console.log(`claude-skills-cli ${help.command} - ${help.description}\n`);
|
|
233
|
+
console.log('Usage:');
|
|
234
|
+
console.log(` ${help.usage}\n`);
|
|
235
|
+
if (help.options.length > 0) {
|
|
236
|
+
console.log('Options:');
|
|
237
|
+
for (const opt of help.options) {
|
|
238
|
+
const flag_part = opt.flag.padEnd(20);
|
|
239
|
+
const type_part = opt.type ? `<${opt.type}>`.padEnd(15) : '';
|
|
240
|
+
const req_part = opt.required ? '[required]'.padEnd(12) : '';
|
|
241
|
+
console.log(` ${flag_part}${type_part}${opt.description}`);
|
|
242
|
+
}
|
|
243
|
+
console.log('');
|
|
244
|
+
}
|
|
245
|
+
if (help.examples.length > 0) {
|
|
246
|
+
console.log('Examples:');
|
|
247
|
+
for (const example of help.examples) {
|
|
248
|
+
console.log(` ${example}`);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
export function show_main_help(format) {
|
|
253
|
+
if (format === 'json') {
|
|
254
|
+
console.log(JSON.stringify(MAIN_HELP, null, 2));
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
// Text format (human-friendly)
|
|
258
|
+
console.log(`${MAIN_HELP.name} - ${MAIN_HELP.description}\n`);
|
|
259
|
+
console.log('Usage:');
|
|
260
|
+
console.log(` ${MAIN_HELP.usage}\n`);
|
|
261
|
+
if (MAIN_HELP.commands.length > 0) {
|
|
262
|
+
console.log('Commands:');
|
|
263
|
+
for (const cmd of MAIN_HELP.commands) {
|
|
264
|
+
const cmd_part = cmd.command.padEnd(12);
|
|
265
|
+
console.log(` ${cmd_part}${cmd.description}`);
|
|
266
|
+
}
|
|
267
|
+
console.log('');
|
|
268
|
+
}
|
|
269
|
+
if (MAIN_HELP.globalOptions.length > 0) {
|
|
270
|
+
console.log('Global Options:');
|
|
271
|
+
for (const opt of MAIN_HELP.globalOptions) {
|
|
272
|
+
const flag_part = opt.flag.padEnd(20);
|
|
273
|
+
const type_part = opt.type ? `<${opt.type}>`.padEnd(15) : '';
|
|
274
|
+
console.log(` ${flag_part}${type_part}${opt.description}`);
|
|
275
|
+
}
|
|
276
|
+
console.log('');
|
|
277
|
+
}
|
|
278
|
+
if (MAIN_HELP.examples.length > 0) {
|
|
279
|
+
console.log('Examples:');
|
|
280
|
+
for (const example of MAIN_HELP.examples) {
|
|
281
|
+
console.log(` ${example}`);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
if (MAIN_HELP.notes && MAIN_HELP.notes.length > 0) {
|
|
285
|
+
console.log('');
|
|
286
|
+
for (const note of MAIN_HELP.notes) {
|
|
287
|
+
console.log(note);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
//# sourceMappingURL=help.js.map
|
package/dist/help.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,mDAAmD;AAgCnD,MAAM,CAAC,MAAM,SAAS,GAAgB;IACrC,OAAO,EAAE,MAAM;IACf,WAAW,EAAE,oBAAoB;IACjC,KAAK,EAAE,kCAAkC;IACzC,OAAO,EAAE;QACR;YACC,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,oCAAoC;SACjD;QACD;YACC,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,yCAAyC;SACtD;QACD;YACC,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qCAAqC;SAClD;QACD;YACC,IAAI,EAAE,iBAAiB;YACvB,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,2CAA2C;SACxD;QACD,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE;KACrD;IACD,QAAQ,EAAE;QACT,0EAA0E;QAC1E,4EAA4E;QAC5E,yEAAyE;KACzE;CACD,CA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;QAC/B,KAAK,MAAM,GAAG,IAAI,SAAS,CAAC,aAAa,EAAE,CAAC;YAC3C,MAAM,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YACtC,MAAM,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7D,OAAO,CAAC,GAAG,CAAC,KAAK,SAAS,GAAG,SAAS,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;QAC7D,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IAED,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACnC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACzB,KAAK,MAAM,OAAO,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;YAC1C,OAAO,CAAC,GAAG,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC;QAC7B,CAAC;IACF,CAAC;IAED,IAAI,SAAS,CAAC,KAAK,IAAI,SAAS,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACnD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,KAAK,MAAM,IAAI,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC;YACpC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;IACF,CAAC;AACF,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,53 +6,9 @@ import { install_command } from './commands/install.js';
|
|
|
6
6
|
import { package_command } from './commands/package.js';
|
|
7
7
|
import { stats_command } from './commands/stats.js';
|
|
8
8
|
import { validate_command } from './commands/validate.js';
|
|
9
|
+
import { ADD_HOOK_HELP, DOCTOR_HELP, INIT_HELP, INSTALL_HELP, PACKAGE_HELP, STATS_HELP, VALIDATE_HELP, show_command_help, show_main_help, } from './help.js';
|
|
9
10
|
const args = process.argv.slice(2);
|
|
10
11
|
const command = args[0];
|
|
11
|
-
function show_help() {
|
|
12
|
-
console.log('claude-skills-cli - CLI toolkit for creating Claude Agent Skills\n');
|
|
13
|
-
console.log('Usage:');
|
|
14
|
-
console.log(' claude-skills-cli <command> [options]\n');
|
|
15
|
-
console.log('Commands:');
|
|
16
|
-
console.log(' init Create a new skill');
|
|
17
|
-
console.log(' install Install a bundled skill (e.g., skill-creator)');
|
|
18
|
-
console.log(' validate Validate a skill');
|
|
19
|
-
console.log(' doctor Fix common skill issues automatically');
|
|
20
|
-
console.log(' package Package a skill to zip');
|
|
21
|
-
console.log(' stats Show overview of all skills in a directory');
|
|
22
|
-
console.log(' add-hook Add skill activation hook to .claude/settings.json\n');
|
|
23
|
-
console.log('Options:');
|
|
24
|
-
console.log(' --help, -h Show help');
|
|
25
|
-
console.log(' --version, -v Show version');
|
|
26
|
-
console.log(' --with-examples Include example files when creating skill');
|
|
27
|
-
console.log(' --format <type> Output format: text (default) or json');
|
|
28
|
-
console.log(' --strict Fail validation if warnings present');
|
|
29
|
-
console.log(' --force Replace existing hook without prompting\n');
|
|
30
|
-
console.log('Examples:');
|
|
31
|
-
console.log(' claude-skills-cli init --name my-skill --description "Description"');
|
|
32
|
-
console.log(' claude-skills-cli init --name my-skill --description "..." --with-examples');
|
|
33
|
-
console.log(' claude-skills-cli install skill-creator');
|
|
34
|
-
console.log(' claude-skills-cli validate .claude/skills/my-skill');
|
|
35
|
-
console.log(' claude-skills-cli validate .claude/skills/my-skill --format json');
|
|
36
|
-
console.log(' claude-skills-cli validate .claude/skills/my-skill --strict');
|
|
37
|
-
console.log(' claude-skills-cli doctor .claude/skills/my-skill');
|
|
38
|
-
console.log(' claude-skills-cli package .claude/skills/my-skill');
|
|
39
|
-
console.log(' claude-skills-cli stats .claude/skills');
|
|
40
|
-
console.log(' claude-skills-cli add-hook # Global, forced-eval (84%)');
|
|
41
|
-
console.log(' claude-skills-cli add-hook --type llm-eval # Global, LLM eval (80%)');
|
|
42
|
-
console.log(' claude-skills-cli add-hook --type forced-eval --project # Project, forced-eval');
|
|
43
|
-
console.log(' claude-skills-cli add-hook --type simple-script --local # Local, simple script');
|
|
44
|
-
console.log(' claude-skills-cli add-hook --type forced-eval --force # Replace existing hook');
|
|
45
|
-
console.log('\nHook Types (--type):');
|
|
46
|
-
console.log(' forced-eval 84% success - Mandatory 3-step evaluation (default)');
|
|
47
|
-
console.log(' llm-eval 80% success - Claude API pre-evaluation (requires API key)');
|
|
48
|
-
console.log(' simple-script 20% success - Basic script file');
|
|
49
|
-
console.log(' simple-inline 20% success - Echo command in settings.json');
|
|
50
|
-
console.log('\n⚠️ IMPORTANT FOR LLMs:');
|
|
51
|
-
console.log(' ALWAYS run validate after creating or editing a skill:');
|
|
52
|
-
console.log(' claude-skills-cli validate <skill-path>');
|
|
53
|
-
console.log(' Skills MUST pass validation before use.');
|
|
54
|
-
console.log(' Fix all errors immediately. Address warnings promptly.');
|
|
55
|
-
}
|
|
56
12
|
function parse_args(args) {
|
|
57
13
|
const parsed = {};
|
|
58
14
|
const positional = [];
|
|
@@ -91,7 +47,8 @@ function parse_args(args) {
|
|
|
91
47
|
}
|
|
92
48
|
async function main() {
|
|
93
49
|
if (!command || command === '--help' || command === '-h') {
|
|
94
|
-
|
|
50
|
+
const parsed = parse_args(args.slice(1));
|
|
51
|
+
show_main_help(parsed.format);
|
|
95
52
|
process.exit(0);
|
|
96
53
|
}
|
|
97
54
|
if (command === '--version' || command === '-v') {
|
|
@@ -101,6 +58,10 @@ async function main() {
|
|
|
101
58
|
const parsed = parse_args(args.slice(1));
|
|
102
59
|
switch (command) {
|
|
103
60
|
case 'init':
|
|
61
|
+
if (parsed.help === true || parsed.h === true) {
|
|
62
|
+
show_command_help(INIT_HELP, parsed.format);
|
|
63
|
+
process.exit(0);
|
|
64
|
+
}
|
|
104
65
|
init_command({
|
|
105
66
|
name: parsed.name,
|
|
106
67
|
description: parsed.description,
|
|
@@ -109,6 +70,10 @@ async function main() {
|
|
|
109
70
|
});
|
|
110
71
|
break;
|
|
111
72
|
case 'install': {
|
|
73
|
+
if (parsed.help === true || parsed.h === true) {
|
|
74
|
+
show_command_help(INSTALL_HELP, parsed.format);
|
|
75
|
+
process.exit(0);
|
|
76
|
+
}
|
|
112
77
|
const skill_name = parsed._positional;
|
|
113
78
|
install_command({
|
|
114
79
|
skill_name,
|
|
@@ -118,6 +83,10 @@ async function main() {
|
|
|
118
83
|
}
|
|
119
84
|
case 'validate': {
|
|
120
85
|
const skill_path = parsed._positional;
|
|
86
|
+
if (parsed.help === true || parsed.h === true) {
|
|
87
|
+
show_command_help(VALIDATE_HELP, parsed.format);
|
|
88
|
+
process.exit(0);
|
|
89
|
+
}
|
|
121
90
|
if (!skill_path) {
|
|
122
91
|
console.error('Error: skill path required');
|
|
123
92
|
console.log('\nUsage: claude-skills-cli validate <skill_path> [--format json] [--strict]');
|
|
@@ -132,6 +101,10 @@ async function main() {
|
|
|
132
101
|
break;
|
|
133
102
|
}
|
|
134
103
|
case 'doctor': {
|
|
104
|
+
if (parsed.help === true || parsed.h === true) {
|
|
105
|
+
show_command_help(DOCTOR_HELP, parsed.format);
|
|
106
|
+
process.exit(0);
|
|
107
|
+
}
|
|
135
108
|
const skill_path = parsed._positional;
|
|
136
109
|
if (!skill_path) {
|
|
137
110
|
console.error('Error: skill path required');
|
|
@@ -145,6 +118,10 @@ async function main() {
|
|
|
145
118
|
}
|
|
146
119
|
case 'package': {
|
|
147
120
|
const skill_path = parsed._positional;
|
|
121
|
+
if (parsed.help === true || parsed.h === true) {
|
|
122
|
+
show_command_help(PACKAGE_HELP, parsed.format);
|
|
123
|
+
process.exit(0);
|
|
124
|
+
}
|
|
148
125
|
if (!skill_path) {
|
|
149
126
|
console.error('Error: skill path required');
|
|
150
127
|
console.log('\nUsage: claude-skills-cli package <skill_path>');
|
|
@@ -158,6 +135,10 @@ async function main() {
|
|
|
158
135
|
break;
|
|
159
136
|
}
|
|
160
137
|
case 'stats': {
|
|
138
|
+
if (parsed.help === true || parsed.h === true) {
|
|
139
|
+
show_command_help(STATS_HELP, parsed.format);
|
|
140
|
+
process.exit(0);
|
|
141
|
+
}
|
|
161
142
|
const directory = parsed._positional;
|
|
162
143
|
stats_command({
|
|
163
144
|
directory,
|
|
@@ -165,6 +146,10 @@ async function main() {
|
|
|
165
146
|
break;
|
|
166
147
|
}
|
|
167
148
|
case 'add-hook':
|
|
149
|
+
if (parsed.help === true || parsed.h === true) {
|
|
150
|
+
show_command_help(ADD_HOOK_HELP, parsed.format);
|
|
151
|
+
process.exit(0);
|
|
152
|
+
}
|
|
168
153
|
add_hook_command({
|
|
169
154
|
local: parsed.local === true,
|
|
170
155
|
project: parsed.project === true,
|
|
@@ -175,7 +160,7 @@ async function main() {
|
|
|
175
160
|
default:
|
|
176
161
|
console.error(`Unknown command: ${command}`);
|
|
177
162
|
console.log('');
|
|
178
|
-
|
|
163
|
+
show_main_help(parsed.format);
|
|
179
164
|
process.exit(1);
|
|
180
165
|
}
|
|
181
166
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts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AAC;YACD,gBAAgB,CAAC;gBAChB,KAAK,EAAE,MAAM,CAAC,KAAK,KAAK,IAAI;gBAC5B,OAAO,EAAE,MAAM,CAAC,OAAO,KAAK,IAAI;gBAChC,IAAI,EAAE,MAAM,CAAC,IAKD;gBACZ,KAAK,EAAE,MAAM,CAAC,KAAK,KAAK,IAAI;aAC5B,CAAC,CAAC;YACH,MAAM;QAEP;YACC,OAAO,CAAC,KAAK,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;YAC7C,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAChB,cAAc,CAAC,MAAM,CAAC,MAAgB,CAAC,CAAC;YACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACF,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACpB,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import { generate_hook_config, get_settings_location_message, has_skill_reminder_hook, } from '../utils/settings.js';
|
|
3
|
-
export function hook_config_command(options) {
|
|
4
|
-
const hook_type = options.sessionStart
|
|
5
|
-
? 'session-start'
|
|
6
|
-
: 'user-prompt';
|
|
7
|
-
console.log(chalk.cyan.bold('\n📋 Skill Activation Hook Configuration\n'));
|
|
8
|
-
// Check if hook already exists
|
|
9
|
-
if (has_skill_reminder_hook()) {
|
|
10
|
-
console.log(chalk.green('✅ Skill reminder hook already detected in your settings!\n'));
|
|
11
|
-
console.log(chalk.dim('You already have a hook that references .claude/skills/.'));
|
|
12
|
-
console.log(chalk.dim('If you want to modify it, edit your settings file directly.'));
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
// Display the configuration
|
|
16
|
-
console.log(chalk.white(`Copy this to ${chalk.bold(get_settings_location_message())}:\n`));
|
|
17
|
-
const config = generate_hook_config(hook_type);
|
|
18
|
-
console.log(chalk.cyan(config));
|
|
19
|
-
// Explain what it does
|
|
20
|
-
console.log(chalk.bold('\n💡 What this does:\n'));
|
|
21
|
-
if (hook_type === 'session-start') {
|
|
22
|
-
console.log(chalk.white(' • Fires once when Claude Code session starts'));
|
|
23
|
-
console.log(chalk.white(' • Costs ~15 tokens once per session'));
|
|
24
|
-
console.log(chalk.white(' • Claude sees reminder at start of conversation'));
|
|
25
|
-
console.log(chalk.yellow(' • May forget as conversation gets longer'));
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
console.log(chalk.white(' • Fires before Claude processes each prompt'));
|
|
29
|
-
console.log(chalk.white(' • Costs ~15 tokens per prompt'));
|
|
30
|
-
console.log(chalk.white(' • Makes Claude check your skills consistently'));
|
|
31
|
-
console.log(chalk.green(' • Recommended: Claude needs constant reminding!'));
|
|
32
|
-
}
|
|
33
|
-
console.log(chalk.white(' • No maintenance required (unlike skill-rules.json)'));
|
|
34
|
-
console.log(chalk.white(' • Claude decides which skills are relevant\n'));
|
|
35
|
-
// Show alternative
|
|
36
|
-
if (hook_type === 'session-start') {
|
|
37
|
-
console.log(chalk.dim('Alternative: UserPromptSubmit (constant reminders)'));
|
|
38
|
-
console.log(chalk.dim(' Run: claude-skills-cli hook-config\n'));
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
console.log(chalk.dim('Alternative: SessionStart (once per session)'));
|
|
42
|
-
console.log(chalk.dim(' Run: claude-skills-cli hook-config --session-start\n'));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=hook-config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hook-config.js","sourceRoot":"","sources":["../../src/commands/hook-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AA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,CAAC,KAAK,CACV,mDAAmD,CACnD,CACD,CAAC;QACF,OAAO,CAAC,GAAG,CACV,KAAK,CAAC,MAAM,CAAC,4CAA4C,CAAC,CAC1D,CAAC;IACH,CAAC;SAAM,CAAC;QACP,OAAO,CAAC,GAAG,CACV,KAAK,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAC5D,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CACV,KAAK,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAC9D,CAAC;QACF,OAAO,CAAC,GAAG,CACV,KAAK,CAAC,KAAK,CACV,mDAAmD,CACnD,CACD,CAAC;IACH,CAAC;IAED,OAAO,CAAC,GAAG,CACV,KAAK,CAAC,KAAK,CACV,uDAAuD,CACvD,CACD,CAAC;IACF,OAAO,CAAC,GAAG,CACV,KAAK,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAC7D,CAAC;IAEF,mBAAmB;IACnB,IAAI,SAAS,KAAK,eAAe,EAAE,CAAC;QACnC,OAAO,CAAC,GAAG,CACV,KAAK,CAAC,GAAG,CAAC,oDAAoD,CAAC,CAC/D,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC,CAAC;IAClE,CAAC;SAAM,CAAC;QACP,OAAO,CAAC,GAAG,CACV,KAAK,CAAC,GAAG,CAAC,8CAA8C,CAAC,CACzD,CAAC;QACF,OAAO,CAAC,GAAG,CACV,KAAK,CAAC,GAAG,CACR,wDAAwD,CACxD,CACD,CAAC;IACH,CAAC;AACF,CAAC"}
|
package/dist/commands/watch.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { watch } from 'node:fs';
|
|
2
|
-
import { basename, dirname, join } from 'node:path';
|
|
3
|
-
import { existsSync } from 'node:fs';
|
|
4
|
-
import { SkillValidator } from '../core/validator.js';
|
|
5
|
-
import { display_validation_stats, error, info, success, warning, } from '../utils/output.js';
|
|
6
|
-
export function watch_command(options) {
|
|
7
|
-
const { directory } = options;
|
|
8
|
-
const watch_path = directory || '.claude/skills';
|
|
9
|
-
if (!existsSync(watch_path)) {
|
|
10
|
-
error(`Directory does not exist: ${watch_path}`);
|
|
11
|
-
process.exit(1);
|
|
12
|
-
}
|
|
13
|
-
info(`Watching for changes in: ${watch_path}`);
|
|
14
|
-
console.log('='.repeat(60));
|
|
15
|
-
console.log('Auto-validating SKILL.md files on save...\n');
|
|
16
|
-
console.log('Press Ctrl+C to stop\n');
|
|
17
|
-
// Track last validation time to debounce rapid changes
|
|
18
|
-
const last_validation = new Map();
|
|
19
|
-
const DEBOUNCE_MS = 500;
|
|
20
|
-
// Watch recursively
|
|
21
|
-
const watcher = watch(watch_path, { recursive: true }, (eventType, filename) => {
|
|
22
|
-
if (!filename)
|
|
23
|
-
return;
|
|
24
|
-
// Only validate SKILL.md files
|
|
25
|
-
if (!filename.endsWith('SKILL.md'))
|
|
26
|
-
return;
|
|
27
|
-
const full_path = join(watch_path, filename);
|
|
28
|
-
const skill_path = dirname(full_path);
|
|
29
|
-
const skill_name = basename(skill_path);
|
|
30
|
-
// Debounce rapid changes
|
|
31
|
-
const now = Date.now();
|
|
32
|
-
const last = last_validation.get(full_path) || 0;
|
|
33
|
-
if (now - last < DEBOUNCE_MS)
|
|
34
|
-
return;
|
|
35
|
-
last_validation.set(full_path, now);
|
|
36
|
-
console.log('\n' + '='.repeat(60));
|
|
37
|
-
info(`Change detected: ${skill_name}/SKILL.md`);
|
|
38
|
-
console.log('='.repeat(60));
|
|
39
|
-
// Validate
|
|
40
|
-
const validator = new SkillValidator(skill_path);
|
|
41
|
-
const result = validator.validate_all();
|
|
42
|
-
// Display progressive disclosure stats
|
|
43
|
-
if (result.stats) {
|
|
44
|
-
display_validation_stats(result.stats);
|
|
45
|
-
}
|
|
46
|
-
// Print errors
|
|
47
|
-
if (result.errors.length > 0) {
|
|
48
|
-
console.log('\n❌ Errors:');
|
|
49
|
-
for (const err of result.errors) {
|
|
50
|
-
console.log(` ${err}`);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
// Print warnings
|
|
54
|
-
if (result.warnings.length > 0) {
|
|
55
|
-
console.log('\n⚠️ Warnings:');
|
|
56
|
-
for (const warn of result.warnings) {
|
|
57
|
-
console.log(` ${warn}`);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
// Print final status
|
|
61
|
-
if (!result.errors.length && !result.warnings.length) {
|
|
62
|
-
console.log('');
|
|
63
|
-
success(`✅ ${skill_name} is valid!`);
|
|
64
|
-
}
|
|
65
|
-
else if (!result.errors.length) {
|
|
66
|
-
console.log('');
|
|
67
|
-
warning(`⚠️ ${skill_name} is valid (with warnings)`);
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
console.log('');
|
|
71
|
-
error(`❌ ${skill_name} validation failed with ${result.errors.length} error(s)`);
|
|
72
|
-
}
|
|
73
|
-
console.log('\nWatching for changes...');
|
|
74
|
-
});
|
|
75
|
-
// Handle cleanup
|
|
76
|
-
process.on('SIGINT', () => {
|
|
77
|
-
console.log('\n\nStopping watcher...');
|
|
78
|
-
watcher.close();
|
|
79
|
-
process.exit(0);
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
//# sourceMappingURL=watch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"watch.js","sourceRoot":"","sources":["../../src/commands/watch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EACN,wBAAwB,EACxB,KAAK,EACL,IAAI,EACJ,OAAO,EACP,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AAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YACtD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAChB,OAAO,CAAC,KAAK,UAAU,YAAY,CAAC,CAAC;QACtC,CAAC;aAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YAClC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAChB,OAAO,CAAC,OAAO,UAAU,2BAA2B,CAAC,CAAC;QACvD,CAAC;aAAM,CAAC;YACP,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAChB,KAAK,CACJ,KAAK,UAAU,2BAA2B,MAAM,CAAC,MAAM,CAAC,MAAM,WAAW,CACzE,CAAC;QACH,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;IAC1C,CAAC,CACD,CAAC;IAEF,iBAAiB;IACjB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QACzB,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;QACvC,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/utils/settings.js
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
-
import { homedir } from 'node:os';
|
|
3
|
-
import { join } from 'node:path';
|
|
4
|
-
/**
|
|
5
|
-
* Get path to settings file (project-level or global)
|
|
6
|
-
* Returns null if neither exists
|
|
7
|
-
*/
|
|
8
|
-
export function get_settings_path() {
|
|
9
|
-
// Check project-level first
|
|
10
|
-
const project_settings = join(process.cwd(), '.claude', 'settings.json');
|
|
11
|
-
if (existsSync(project_settings)) {
|
|
12
|
-
return project_settings;
|
|
13
|
-
}
|
|
14
|
-
// Check global settings
|
|
15
|
-
const global_settings = join(homedir(), '.claude.json');
|
|
16
|
-
if (existsSync(global_settings)) {
|
|
17
|
-
return global_settings;
|
|
18
|
-
}
|
|
19
|
-
// Return project path even if doesn't exist (most likely location)
|
|
20
|
-
return project_settings;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Read and parse Claude settings file
|
|
24
|
-
*/
|
|
25
|
-
function read_settings(path) {
|
|
26
|
-
try {
|
|
27
|
-
const content = readFileSync(path, 'utf-8');
|
|
28
|
-
return JSON.parse(content);
|
|
29
|
-
}
|
|
30
|
-
catch {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Check if skill reminder hook exists in settings
|
|
36
|
-
*/
|
|
37
|
-
export function has_skill_reminder_hook() {
|
|
38
|
-
const settings_path = get_settings_path();
|
|
39
|
-
if (!settings_path || !existsSync(settings_path)) {
|
|
40
|
-
return false;
|
|
41
|
-
}
|
|
42
|
-
const settings = read_settings(settings_path);
|
|
43
|
-
if (!settings?.hooks) {
|
|
44
|
-
return false;
|
|
45
|
-
}
|
|
46
|
-
// Check UserPromptSubmit hooks
|
|
47
|
-
const user_prompt_hooks = settings.hooks.UserPromptSubmit;
|
|
48
|
-
if (user_prompt_hooks) {
|
|
49
|
-
for (const hook_group of user_prompt_hooks) {
|
|
50
|
-
for (const hook of hook_group.hooks) {
|
|
51
|
-
if (hook.command.includes('.claude/skills') ||
|
|
52
|
-
hook.command.includes('skills/')) {
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
// Check SessionStart hooks
|
|
59
|
-
const session_start_hooks = settings.hooks.SessionStart;
|
|
60
|
-
if (session_start_hooks) {
|
|
61
|
-
for (const hook_group of session_start_hooks) {
|
|
62
|
-
for (const hook of hook_group.hooks) {
|
|
63
|
-
if (hook.command.includes('.claude/skills') ||
|
|
64
|
-
hook.command.includes('skills/')) {
|
|
65
|
-
return true;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return false;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Generate hook configuration JSON string
|
|
74
|
-
*/
|
|
75
|
-
export function generate_hook_config(hook_type = 'user-prompt') {
|
|
76
|
-
if (hook_type === 'session-start') {
|
|
77
|
-
return `{
|
|
78
|
-
"hooks": {
|
|
79
|
-
"SessionStart": [{
|
|
80
|
-
"hooks": [{
|
|
81
|
-
"type": "command",
|
|
82
|
-
"command": "echo '💡 Skills available in .claude/skills/ - check for relevant ones!'"
|
|
83
|
-
}]
|
|
84
|
-
}]
|
|
85
|
-
}
|
|
86
|
-
}`;
|
|
87
|
-
}
|
|
88
|
-
// Default: UserPromptSubmit
|
|
89
|
-
return `{
|
|
90
|
-
"hooks": {
|
|
91
|
-
"UserPromptSubmit": [{
|
|
92
|
-
"hooks": [{
|
|
93
|
-
"type": "command",
|
|
94
|
-
"command": "echo '💡 Check .claude/skills/ for relevant skills before responding!'"
|
|
95
|
-
}]
|
|
96
|
-
}]
|
|
97
|
-
}
|
|
98
|
-
}`;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Get the recommended settings file location message
|
|
102
|
-
*/
|
|
103
|
-
export function get_settings_location_message() {
|
|
104
|
-
const settings_path = get_settings_path();
|
|
105
|
-
if (settings_path && existsSync(settings_path)) {
|
|
106
|
-
return settings_path;
|
|
107
|
-
}
|
|
108
|
-
return '.claude/settings.json (create this file in your project root)';
|
|
109
|
-
}
|
|
110
|
-
//# sourceMappingURL=settings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/utils/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;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