skilldrop-cli 0.6.0 → 0.7.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 CHANGED
@@ -292,11 +292,14 @@ Four targets, each projecting only as much as the tool's format demands:
292
292
  | *(default)* | `~/.claude/agents/<name>.md` | none — the file already is Claude Code's format |
293
293
  | `--ide copilot` | `.github/agents/<name>.agent.md` | a rename |
294
294
  | `--ide kiro` | `.kiro/agents/<name>.json` | generated JSON; tool names mapped to Kiro's built-ins |
295
+ | `--ide codex` | `~/.codex/agents/<name>.toml` (`--project` for repo) | generated TOML |
295
296
  | `--dest <dir>` | `<dir>/<name>.md` | none |
296
297
 
297
298
  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
 
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.
300
+ Each generated target omits the permission field it cannot map safely rather than guessing one: Kiro's `allowedTools` and Codex's `sandbox_mode` are both left unset, so an agent inherits the session's permissions and is prompted per call. A widened permission nobody asked for is worse than an extra prompt.
301
+
302
+ Only **Antigravity** still refuses — its subagents exist solely inside a plugin bundle, which is a container rather than a file drop. Design is worked out in [RFC-0013](docs/rfcs/0013-antigravity-plugin-bundle.md), unimplemented pending demand. [`agents/README.md`](agents/README.md) has the manual route.
300
303
 
301
304
  ### Third-party catalogs — publish your own skills through the same CLI
302
305
 
package/agents/README.md CHANGED
@@ -40,9 +40,11 @@ Cursor has no subagent file format. Two options:
40
40
 
41
41
  ### Codex (native subagents)
42
42
 
43
- Codex shipped subagents with GPT-5.5 in April 2026 — `.toml` agent definitions under `.codex/`. That superseded the old advice here, which was to paste the body into a section of `AGENTS.md` because Codex "has no subagent concept."
43
+ ```bash
44
+ npx skilldrop-cli install --agent devils-advocate --ide codex # ~/.codex/agents/<name>.toml
45
+ ```
44
46
 
45
- The exact filename and schema were **not confirmed** in the survey, so check Codex's own docs rather than trusting a shape written here. The fallback still works: keep the file at `agents/<name>.md` and open the review turn with "Follow the instructions in `agents/<name>.md` for the diff below."
47
+ Standalone TOML in `~/.codex/agents/` or `.codex/agents/` (`--project`). Codex requires `name`, `description`, and `developer_instructions`, and **rejects unknown fields** — so the emitter writes exactly those three. It leaves `sandbox_mode` unset, which means the agent inherits the parent session's permissions; Codex has no `tools` field, and guessing a sandbox value would either break the agent or silently widen what it can do.
46
48
 
47
49
  ### Kiro (native custom agents)
48
50
 
package/bin/skilldrop.js CHANGED
@@ -53,8 +53,9 @@ Options:
53
53
  (default) ~/.claude/agents Claude Code (--project for repo scope)
54
54
  --ide kiro ./.kiro/agents generated JSON, tools mapped
55
55
  --ide copilot ./.github/agents <name>.agent.md
56
+ --ide codex ~/.codex/agents generated TOML (--project for repo)
56
57
  --dest <dir> any directory copied as-is
57
- Codex and Antigravity still refuse with the reason — see agents/README.md.
58
+ Antigravity needs a plugin bundle (RFC-0013) — see agents/README.md.
58
59
  --with-related also install each skill's related companions (one level)
59
60
  --with-hooks also wire any hooks a skill declares (RFC-0006) — git pre-commit
60
61
  reminders and Claude Code session-start context; degrades where the
@@ -201,11 +202,24 @@ function kiroAgentJSON(meta, body) {
201
202
  return { json: JSON.stringify(agent, null, 2) + "\n", unmapped: [...new Set(unmapped)] };
202
203
  }
203
204
 
205
+ /* Codex agent TOML. Schema confirmed at learn.chatgpt.com/docs/agent-configuration/subagents:
206
+ name, description and developer_instructions are required; unknown fields are rejected.
207
+ sandbox_mode is deliberately NOT emitted — Codex has no `tools` field, permissions come
208
+ from sandbox_mode, and its permitted values are unconfirmed. Omitting it inherits the
209
+ parent session, which is the only behaviour that can neither break the agent nor
210
+ silently widen what it may do. */
211
+ function codexAgentTOML(meta, body) {
212
+ const esc = (s) => s.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
213
+ const safe = body.includes('"""') ? body.replace(/"""/g, '\\"\\"\\"') : body;
214
+ return `name = "${esc(meta.name)}"\n` +
215
+ `description = "${esc(meta.description)}"\n` +
216
+ `developer_instructions = """\n${safe}\n"""\n`;
217
+ }
218
+
204
219
  /* Only plain-copy targets ship in RFC-0012. Everything else needs a projection the
205
220
  install-target model (RFC-0010) has not settled — so say so instead of guessing a path. */
206
221
  const AGENT_MANUAL = {
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",
222
+ antigravity: "an agents/ directory inside a plugin bundle you own — see RFC-0013",
209
223
  cursor: "a custom mode — Cursor has no agent file format",
210
224
  };
211
225
  function agentTarget(flags) {
@@ -215,11 +229,13 @@ function agentTarget(flags) {
215
229
  return flags.project
216
230
  ? { dest: path.resolve(".claude", "agents"), ide }
217
231
  : { 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 };
232
+ // Kiro and Copilot agent dirs are repo-relative by convention, so --project is implied.
233
+ if (ide === "kiro") return { dest: path.resolve(".kiro", "agents"), ide };
222
234
  if (ide === "copilot") return { dest: path.resolve(".github", "agents"), ide };
235
+ if (ide === "codex")
236
+ return flags.project
237
+ ? { dest: path.resolve(".codex", "agents"), ide }
238
+ : { dest: path.join(os.homedir(), ".codex", "agents"), ide };
223
239
  const hint = AGENT_MANUAL[ide];
224
240
  die(`--agent has no target for '${ide}'${hint ? ` — it needs ${hint}` : ""}.\n` +
225
241
  ` Copy it by hand (see agents/README.md), or use --dest <dir>. Tracked in RFC-0012.`);
@@ -238,6 +254,12 @@ function writeAgent(cat, a, dest, ide) {
238
254
  ? ` ${a}: no Kiro equivalent for ${unmapped.join(", ")} — dropped from tools, add by hand if needed`
239
255
  : null };
240
256
  }
257
+ if (ide === "codex") {
258
+ const raw = fs.readFileSync(src, "utf8");
259
+ const body = raw.split("---").slice(2).join("---").trim();
260
+ fs.writeFileSync(path.join(dest, `${a}.toml`), codexAgentTOML(agentMeta(cat, a), body));
261
+ return { file: `${a}.toml`, warn: null };
262
+ }
241
263
  const name = ide === "copilot" ? `${a}.agent.md` : `${a}.md`;
242
264
  fs.copyFileSync(src, path.join(dest, name));
243
265
  return { file: name, warn: null };
@@ -562,6 +584,7 @@ function installAgents(args) {
562
584
  if (ide === "claude") console.log("Delegate by name, e.g. \"use the devils-advocate agent on this diff\".");
563
585
  if (ide === "kiro") console.log("Kiro grants `tools` but not auto-approval — you are prompted per call by design.");
564
586
  if (ide === "copilot") console.log("Invoke with: copilot --agent <name>");
587
+ if (ide === "codex") console.log("sandbox_mode is left unset, so each agent inherits the parent session's permissions.");
565
588
  if (cat.source !== BUNDLED)
566
589
  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.`);
567
590
  }
@@ -572,7 +595,7 @@ function uninstallAgents(args) {
572
595
  const l = ledger(dest);
573
596
  for (const a of args._) {
574
597
  const rec = l.data[a];
575
- for (const f of new Set([rec && rec.file, `${a}.md`, `${a}.json`, `${a}.agent.md`].filter(Boolean)))
598
+ for (const f of new Set([rec && rec.file, `${a}.md`, `${a}.json`, `${a}.agent.md`, `${a}.toml`].filter(Boolean)))
576
599
  fs.rmSync(path.join(dest, f), { force: true });
577
600
  delete l.data[a];
578
601
  console.log(`removed ${a} from ${dest}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skilldrop-cli",
3
- "version": "0.6.0",
3
+ "version": "0.7.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"