# delegate-skills

> Agent skills that hand a coding task to a separate implementer CLI — Codex, Claude Code, Cursor, OpenCode and thirteen more — then leave the review and the commit to you

- Category: Agents & Automation / Agent Skills & Plugins
- Language: JavaScript
- Licence: MIT
- Repository: https://github.com/amElnagdy/delegate-skills
- Canonical page: https://ai-tldr.dev/tools/delegate-skills/

## In short

delegate-skills is a package of agent skills that turns the agent you are talking to into an orchestrator and another coding-agent CLI into its implementer. It sits in the Agent Skills & Plugins category of the Agents & Automation tools and is open-source, written in JavaScript and licensed MIT. To get started: browse the package.

## Overview

delegate-skills is a package of agent skills that turns the agent you are talking to into an orchestrator and another coding-agent CLI into its implementer. There is one `*-delegate` skill per implementer — Aider, Google Antigravity, Claude Code, Cline, OpenAI Codex, Command Code, Cursor Agent, Grok Build, Kimi Code, OpenCode, Pi, Oh My Pi, Qoder, Mistral Vibe, GitHub Copilot CLI, Warp Agent CLI and Z.AI ZCode — plus a `delegate-setup` skill. Every dispatch follows the same review-first loop: write a self-contained brief (the implementer has none of the orchestrator's chat history), dispatch it with the bundled `relay.mjs`, wait for the structured `result.json`, review the diff and re-run the project's gates, then commit yourself. The relay never commits; committing belongs to the reviewer.

`delegate-setup` adds the fleet layer. It discovers which implementer CLIs are installed, proposes named lanes such as `feature`, `tests` and `ui` — each lane binding a kind of work to one implementer and optional dials like model, effort or variant — shows the complete configuration and writes it, globally or per repository, only after explicit approval. It never dispatches work itself. Afterwards you dispatch with the matching `*-delegate` skill and `--lane <name>`; explicit flags override lane dials, the wrong implementer skill for a lane fails loud, and project config is bound to the approval, so a cloned or edited project lane fails closed until re-approved.

Every relay speaks one `delegate-relay.result.v1` contract — `status`, `exitCode`, `signal`, the implementer's own final report, `touchedFiles` and a session id where the CLI exposes one — so the loop is learned once and the implementer can be swapped. Autonomy is stated in each CLI's own terms: the README tables each implementer's default write access, read-only mode and resume flags, and says plainly where a CLI cannot enforce read-only (Grok, Kimi, Warp) or has no sandbox at all. The scripts use Node built-ins only, with no dependencies, no network calls of their own, no credentials and no telemetry, and the README keeps a per-skill record of which platform and CLI version each relay was actually run against. MIT-licensed; the full loop is designed for and run on Claude Code, with other orchestrators supported by the Skills CLI described as designed-for but unproven.

## What it does

- Seventeen implementer skills, one per CLI: Aider, Antigravity, Claude Code, Cline, Codex, Command Code, Cursor Agent, Grok Build, Kimi Code, OpenCode, Pi, Oh My Pi, Qoder, Mistral Vibe, Copilot CLI, Warp and ZCode
- A bundled relay.mjs per skill that launches the implementer and writes a structured result.json in a shared delegate-relay.result.v1 shape
- delegate-setup discovers installed CLIs and writes an approved fleet of named lanes, each with its own implementer and model/effort dials
- Read-only runs and session resume (--read-only, --resume-last, --session <id>) mapped to each CLI's own modes where it has them
- The relay never commits — Aider's auto-commit and dirty-commit defaults are force-disabled — so the reviewer always lands the change
- Documented limits per CLI, such as a readOnlyViolation tripwire where a CLI cannot be stopped from writing headlessly
- Node 18+ built-ins only: no dependencies, no network calls of its own, no credentials, no telemetry
- Per-skill verification notes listing the platform, CLI version and runs each relay was tested with

## Getting started

You need Node 18+, git, an orchestrating agent that can run shell commands and read files, and — for each `*-delegate` skill — its implementer CLI installed and logged in as you would at the terminal.

1. Browse the package

   List the skills before installing anything.

```bash
npx skills add amElnagdy/delegate-skills --list
```

2. Install the package, or just the pieces you need

   Install everything, only the setup skill, or a single implementer. Append an existing release tag as @vMAJOR.MINOR.PATCH to pin an installation.

```bash
npx skills add amElnagdy/delegate-skills
npx skills add amElnagdy/delegate-skills --skill delegate-setup
npx skills add amElnagdy/delegate-skills --skill codex-delegate
```

3. Target a specific agent, or install globally

   The Skills CLI can install for a named orchestrating agent or for every project.

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

4. Create a fleet

   Ask the orchestrator to run the setup skill. It proposes lanes and writes the config only after you approve it.

```text
Use $delegate-setup to discover my installed implementer CLIs and create a fleet for feature, tests, and UI work.
```

5. Delegate, review, land

   Name an implementer skill directly, or pick a lane. The orchestrator writes the brief, runs the relay, reviews the diff and commits.

```text
Use $codex-delegate to have Codex implement the refactor in services/billing/, then review and commit it.
Use $opencode-delegate with --lane feature to implement the billing workflow, then review and commit it.
```

6. What the orchestrator runs underneath

   Each skill's SKILL.md documents its relay. For Codex it wraps codex exec and writes result.json to a temp directory so the repo under review stays clean.

```bash
node "<skill-dir>/scripts/relay.mjs" --brief brief.txt --cd /path/to/repo
```

## When to use it

- Hand a bounded task — a migration, a mechanical refactor, a removal sweep — to another coding agent and get it back as a clean diff with a structured report
- Route different kinds of work to different CLIs, such as features to OpenCode, tests to Codex and UI to Cursor, through named lanes
- Run a queue of coding tasks through one implementer while staying the reviewer of every diff
- Ask a second agent for a read-only review or diagnosis without letting it edit the tree, where the CLI supports a read-only mode
- Keep one delegation workflow while switching implementers, since every relay returns the same result contract
