Delegate mechanical coding tasks from Claude Code to GitHub Copilot CLI in non-interactive autonomous mode.
Claude Code stays the orchestrator — it writes the domain logic, defines each subtask contract, and reviews the diffs. Copilot CLI absorbs the purely mechanical work (boilerplate, renames, dead-code cleanup, simple specs, DTO mapping, PR descriptions) in the background, so your Claude context and tokens go to the work only Claude can do.
Inspired by the structure of openai/codex-plugin-cc. Not affiliated with GitHub, Microsoft, OpenAI, or Anthropic.
Lea esto en español: README.es.md
- Claude Code
- A GitHub Copilot subscription
- GitHub Copilot CLI ≥ 1.0.67 (
npm install -g @github/copilot)
In Claude Code:
/plugin marketplace add santiquiroz/copilot-plugin-cc
/plugin install copilot@copilot-plugin-cc
Then verify your environment:
/copilot:setup
Explicit delegation:
/copilot:rescue remove all unused imports under src/ and fix the import order
/copilot:rescue --background generate boilerplate test specs for src/services/user-mapper.ts
/copilot:rescue --model claude-sonnet-5 rename WidgetFactory to WidgetBuilder across the repo
Proactive delegation: the copilot-rescue agent describes itself so Claude
Code picks it for mechanical tasks on its own. To wire it into your own
delegation rules, paste the block from
docs/claude-md-snippet.md into your CLAUDE.md.
Full orchestration patterns — the Codex/Copilot/inline split, the parallel pattern, WIP caps, and the quota fallback chain — live in docs/delegation-guide.md.
Every forwarded task runs Copilot CLI with a scoped flag set:
copilot -p "<task>" -s \
--allow-tool='shell(git:*)' --allow-tool=write \
--deny-tool='shell(rm)' --deny-tool='shell(git push)' --deny-tool='shell(git reset)'
Deny rules win over allow rules — even under --allow-all — so a mechanical
task can write files and use local git, but can never delete files, push, or
reset shared state. --allow-all is only used when a task genuinely needs a
tool outside git/write and the user confirmed it.
| Issue | Workaround baked in |
|---|---|
| Autopilot infinite loop on externally-blocked tasks (copilot-cli#2969) | --autopilot avoided for bounded tasks; when used, --max-autopilot-continues <N> is always pinned explicitly |
| Resume after a rate-limit hit can hang | On "rate limit" output + ~10s silence: kill the process and report, never wait; relaunch fresh without --continue |
| Piece | Purpose |
|---|---|
agents/copilot-rescue.md |
Thin forwarder subagent — one copilot -p call, output returned verbatim |
/copilot:rescue |
Delegate a task explicitly (--background, --wait, --model <name>) |
/copilot:setup |
Verify CLI install, version floor, auth, and model pinning options |
docs/delegation-guide.md |
Full multi-agent orchestration guide |
docs/claude-md-snippet.md |
Ready-to-paste CLAUDE.md block |
.codex-plugin/plugin.json |
Codex CLI plugin manifest (experimental native install) |
skills/copilot-rescue/SKILL.md |
Codex skill — same forwarder logic, Codex runs the shell call itself (no subagent layer) |
docs/agents-md-snippet.md |
Ready-to-paste AGENTS.md block for Codex users |
The same idea, for Codex CLI: delegate
mechanical work to GitHub Copilot CLI, so Codex's reasoning stays on the work
only it can do. Ships as a Codex skill (skills/copilot-rescue/SKILL.md)
instead of a subagent — Codex runs the forwarded copilot -p ... command
itself, since Codex has no separate subagent/Task layer.
- Codex CLI
- A GitHub Copilot subscription
- GitHub Copilot CLI ≥ 1.0.67 (
npm install -g @github/copilot)
Manual (confirmed working):
mkdir -p ~/.agents/skills
cp -r skills/copilot-rescue ~/.agents/skills/copilot-rescueOr repo-scoped only: copy into <your-repo>/.agents/skills/copilot-rescue/ instead.
Native plugin marketplace (experimental — Codex's plugin system is new; please open an issue if the paths below don't match your Codex CLI version):
codex plugin marketplace add santiquiroz/copilot-plugin-cc
Then open the plugin browser (/plugins inside Codex) and install copilot.
Codex matches skills implicitly by their description, or you can invoke
explicitly. Ask for a mechanical task and Codex should pick copilot-rescue
on its own; to wire proactive delegation into your own instructions, paste the
block from docs/agents-md-snippet.md into your
AGENTS.md.
Same as the Claude Code side — see Safety model above. The skill runs Copilot CLI with the identical scoped allow/deny flag set.