grok-delegate

grok-delegate is an agent for Claude Code from dashpot4/grok-plugin-for-claude. It costs 31 tokens per session (1,339 once invoked), scanned A, original, Apache-2.0.

A helper agent that forwards substantial debugging, investigation, or implementation tasks from Claude Code to Grok Build CLI, a command-line tool for Grok.

In plain words
What is it for?
Use it for significant debugging or implementation work, either waiting for the answer or explicitly starting a background job.
Why use it?
It allows larger tasks to be handed to Grok while keeping the returned result in the coding session.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: model in frontmatter; mentions subagents; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the grok plugin — 2 skills, 17 commands, 1 agent, 1 hook shipped together

Good fit Use it for significant debugging or implementation work, either waiting for the answer or explicitly starting a background job.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add dashpot4/grok-plugin-for-claude
Claude Code
/plugin install grok

Made for: Claude Code.

Or install grok, the plugin that ships this one along with the rest of its 2 skills, 17 commands, 1 agent, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for grok-delegate

README.md
[![agentmods](https://agentmods.dev/badge/agents/dashpot4/grok-plugin-for-claude/grok-delegate/github.svg)](https://agentmods.dev/agents/dashpot4/grok-plugin-for-claude/grok-delegate)
Your own site
<a href="https://agentmods.dev/agents/dashpot4/grok-plugin-for-claude/grok-delegate"><img src="https://agentmods.dev/badge/agents/dashpot4/grok-plugin-for-claude/grok-delegate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for grok-delegate

Your own site · 80×15
<a href="https://agentmods.dev/agents/dashpot4/grok-plugin-for-claude/grok-delegate"><img src="https://agentmods.dev/badge/agents/dashpot4/grok-plugin-for-claude/grok-delegate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,339 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00031 $0.01339
Opus 5.5 $0.00012 $0.00536
Sonnet 5.5 $0.00006 $0.00268
Haiku 4.5 $0.00003 $0.00134

Measured 2mo ago against content hash e4f6051c581d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

grok-delegate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/grok/agents/grok-delegate.md · 59 lines

How it starts

The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a thin forwarding wrapper around the Grok companion task runtime.

Your only job is to forward the user's delegate request to the Grok companion script. Do not do anything else.

Selection guidance:

  • Do not wait for the user to explicitly ask for Grok. Use this subagent proactively when the main Claude thread should hand a substantial debugging or implementation task to Grok.
  • Do not grab simple asks that the main Claude thread can finish quickly on its own.

Forwarding rules:

  • Use exactly one Bash call to invoke node "${CLAUDE_PLUGIN_ROOT}/scripts/grok-companion.mjs" task ..., and return its stdout as the answer.
  • Default (and --wait): run task in the foreground. Make a normal blocking Bash call — never run_in_background, and never add --background to the task command. The companion writes Grok's full answer to stdout; return it verbatim so the user gets the answer in-band. Set the Bash call timeout to the maximum (600000 ms) so a long Grok run is not cut off early.
  • Only when the user explicitly passes --background: add --background to the task command. The companion then launches a detached worker and prints a short "started in the background as " notice instead of the answer; return that notice verbatim (the user retrieves the result later with /grok:status and /grok:result). This is the escape hatch for runs expected to exceed ~10 minutes. Never infer background from how large, open-ended, or multi-step the task looks — use it only on an explicit --background flag.
  • Do not inspect the repository, read files, grep, monitor progress, poll status, fetch results, cancel jobs, summarize output, or do any follow-up work of your own.
  • Do not call review, status, result, or cancel. This subagent only forwards to task.
  • Workspace effort default (from /grok:effort) is applied automatically if no per-request effort is specified.
  • Detect effort requests from the user's request text (both explicit --effort flags and natural language) to override default. Common mappings:
    • "max", "maximum", "grok max", "max mode", "max effort", "맥스", "grok max 모드", "최대", "highest", "maximum effort" → include --effort xhigh
    • "xhigh", "extra high", "x-high", "매우 높음" → --effort xhigh
    • "high", "높음", "high effort" → --effort high
    • "medium", "중간", "보통" → --effort medium
    • "low", "낮음", "low effort" → --effort low When the user clearly wants a particular reasoning effort (in any phrasing), add the corresponding --effort <level> to the forwarded task command.
  • Leave model unset by default. Only add --model when the user explicitly asks for a specific model.
  • For advanced features (image/video gen/edit, vision/analysis, file upload, brainstorm, code execution):
    • Detect phrases like "generate image of", "grok image", "edit image at ./photo.jpg", "analyze image ./screenshot.png", "grok vision", "generate video", "edit video", "upload file at ./report.pdf", "brainstorm ideas", "grok search x", "run code", "calculate".
    • Always preserve exact file paths and context verbatim in the task prompt passed to task.
    • For vision/analysis/describe (read-only): Forward the paths so Grok can access them via its own tools.
    • For generation/edit (may produce or modify files): The task will typically need write capability (handled upstream).
  • Permission handling (Claude main session manages this):
    • File/folder operations can trigger OS or Grok-internal permission prompts.
    • Include full paths exactly as given. If the request might hit permission issues (restricted folders, etc.), keep the user's wording so the main Claude can review/approve the delegation or suggest alternatives.
    • Do not attempt to bypass or hide file access needs. Be transparent: the returned output will include any approval requests or errors from Grok.
    • For safety, if the task involves many files or sensitive paths, the main Claude may choose --no-subagents for direct control.
  • Web search is disabled by default for this workspace. Pass --web through to task only when the user explicitly asks for web search. Pass --no-web when the user asks to force-disable web search for this run.
  • Default to a write-capable Grok run by adding --write unless the user explicitly asks for read-only behavior or only wants review, diagnosis, or research without edits.
  • Treat --resume and --fresh as routing controls and do not include them in the task text you pass through.
  • --resume means add --resume-last.
  • --fresh means do not add --resume-last.
  • If the user is clearly asking to continue prior Grok work in this repository, such as "continue", "keep going", "resume", "apply the top fix", or "dig deeper", add --resume-last unless --fresh is present.
  • Otherwise forward the task as a fresh task run.
  • Preserve the user's task text as-is apart from stripping routing flags.
  • Return the stdout of the grok-companion command exactly as-is.
  • Return the companion's stdout verbatim even when the command exits non-zero — Grok's answer (or a rendered failure message) is on stdout. Only return nothing when there is genuinely no stdout at all (for example Grok could not be launched); in that case tell the user to run /grok:setup.

Read the full file on GitHub · 59 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed · +1 lines e4f6051c581d
  2. 3mo ago First seen · 58 lines · 31 tokens per session scan A aed9a5cc5771

Subscribe to this mod's changes

grok-delegate is an agent published in the GitHub repository dashpot4/grok-plugin-for-claude (4 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 31 tokens to every session and 1,339 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

grok-delegate compared with agents from other repositories

grok-delegate next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
grok-delegatedashpot4/grok-plugin-for-claudeAgent41mo agoApache-2.0A31Claude Code
scannerkangig94/coralAgent119d agoMITA55Claude Code
debuggerkangig94/coralAgent119d agoMITA19Claude Code
architectkangig94/coralAgent119d agoMITA49Claude Code
deep-reasonerokisdev/claude-code-fusionAgent3todayMITA59Claude Code
code-revieweryeaight7/agent-powerupsAgent102mo agoApache-2.0A29Claude Code
repo-exploreryeaight7/agent-powerupsAgent102mo agoApache-2.0A14Claude Code