claude-delegator

mcp
Security Audit
Fail
Health Warn
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 7 GitHub stars
Code Fail
  • child_process — Shell command execution capability in .github/release/pre-commit.js
  • execSync — Synchronous shell command execution in .github/release/pre-commit.js
  • process.env — Environment variable access in .github/release/pre-commit.js
  • fs module — File system access in .github/release/pre-commit.js
  • fs module — File system access in .github/workflows/validate.yml
  • execSync — Synchronous shell command execution in server/gemini/index.js
  • os.homedir — User home directory access in server/gemini/index.js
  • process.env — Environment variable access in server/gemini/index.js
  • fs module — File system access in server/gemini/index.js
  • process.env — Environment variable access in server/grok/files-admin.js
  • process.env — Environment variable access in server/grok/index.js
  • network request — Outbound network request in server/grok/index.js
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Ask Codex, Gemini, and Grok (x.AI) for independent opinions and consensus directly inside Claude Code.

README.md

Claude Delegator

GPT (Codex), Gemini, and Grok (xAI) expert subagents for Claude Code. Five specialists that can analyze and implement: architecture, plan review, scope, code review, and security. Use any of the three providers, single-shot or multi-turn, advisory or implementation (Grok is advisory-only).

License
Stars

Claude Delegator in action

What is Claude Delegator?

Claude gains a team of GPT, Gemini, and Grok specialists over MCP: GPT through the Codex CLI's native MCP server, Gemini through a bundled MCP bridge, and Grok through a bundled bridge over the xAI HTTP API. Each expert has a distinct specialty and can advise or implement (Grok is advisory-only).

You can use any subset of the three providers. The plugin detects which are configured and routes accordingly.

What you get Why it matters
5 domain experts The right specialist for each problem type
GPT, Gemini, or Grok Use your preferred provider(s)
Dual mode Experts analyze (read-only) or implement (write)
Auto-routing Claude detects when to delegate from your request
Synthesized responses Claude interprets expert output, never raw passthrough

Install

Inside a Claude Code instance, run:

1. Add the marketplace

/plugin marketplace add antonbabenko/claude-delegator

2. Install the plugin

/plugin install claude-delegator

3. Run setup

/claude-delegator:setup

Claude now routes complex tasks to your GPT, Gemini, and Grok experts.

Requires at least one provider: Codex CLI, Gemini CLI, or Grok (no CLI to install; just set XAI_API_KEY). Setup walks you through it.

You can also install from the agent-plugins marketplace: run /plugin marketplace add antonbabenko/agent-plugins, then /plugin install claude-delegator@antonbabenko.

Commands

Bundled with the plugin (available once installed):

Command Purpose
/claude-delegator:setup Configure Codex/Gemini/Grok MCP servers + orchestration rules
/claude-delegator:uninstall Remove MCP config, rules, and aliases
/claude-delegator:ask-gpt One-shot GPT (Codex) second opinion
/claude-delegator:ask-gemini One-shot Gemini second opinion
/claude-delegator:ask-grok One-shot Grok (xAI) second opinion (advisory-only; can read attached files)
/claude-delegator:ask-all GPT + Gemini + Grok in parallel, synthesized
/claude-delegator:consensus Iterate GPT + Gemini + Grok + Claude to consensus
/claude-delegator:grok-files List or prune Grok-uploaded files (storage cleanup)

/setup can also install short aliases (/ask-gpt, /ask-gemini, /ask-grok, /ask-all, /consensus, /grok-files) into ~/.claude/commands/. This is opt-in and never overwrites an existing same-named command; /uninstall removes an alias only if it is byte-identical to the bundled copy.

The Experts

Expert What they do Example triggers
Architect System design, tradeoffs, complex debugging "How should I structure this?" / "What are the tradeoffs?"
Plan Reviewer Validate plans before you start "Review this migration plan" / "Is this approach sound?"
Scope Analyst Catch ambiguities early "What am I missing?" / "Clarify the scope"
Code Reviewer Find bugs, improve quality "Review this PR" / "What's wrong with this?"
Security Analyst Vulnerabilities, threat modeling "Is this secure?" / "Harden this endpoint"

When experts help most

  • Architecture decisions - "Should I use Redis or in-memory caching?"
  • Stuck debugging - after two or more failed attempts, get a fresh perspective
  • Pre-implementation - validate a plan before writing code
  • Security concerns - "Is this auth flow safe?"
  • Code quality - a second opinion on your implementation

When not to use experts

  • Simple file operations (Claude handles these directly)
  • First attempt at any fix (try yourself first)
  • Trivial questions (no need to delegate)

How to Use

Describe your task. Claude detects when an expert helps and delegates automatically:

You: "Is this authentication flow secure?"
Claude: routes to the Security Analyst, then synthesizes the findings.

You can also ask explicitly: "Ask GPT to review this architecture", "Ask Gemini to...", or "Ask Grok to...". Each expert runs read-only for analysis or with write access to apply fixes, and Claude picks the mode from your request (Grok is advisory-only).

The bundled commands give you direct control: /ask-gpt, /ask-gemini, /ask-grok, /ask-all (all three in parallel, synthesized), and /consensus (the providers and Claude iterate to agreement).

How It Works

You: "Is this authentication flow secure?"
                |
                v
Claude: detects a security question, selects the Security Analyst
                |
                v
   +-------------------------------------+
   |  mcp__codex__codex /                |
   |  mcp__gemini__gemini /              |
   |  mcp__grok__grok                    |
   |    -> Security Analyst prompt       |
   |    -> expert analyzes your code     |
   +-------------------------------------+
                |
                v
Claude: "I found 3 issues..." (synthesizes, applies judgment)
  • Each expert has a specialized system prompt (in prompts/).
  • Claude reads your request, picks the expert, and delegates over MCP.
  • Responses are synthesized, not passed through raw.
  • Multi-turn conversations preserve context via threadId for chained work, and implementation retries before escalating to you.

For the bridge internals, retry behavior, and recovery paths, see TECHNICAL.md.

Configuration

Every expert supports two modes, chosen automatically from your request:

Mode Sandbox Use when
Advisory read-only Analysis, recommendations, reviews
Implementation workspace-write Making changes, fixing issues

Common defaults:

  • Codex (GPT) reads ~/.codex/config.toml for its sandbox and approval defaults.
  • Gemini defaults to gemini-2.5-flash; override with GEMINI_DEFAULT_MODEL.
  • Grok defaults to grok-4.3 and needs XAI_API_KEY; override with GROK_DEFAULT_MODEL.

For the full environment-variable reference and manual MCP setup, see TECHNICAL.md.

Requirements

You need at least one provider:

  • Codex CLI (GPT): npm install -g @openai/codex, then codex login
  • Gemini CLI: npm install -g @google/gemini-cli, then run gemini once (or set GOOGLE_API_KEY)
  • Grok (xAI): no CLI to install; the bridge ships with the plugin (needs Node 18+). Set XAI_API_KEY (get a key at https://console.x.ai). Advisory-only.

Troubleshooting

Issue Solution
MCP server not found Restart Claude Code after setup
Provider not authenticated Codex: codex login. Gemini: run gemini once (or set GOOGLE_API_KEY). Grok: export XAI_API_KEY (else calls return errorKind: missing-auth)
Tool not appearing Run claude mcp list and verify registration
Expert not triggered Ask explicitly: "Ask GPT to review...", "Ask Gemini to review...", or "Ask Grok to review..."
Gemini blocked by trust check The orchestrator retries once with skip-trust and prints a notice. See TECHNICAL.md

Deeper failure modes (untrusted directories, soft-timeout recovery) are documented in TECHNICAL.md.

Contributing

Contributions welcome. See CONTRIBUTING.md for the workflow, commit conventions, and the automated release process. To work on the plugin locally:

git clone https://github.com/antonbabenko/claude-delegator
cd claude-delegator

# Test locally without reinstalling
claude --plugin-dir /path/to/claude-delegator

Credits

Claude Delegator started as a fork of jarrodwatts/claude-delegator - credit to Jarrod Watts for the original solution and inspiration. Original work and MIT copyright are retained. This fork adds Grok support, Gemini bridge reliability (timeout and trust recovery), provider configuration overrides, and the bundled delegation commands. It is not an official continuation of the upstream project.

Expert prompts are adapted from oh-my-opencode by @code-yeongyu.

License

MIT - see LICENSE

Star History

Star History Chart

Reviews (0)

No results found