@ichintansoni/skills-master 0.1.24 → 0.1.26
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 +1 -1
- package/dist/bin.js +71 -39
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ npx @ichintansoni/skills-master doctor # same detection,
|
|
|
32
32
|
| GitHub Copilot | `.github/instructions/<name>.instructions.md` |
|
|
33
33
|
| AGENTS.md | a sentinel-marked block (your hand-written content is preserved) |
|
|
34
34
|
|
|
35
|
-
Flags: `--target claude,cursor,copilot,agents|all` · `--with-pairs` (also install the paired code↔design skill) · `--dry-run` · `--overwrite` · `--content <dir>` (use a local skills checkout) · `--ref <git-ref>`. An explicit `--target` or `--ref` is remembered in `skills-master.json`, and `--target` widens the configured set rather than replacing it.
|
|
35
|
+
Flags: `--target claude,cursor,copilot,agents,agents-skills|all` · `--with-pairs` (also install the paired code↔design skill) · `--dry-run` · `--overwrite` · `--content <dir>` (use a local skills checkout) · `--ref <git-ref>`. An explicit `--target` or `--ref` is remembered in `skills-master.json`, and `--target` widens the configured set rather than replacing it.
|
|
36
36
|
|
|
37
37
|
Claude Code users can alternatively install via the plugin marketplace:
|
|
38
38
|
|
package/dist/bin.js
CHANGED
|
@@ -4,16 +4,17 @@
|
|
|
4
4
|
import { Command } from "commander";
|
|
5
5
|
|
|
6
6
|
// package.json
|
|
7
|
-
var version = "0.1.
|
|
7
|
+
var version = "0.1.26";
|
|
8
8
|
|
|
9
9
|
// src/schema/projectConfig.ts
|
|
10
10
|
import { z } from "zod";
|
|
11
|
-
var TargetIdSchema = z.enum(["claude", "cursor", "copilot", "agents"]);
|
|
11
|
+
var TargetIdSchema = z.enum(["claude", "cursor", "copilot", "agents", "agents-skills"]);
|
|
12
12
|
var DEFAULT_PATHS = {
|
|
13
13
|
claude: ".claude/skills",
|
|
14
14
|
cursor: ".cursor/rules",
|
|
15
15
|
copilot: ".github",
|
|
16
|
-
agents: "AGENTS.md"
|
|
16
|
+
agents: "AGENTS.md",
|
|
17
|
+
"agents-skills": ".agents/skills"
|
|
17
18
|
};
|
|
18
19
|
var ProjectConfigSchema = z.object({
|
|
19
20
|
$schema: z.string().optional(),
|
|
@@ -28,7 +29,8 @@ var ProjectConfigSchema = z.object({
|
|
|
28
29
|
claude: z.string(),
|
|
29
30
|
cursor: z.string(),
|
|
30
31
|
copilot: z.string(),
|
|
31
|
-
agents: z.string()
|
|
32
|
+
agents: z.string(),
|
|
33
|
+
"agents-skills": z.string()
|
|
32
34
|
}).partial().default({}),
|
|
33
35
|
/** @deprecated accepted for configs written by older versions; never written. */
|
|
34
36
|
scope: z.enum(["project"]).optional(),
|
|
@@ -42,7 +44,8 @@ function resolvePaths(cfg) {
|
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
// src/types.ts
|
|
45
|
-
var ALL_TARGETS = ["claude", "cursor", "copilot", "agents"];
|
|
47
|
+
var ALL_TARGETS = ["claude", "cursor", "copilot", "agents", "agents-skills"];
|
|
48
|
+
var DEFAULT_TARGETS = ["claude", "cursor", "copilot", "agents"];
|
|
46
49
|
var RESOURCE_FILES = {
|
|
47
50
|
reference: "reference.md",
|
|
48
51
|
examples: "examples.md",
|
|
@@ -89,6 +92,39 @@ ${body.trim()}
|
|
|
89
92
|
`;
|
|
90
93
|
}
|
|
91
94
|
|
|
95
|
+
// src/emitters/spec-skill.ts
|
|
96
|
+
function specSkillFiles(skill, dir) {
|
|
97
|
+
const xm = skill.frontmatter["x-skills-master"];
|
|
98
|
+
const note = stabilityNote(xm.stability, xm.snapshot_date);
|
|
99
|
+
const fm = {
|
|
100
|
+
name: skill.frontmatter.name,
|
|
101
|
+
description: skill.frontmatter.description,
|
|
102
|
+
...skill.frontmatter.license ? { license: skill.frontmatter.license } : {},
|
|
103
|
+
metadata: {
|
|
104
|
+
version: quoted(xm.version),
|
|
105
|
+
"snapshot-date": quoted(xm.snapshot_date)
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
const files = [
|
|
109
|
+
{
|
|
110
|
+
path: `${dir}/SKILL.md`,
|
|
111
|
+
contents: withFrontmatter(fm, withStabilityNote(skill.body, note)),
|
|
112
|
+
mode: "whole"
|
|
113
|
+
}
|
|
114
|
+
];
|
|
115
|
+
for (const key of Object.keys(RESOURCE_FILES)) {
|
|
116
|
+
const text = skill.resources[key];
|
|
117
|
+
if (text) {
|
|
118
|
+
files.push({
|
|
119
|
+
path: `${dir}/${RESOURCE_FILES[key]}`,
|
|
120
|
+
contents: text.trimEnd() + "\n",
|
|
121
|
+
mode: "whole"
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return files;
|
|
126
|
+
}
|
|
127
|
+
|
|
92
128
|
// src/emitters/util.ts
|
|
93
129
|
import { existsSync } from "fs";
|
|
94
130
|
import { join } from "path";
|
|
@@ -167,36 +203,7 @@ var claudeEmitter = {
|
|
|
167
203
|
label: "Claude Code",
|
|
168
204
|
detect: (root) => existsRel(root, ".claude"),
|
|
169
205
|
emit(skill, ctx) {
|
|
170
|
-
|
|
171
|
-
const xm = skill.frontmatter["x-skills-master"];
|
|
172
|
-
const note = stabilityNote(xm.stability, xm.snapshot_date);
|
|
173
|
-
const fm = {
|
|
174
|
-
name: skill.frontmatter.name,
|
|
175
|
-
description: skill.frontmatter.description,
|
|
176
|
-
...skill.frontmatter.license ? { license: skill.frontmatter.license } : {},
|
|
177
|
-
metadata: {
|
|
178
|
-
version: quoted(xm.version),
|
|
179
|
-
"snapshot-date": quoted(xm.snapshot_date)
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
const files = [
|
|
183
|
-
{
|
|
184
|
-
path: `${dir}/SKILL.md`,
|
|
185
|
-
contents: withFrontmatter(fm, withStabilityNote(skill.body, note)),
|
|
186
|
-
mode: "whole"
|
|
187
|
-
}
|
|
188
|
-
];
|
|
189
|
-
for (const key of Object.keys(RESOURCE_FILES)) {
|
|
190
|
-
const text = skill.resources[key];
|
|
191
|
-
if (text) {
|
|
192
|
-
files.push({
|
|
193
|
-
path: `${dir}/${RESOURCE_FILES[key]}`,
|
|
194
|
-
contents: text.trimEnd() + "\n",
|
|
195
|
-
mode: "whole"
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
return files;
|
|
206
|
+
return specSkillFiles(skill, `${ctx.paths.claude}/${skill.name}`);
|
|
200
207
|
}
|
|
201
208
|
};
|
|
202
209
|
|
|
@@ -348,8 +355,33 @@ ${body.trim()}`;
|
|
|
348
355
|
}
|
|
349
356
|
};
|
|
350
357
|
|
|
358
|
+
// src/emitters/agents-skills.ts
|
|
359
|
+
var agentsSkillsEmitter = {
|
|
360
|
+
id: "agents-skills",
|
|
361
|
+
label: "Agent Skills (.agents/skills)",
|
|
362
|
+
/**
|
|
363
|
+
* `.agents/` is the standard root itself; `.gemini/` means Gemini CLI is in
|
|
364
|
+
* use, and it reads `.agents/skills` in preference to its own directory.
|
|
365
|
+
*
|
|
366
|
+
* `AGENTS.md` is deliberately *not* evidence here, even though it is the
|
|
367
|
+
* clearest sign of a Codex project: it is what the `agents` target already
|
|
368
|
+
* claims, and a project detected by both would hand Codex the same content
|
|
369
|
+
* twice — once as a digest block, once as a full skill.
|
|
370
|
+
*/
|
|
371
|
+
detect: (root) => existsRel(root, ".agents") || existsRel(root, ".gemini"),
|
|
372
|
+
emit(skill, ctx) {
|
|
373
|
+
return specSkillFiles(skill, `${ctx.paths["agents-skills"]}/${skill.name}`);
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
|
|
351
377
|
// src/emitters/index.ts
|
|
352
|
-
var EMITTERS = [
|
|
378
|
+
var EMITTERS = [
|
|
379
|
+
claudeEmitter,
|
|
380
|
+
cursorEmitter,
|
|
381
|
+
copilotEmitter,
|
|
382
|
+
agentsEmitter,
|
|
383
|
+
agentsSkillsEmitter
|
|
384
|
+
];
|
|
353
385
|
var BY_ID = new Map(EMITTERS.map((e) => [e.id, e]));
|
|
354
386
|
function getEmitter(id) {
|
|
355
387
|
return BY_ID.get(id);
|
|
@@ -478,8 +510,8 @@ function initCommand(opts) {
|
|
|
478
510
|
targets = detected;
|
|
479
511
|
log.info(`Detected tools: ${detected.join(", ")}`);
|
|
480
512
|
} else {
|
|
481
|
-
targets =
|
|
482
|
-
log.info(`No tools detected \u2014 defaulting to
|
|
513
|
+
targets = DEFAULT_TARGETS;
|
|
514
|
+
log.info(`No tools detected \u2014 defaulting to ${DEFAULT_TARGETS.join(", ")}.`);
|
|
483
515
|
}
|
|
484
516
|
}
|
|
485
517
|
const cfg = ProjectConfigSchema.parse({
|
|
@@ -1047,7 +1079,7 @@ function resolveTargets(cwd, configured, explicit) {
|
|
|
1047
1079
|
if (explicit?.length) return explicit;
|
|
1048
1080
|
if (configured.length) return configured;
|
|
1049
1081
|
const detected = detectTargets(cwd);
|
|
1050
|
-
return detected.length ? detected :
|
|
1082
|
+
return detected.length ? detected : DEFAULT_TARGETS;
|
|
1051
1083
|
}
|
|
1052
1084
|
function parseTargets(value) {
|
|
1053
1085
|
if (!value) return void 0;
|
package/package.json
CHANGED