skilldrop-cli 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -1
- package/bin/skilldrop.js +66 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -285,7 +285,18 @@ npx skilldrop-cli install --agent code-quality --project # .claude/agents/, s
|
|
|
285
285
|
|
|
286
286
|
Then delegate by name: *"use the devils-advocate agent on this diff."*
|
|
287
287
|
|
|
288
|
-
|
|
288
|
+
Four targets, each projecting only as much as the tool's format demands:
|
|
289
|
+
|
|
290
|
+
| Target | Writes | Projection |
|
|
291
|
+
|---|---|---|
|
|
292
|
+
| *(default)* | `~/.claude/agents/<name>.md` | none — the file already is Claude Code's format |
|
|
293
|
+
| `--ide copilot` | `.github/agents/<name>.agent.md` | a rename |
|
|
294
|
+
| `--ide kiro` | `.kiro/agents/<name>.json` | generated JSON; tool names mapped to Kiro's built-ins |
|
|
295
|
+
| `--dest <dir>` | `<dir>/<name>.md` | none |
|
|
296
|
+
|
|
297
|
+
The Kiro emitter maps `Read`/`Grep`/`Glob`/`Bash` to `read`/`grep`/`glob`/`shell` against [Kiro's built-in tool reference](https://kiro.dev/docs/cli/reference/built-in-tools/), and **names any tool it can't map instead of dropping it silently** — a mistranslated permission is worse than a missing one. It omits `allowedTools` so you're prompted per tool call.
|
|
298
|
+
|
|
299
|
+
Codex and Antigravity still refuse, printing why: Codex's `.toml` agent schema was never confirmed, and emitting a guess is the one thing worse than not shipping the target. [`agents/README.md`](agents/README.md) has the manual route.
|
|
289
300
|
|
|
290
301
|
### Third-party catalogs — publish your own skills through the same CLI
|
|
291
302
|
|
package/bin/skilldrop.js
CHANGED
|
@@ -49,9 +49,12 @@ Install/update/uninstall targets (pick one):
|
|
|
49
49
|
.github/skills (Copilot), Continue / Cline / Aider
|
|
50
50
|
|
|
51
51
|
Options:
|
|
52
|
-
--agent operate on subagents instead of skills.
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
--agent operate on subagents instead of skills. Targets:
|
|
53
|
+
(default) ~/.claude/agents Claude Code (--project for repo scope)
|
|
54
|
+
--ide kiro ./.kiro/agents generated JSON, tools mapped
|
|
55
|
+
--ide copilot ./.github/agents <name>.agent.md
|
|
56
|
+
--dest <dir> any directory copied as-is
|
|
57
|
+
Codex and Antigravity still refuse with the reason — see agents/README.md.
|
|
55
58
|
--with-related also install each skill's related companions (one level)
|
|
56
59
|
--with-hooks also wire any hooks a skill declares (RFC-0006) — git pre-commit
|
|
57
60
|
reminders and Claude Code session-start context; degrades where the
|
|
@@ -175,11 +178,34 @@ function target(flags) {
|
|
|
175
178
|
die(`unknown --ide '${ide}' (claude | cursor | kiro; use --dest for anything else)`);
|
|
176
179
|
}
|
|
177
180
|
|
|
181
|
+
/* Claude Code tool name -> Kiro built-in tool name. Confirmed against
|
|
182
|
+
kiro.dev/docs/cli/reference/built-in-tools/ — not inferred. Agent configs use these
|
|
183
|
+
simplified names; Kiro's *hook* matchers use internal names (fs_read, execute_bash)
|
|
184
|
+
instead, and mixing the two silently grants nothing. */
|
|
185
|
+
const KIRO_TOOLS = {
|
|
186
|
+
Read: "read", Grep: "grep", Glob: "glob", Bash: "shell",
|
|
187
|
+
Write: "write", Edit: "write", WebSearch: "web_search", WebFetch: "web_fetch",
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
function kiroAgentJSON(meta, body) {
|
|
191
|
+
const declared = meta.tools ? meta.tools.split(",").map((s) => s.trim()).filter(Boolean) : [];
|
|
192
|
+
const tools = [], unmapped = [];
|
|
193
|
+
for (const d of declared) (KIRO_TOOLS[d] ? tools : unmapped).push(KIRO_TOOLS[d] || d);
|
|
194
|
+
// The prompt is inlined rather than a file:// reference: the docs' example is
|
|
195
|
+
// relative, but whether it resolves against the workspace root or the JSON file is
|
|
196
|
+
// not stated, and a wrong path fails silently. One self-contained file cannot.
|
|
197
|
+
const agent = { name: meta.name, description: meta.description, prompt: body, tools };
|
|
198
|
+
// allowedTools is deliberately omitted — it is auto-approval, so leaving it out means
|
|
199
|
+
// the user is prompted per tool call. Also sidesteps kirodotdev/Kiro#6714, where
|
|
200
|
+
// allowedTools does not load as configured.
|
|
201
|
+
return { json: JSON.stringify(agent, null, 2) + "\n", unmapped: [...new Set(unmapped)] };
|
|
202
|
+
}
|
|
203
|
+
|
|
178
204
|
/* Only plain-copy targets ship in RFC-0012. Everything else needs a projection the
|
|
179
205
|
install-target model (RFC-0010) has not settled — so say so instead of guessing a path. */
|
|
180
206
|
const AGENT_MANUAL = {
|
|
181
|
-
|
|
182
|
-
|
|
207
|
+
codex: ".codex/*.toml — the schema was never confirmed, so emitting one would be a guess",
|
|
208
|
+
antigravity: "an agents/ directory inside a plugin bundle you own",
|
|
183
209
|
cursor: "a custom mode — Cursor has no agent file format",
|
|
184
210
|
};
|
|
185
211
|
function agentTarget(flags) {
|
|
@@ -189,11 +215,34 @@ function agentTarget(flags) {
|
|
|
189
215
|
return flags.project
|
|
190
216
|
? { dest: path.resolve(".claude", "agents"), ide }
|
|
191
217
|
: { dest: path.join(os.homedir(), ".claude", "agents"), ide };
|
|
218
|
+
if (ide === "kiro")
|
|
219
|
+
return flags.project === false
|
|
220
|
+
? { dest: path.join(os.homedir(), ".kiro", "agents"), ide }
|
|
221
|
+
: { dest: path.resolve(".kiro", "agents"), ide };
|
|
222
|
+
if (ide === "copilot") return { dest: path.resolve(".github", "agents"), ide };
|
|
192
223
|
const hint = AGENT_MANUAL[ide];
|
|
193
|
-
die(`--agent has no
|
|
224
|
+
die(`--agent has no target for '${ide}'${hint ? ` — it needs ${hint}` : ""}.\n` +
|
|
194
225
|
` Copy it by hand (see agents/README.md), or use --dest <dir>. Tracked in RFC-0012.`);
|
|
195
226
|
}
|
|
196
227
|
|
|
228
|
+
/* Write one agent into a target, projecting only where the target's format demands it.
|
|
229
|
+
Returns the filename written plus any warning worth printing. */
|
|
230
|
+
function writeAgent(cat, a, dest, ide) {
|
|
231
|
+
const src = agentPath(cat, a);
|
|
232
|
+
if (ide === "kiro") {
|
|
233
|
+
const raw = fs.readFileSync(src, "utf8");
|
|
234
|
+
const body = raw.split("---").slice(2).join("---").trim();
|
|
235
|
+
const { json, unmapped } = kiroAgentJSON(agentMeta(cat, a), body);
|
|
236
|
+
fs.writeFileSync(path.join(dest, `${a}.json`), json);
|
|
237
|
+
return { file: `${a}.json`, warn: unmapped.length
|
|
238
|
+
? ` ${a}: no Kiro equivalent for ${unmapped.join(", ")} — dropped from tools, add by hand if needed`
|
|
239
|
+
: null };
|
|
240
|
+
}
|
|
241
|
+
const name = ide === "copilot" ? `${a}.agent.md` : `${a}.md`;
|
|
242
|
+
fs.copyFileSync(src, path.join(dest, name));
|
|
243
|
+
return { file: name, warn: null };
|
|
244
|
+
}
|
|
245
|
+
|
|
197
246
|
function ledger(dest) {
|
|
198
247
|
const p = path.join(dest, LEDGER);
|
|
199
248
|
return { path: p, data: fs.existsSync(p) ? readJSON(p) : {} };
|
|
@@ -500,14 +549,19 @@ function installAgents(args) {
|
|
|
500
549
|
const { dest, ide } = agentTarget(args.flags);
|
|
501
550
|
fs.mkdirSync(dest, { recursive: true });
|
|
502
551
|
const l = ledger(dest);
|
|
552
|
+
const warns = [];
|
|
503
553
|
for (const a of names) {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
554
|
+
const { file, warn } = writeAgent(cat, a, dest, ide);
|
|
555
|
+
if (warn) warns.push(warn);
|
|
556
|
+
l.data[a] = { version: null, source: cat.source, file }; // agents carry no version yet (RFC-0012)
|
|
557
|
+
console.log(`installed ${a} -> ${path.join(dest, file)}`);
|
|
507
558
|
}
|
|
508
559
|
saveLedger(l);
|
|
509
560
|
console.log(`\n${names.length} agent(s) installed (${ide}).`);
|
|
561
|
+
if (warns.length) console.log(`\nTool mapping:\n${warns.join("\n")}`);
|
|
510
562
|
if (ide === "claude") console.log("Delegate by name, e.g. \"use the devils-advocate agent on this diff\".");
|
|
563
|
+
if (ide === "kiro") console.log("Kiro grants `tools` but not auto-approval — you are prompted per call by design.");
|
|
564
|
+
if (ide === "copilot") console.log("Invoke with: copilot --agent <name>");
|
|
511
565
|
if (cat.source !== BUNDLED)
|
|
512
566
|
console.log(`\nWARNING: third-party catalog '${cat.source}'. An agent is a system prompt your tool will adopt — read it before first use. Install copied files only; nothing was executed.`);
|
|
513
567
|
}
|
|
@@ -517,7 +571,9 @@ function uninstallAgents(args) {
|
|
|
517
571
|
const { dest } = agentTarget(args.flags);
|
|
518
572
|
const l = ledger(dest);
|
|
519
573
|
for (const a of args._) {
|
|
520
|
-
|
|
574
|
+
const rec = l.data[a];
|
|
575
|
+
for (const f of new Set([rec && rec.file, `${a}.md`, `${a}.json`, `${a}.agent.md`].filter(Boolean)))
|
|
576
|
+
fs.rmSync(path.join(dest, f), { force: true });
|
|
521
577
|
delete l.data[a];
|
|
522
578
|
console.log(`removed ${a} from ${dest}`);
|
|
523
579
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skilldrop-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Portable AI-agent skills for the deliverables knowledge workers ship \u2014 diagrams, ADRs, PRDs, runbooks, decks, reviews \u2014 installable into Claude Code, Cursor, Kiro, and any IDE that takes custom instructions. One command per skill or per role-based pack.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"skilldrop": "bin/skilldrop.js"
|