Ahmed Mohammed fdca81f984 add delegate-setup utility for fleet lane configuration
Introduce a setup-only skill that discovers implementer CLIs and writes
delegate-fleet.v1 lane maps (implementer + dials) to global or project
config after approval, without dispatching work or touching agent instruction files.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-31 18:32:32 +03:00

delegate-skills

relay smoke skills.sh License

Delegate the implementation. Keep the review, and the commit.

Your agent writes a self-contained brief, hands it to a separate implementer CLI, waits for a structured result, then reviews the diff and commits it itself. No relay in this repo ever commits.

npx skills add amElnagdy/delegate-skills

Then, in your orchestrating agent:

Use $codex-delegate to have Codex implement the refactor in services/billing/, then review and commit it.

The skills

Same loop, one implementer per skill. Pick the row you have a CLI for:

Skill Implementer CLI Write access (default) Read-only run Resume
agy-delegate Google Antigravity (agy) Antigravity's own permissions; bypass opt-in 1 --resume-last, --conversation <id>
claude-delegate Claude Code (claude) acceptEdits + explicit tool surface --read-only (plan mode) --resume-last, --session <id>
codex-delegate OpenAI Codex (codex) --sandbox workspace-write --read-only --resume-last, --session <id>
cursor-delegate Cursor Agent (cursor-agent) --force; --no-force withholds command approval --read-only (plan mode) --resume-last, --session <id>
grok-delegate Grok Build (grok) workspace-scoped; --full-access opt-in --read-only — best-effort 2 --resume-last, --session <id>
kimi-delegate Kimi Code (kimi) auto permission mode, always 1 --resume-last, --session <id>
opencode-delegate OpenCode (opencode) agent build (--model required) --read-only (agent plan) --resume-last, --session <id>
pi-delegate Pi (pi) full local tools — no sandbox, no permission modes 1 ; project trust opt-in --read-only (read,grep,find,ls) --resume-last, --session <id>
qoder-delegate Qoder (qodercli) auto permission mode; bypass opt-in --permission-mode plan --resume-last, --resume <id>
vibe-delegate Mistral Vibe (vibe) accept-edits; --full-access opt-in --plan-only (plan agent) --resume-last, --session <id>

Each skill name links to its SKILL.md, which owns that implementer's prerequisites, flags, and caveats. Building one for another CLI? Claim it first, then see CONTRIBUTING.md.

Setup (utility)

Skill Job
delegate-setup Discover installed CLIs, propose fleet lanes (implementer + model/effort dials), write global or project config after you approve. Never dispatches work.

A lane is a named binding such as “feature → OpenCode, model grok, variant high.” Config lives at ~/.config/delegate-skills/config.json (global) or .delegate/config.json (opt-in per repo). Relays do not yet consume --lane; until they do, use the map as orchestrator guidance and pass dials as flags.

Install

Browse first:

npx skills add amElnagdy/delegate-skills --list

Install the package, or just one skill (any name from the table above):

npx skills add amElnagdy/delegate-skills
npx skills add amElnagdy/delegate-skills --skill codex-delegate

Install for a specific agent, or globally:

npx skills add amElnagdy/delegate-skills --skill codex-delegate --agent claude-code
npx skills add amElnagdy/delegate-skills --global

Works with any orchestrating agent the Skills CLI supports.

What it does

flowchart LR
  subgraph orch["Orchestrator — you"]
    A["Write the brief"]
    D["Review the diff<br/>Re-run the gates"]
    E["Land the commit"]
  end
  subgraph impl["Implementer CLI"]
    C["Edits files in your repo"]
  end
  A -->|"dispatch via relay.mjs"| C
  C -->|"result.json"| D
  D -->|"gates pass"| E
  D -->|"needs another pass"| A
  1. Write a brief — self-contained task context; the implementer has no orchestrator chat history.
  2. Dispatch it with the bundled relay.mjs.
  3. Wait for completion — the relay writes a structured result.json.
  4. Review the diff — re-run the project's gates yourself; pair with guard skills.
  5. Land it — you commit, because committing belongs to the reviewer.
Use $claude-delegate to have a separate Claude Code session implement the parser fix, then review and commit it.
Use $codex-delegate to run this queue of migration tasks through Codex while I review each one.

Every relay speaks the same delegate-relay.result.v1 contract: status, exitCode, signal (with a host-killed hint when the OOM killer ends a run), the implementer's own final report, touchedFiles, and a session id where the CLI exposes one. Learn the loop once, swap the implementer freely.

You feel it when a bounded task — a migration, a mechanical refactor, a removal sweep — comes back as a clean diff with a structured report, and you land it after re-running the gates yourself instead of typing it all by hand.

What counts as a delegate skill

Four invariants hold for every skill here. They are also the bar for a new one:

  • A separate CLI edits a real working tree, and the diff is the deliverable. Not an API wrapper, not a gateway — an implementer whose work you can read with git diff.
  • The relay never commits. Committing belongs to the reviewer, always.
  • Node built-ins only. No dependencies, no network calls of its own, no credentials, no telemetry. The relay launches its implementer CLI and git, plus the platform process launcher where a Windows shim or a process-tree kill needs one.
  • Autonomy is stated in the CLI's own terms, and whatever it cannot enforce is said plainly — see the two footnotes above.

This is a loop, not a forwarder: a forwarder hands over one task and returns the output. Here you dispatch, poll, review, and land, across one task or a queue. It stays complementary to a vendor's own plugin or subagents — those coordinate inside one agent; this keeps the contract portable across orchestrators, with the commit on the reviewer.

Full checklist: CONTRIBUTING.md.

Requirements

  • The implementer CLI for the skill you install, authenticated as you would at the terminal. Each skill's SKILL.md carries its own install and login commands.
  • Node 18+ and git.
  • An orchestrating agent that can run shell commands and read files.
  • Shell examples assume bash/zsh (macOS/Linux, or Git Bash/WSL on Windows).

Trust and validation

This package is intentionally inspectable:

  • All skill content is Markdown, plus small Node scripts. Each *-delegate skill has exactly one scripts/relay.mjs. The delegate-setup utility ships discover.mjs / config.mjs (and a shared implementer table) instead of a relay — it never dispatches coding work.
  • Those scripts make no network calls of their own, read or write no credentials, send no telemetry, and have no dependencies (Node built-ins only). Relays launch an implementer CLI and git, plus the platform process launcher/termination utility where a Windows shim or process-tree kill requires one. Discover may invoke installed CLIs for --version / model list probes (those CLIs may contact their own services). Read the script before you run it.
  • None of the relays ever commit — committing is always the orchestrator's job, after review.

Verification status — claims here are backed by runs, not assumptions.

True of every relay: argument handling, exit codes, result.json shape, resume, and signal reporting are verified, along with each implementer-specific guard.

Per skill — platform, CLI version, and what the run exercised:

  • agy-delegate — macOS, agy 1.0.16: headless edit run, --print= delivery, absolute --add-dir workspace pin.
  • claude-delegate — macOS, claude 2.1.220: write run under acceptEdits; plan mode refusing an edit, with the porcelain tripwire true on a violation and false on a clean run; --session/--resume-last resume; claude_unavailable/127 and usage errors exiting 2 without a result file; deny rules and the shell sandbox blocking git commit, git push, git -C <dir> push, a nested claude, and a $HOME write.
  • cursor-delegate — Windows, cursor-agent 2026.07.23-e383d2b: write run under --force; plan-mode --read-only touching nothing; --session <id> resume applying a delta brief; usage errors exiting 2. A maintainer-run native macOS plan-mode smoke against the same version captured model, session, and usage with no touched files.
  • grok-delegate — macOS, grok 0.2.101: streaming-json report capture, file-based brief delivery, resume; read-only is best-effort by measurement, hence the violation flag.
  • kimi-delegate — macOS, kimi 0.24.0: headless -p edit run, stream-json parsing, and both resume paths — the relay's --session/--resume-last, which drive Kimi's own --session and --continue.
  • pi-delegate — macOS: stdin brief delivery, explicit provider and model selection, JSON session/provider/model/usage capture, and a --read-only run leaving a clean tree. Write, --session, and --resume-last runs are contributor-reported.
  • qoder-delegate — macOS, qodercli 1.0.47, by the contributor: Lite edit run, accept_edits, explicit model and 32768-token context window, no commit.
  • codex-delegate, opencode-delegate, vibe-delegate — contract-tested only: argument validation, bounded version preflight, missing binary, result parsing, and whole-process-tree timeout/abort cleanup. No end-to-end run is recorded here.
  • delegate-setup — contract-tested: discover JSON shape, config validate/write/load, whole-lane project overlay, global write without creating .delegate/. Live discover against installed CLIs runs in smoke (versions vary by machine). Native Windows discover smoke not yet claimed.

Not yet verified: native Windows launches for agy, claude, grok, kimi, pi, qoder, and vibe (the codex/opencode/grok .cmd shim handling is in place and quoted; Cursor serializes a pre-joined, quoted command; Qoder and Vibe target their documented native executables). Claude's own shell sandbox is unsupported on native Windows regardless of launch mechanics, and upstream Vibe officially targets UNIX. A native Linux cursor-agent run is unverified. The full delegate → review → commit loop is designed for and run on Claude Code; other orchestrators (Cursor, …) are designed-for but unproven.

Repository shape

Every skill has the same shape — a lean SKILL.md, four references that load only when needed, and one inspectable script:

skills/
└── <name>-delegate/
    ├── SKILL.md
    ├── scripts/relay.mjs
    └── references/
        ├── writing-the-brief.md
        ├── dispatch-and-poll.md
        ├── review-and-land.md
        └── multi-task-queues.md

Adding an implementer is a new directory plus two lines here: a table row, and a verification line once a run backs it.

Contributing? House rules, the controlled vocabulary, and the pre-publish checklist live in AGENTS.md — read it before opening a pull request, and point your agent at it too.

License

MIT — see LICENSE.


  1. No CLI-enforced read-only mode. touchedFiles and the diff, not a flag, are the guarantee. ↩︎

  2. grok cannot be prevented from writing headlessly, so the relay snapshots the tree and sets readOnlyViolation: true when a read-only run wrote anyway. ↩︎

S
Description
codex-delegate: Delegate a coding task to the OpenAI Codex CLI as a background implementer, then review its diff and land it yourself. Use this whenever the user wants to hand…; opencode-delegate: Delegate a coding task to the OpenCode CLI as a background implementer, then review its diff and land it yourself. Use this whenever the user wants to hand…; claude-delegate: Delegate a coding task to a separate Claude Code CLI process or another Claude session as an implementer, then review its diff…
Readme MIT 2.9 MiB
Languages
JavaScript 99.7%
Shell 0.3%