Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/dashpot4/grok-plugin-for-claude/delegategit clone --depth 1 https://github.com/dashpot4/grok-plugin-for-claudeWrote 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.
[](https://agentmods.dev/commands/dashpot4/grok-plugin-for-claude/delegate)<a href="https://agentmods.dev/commands/dashpot4/grok-plugin-for-claude/delegate"><img src="https://agentmods.dev/badge/commands/dashpot4/grok-plugin-for-claude/delegate.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00019 | $0.02352 |
| Opus 5 | $0.00010 | $0.01176 |
| Sonnet 5 | $0.00004 | $0.00470 |
| Haiku 4.5 | $0.00002 | $0.00235 |
Grade A, and why
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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Raw user request: $ARGUMENTS
Execution mode:
- If the request includes
--no-subagents, do not invoke thegrok:grok-delegatesubagent. Rungrok-companion.mjs taskdirectly viaBashinstead (see Direct companion flow below). - If the request does not include
--no-subagents, invoke thegrok:grok-delegatesubagent via theAgenttool (subagent_type: "grok:grok-delegate"), forwarding the raw user request as the prompt. grok:grok-delegateis a subagent, not a skill — do not callSkill(grok:grok-delegate)orSkill(grok:delegate)(that re-enters this command and hangs the session). The command runs inline so theAgenttool stays in scope; forked general-purpose subagents do not expose it.- The final user-visible response must be Grok's output verbatim.
Subagent path (default):
- Always invoke the
grok:grok-delegatesubagent in the foreground (do not use the Agent tool'srun_in_background). The subagent runs Grok and returns the answer, so the result is delivered to you in-band. - Default (and
--wait): the subagent runsgrok-companion.mjs taskin the foreground and returns Grok's full answer. This is the right choice for almost every delegation. It is bounded by the Bash tool's ~10-minute limit; if a task is likely to run longer, use--background. --background: the user is opting into a long-running or fire-and-forget run. The subagent forwards--backgroundtotask, which launches a detached worker and returns a job id immediately (not the answer). Surface that job id and tell the user to retrieve the result with/grok:status <id>and/grok:result <id>.--backgroundsurvives arbitrarily long Grok runs.--waitand--backgroundare execution-mode flags — strip them from the natural-language task text.--waitis the default and is not passed totask;--backgroundis passed through totask.--model,--effort,--disable-web-search,--no-web, and--webare runtime-selection flags. Preserve them for the forwardedtaskcall, but do not treat them as part of the natural-language task text. Workspace defaults (from/grok:model,/grok:web,/grok:effort) are applied automatically if no explicit flag.- Effort can also be requested in natural language. Scan the raw request for phrases indicating desired effort level and ensure the corresponding flag is present:
- "grok max", "max mode", "max effort", "grok max 모드", "맥스", "최대 effort", "highest", "maximum" →
--effort max - "xhigh", "extra high", "매우 높음" →
--effort xhigh - "high effort", "높은 effort" →
--effort high - Similar for medium/low.
If natural language indicates effort but no explicit
--effortis present, insert the flag (e.g. prepend--effort max) before forwarding to the subagent or building the directtaskcommand. Prefer any explicit--effortover inferred.
- "grok max", "max mode", "max effort", "grok max 모드", "맥스", "최대 effort", "highest", "maximum" →
- Advanced Grok features: Dedicated commands exist for convenience (
/grok:image,/grok:edit-image,/grok:video,/grok:edit-video,/grok:vision,/grok:tts,/grok:stt). You can still use natural language in this command. Detect common patterns and forward accurately:- Image: "generate image", "grok generate image", "create image of", "grok image"
- Edit image: "edit image at PATH", "modify image", "grok edit image ./file.jpg to ..."
- Analyze/vision: "analyze image at PATH", "grok vision", "describe image ./screenshot.png", "grok analyze image"
- Video: "generate video", "grok generate video", "edit video ./clip.mp4"
- File upload: "upload file", "grok upload file at ./report.pdf"
- Brainstorm/search: "brainstorm ideas", "grok search for", "grok search x for"
- Code/calc: "run code", "calculate", "grok calculate" Always preserve exact file paths mentioned (e.g. ./photo.jpg, /absolute/path/video.mp4). Do not rewrite or summarize paths.
- Permission and file handling guidance (important for Claude to manage safely):
- When the request touches files/folders (read for vision/analysis, write for edit/generate), keep paths verbatim.
- For read-only analysis/vision/describe: Forward as-is; Grok binary will attempt read access based on current user/shell permissions.
- For modifications/generation that may save files: Ensure write-capable delegation (default behavior adds --write). If user might not want auto-approve, consider --no-subagents or note it.
- If permission issues are likely (e.g., restricted dirs, read-only workspace), include explicit notes in the forwarded prompt like "Note: access may require user approval for file X".
- Claude (main session) should handle approvals for the initial delegation Bash call. For internal Grok approvals during execution, they will appear in the returned output.
- Prefer absolute paths when possible for reliability, but respect user's provided relative paths.
- Never assume files are accessible; if the task involves specific files, the prompt must contain the paths so Grok can reference them.
- Web search is disabled by default for this workspace. Pass
--webonly when the user explicitly wants web search for this run. Pass--no-webto force-disable even when the workspace default is on. - If the request includes
--resume, do not ask whether to continue. The user already chose. - If the request includes
--fresh, do not ask whether to continue. The user already chose. - Otherwise, before starting Grok, check for a resumable delegate thread from this Claude session by running:
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.
- 3d ago First seen · 103 lines · 19 tokens per session scan A 88d4d51386b5
delegate is a command published in the GitHub repository dashpot4/grok-plugin-for-claude (4 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 19 tokens to every session and 2,352 once invoked, about $0.0001 per session on Opus 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.
Other commands, from other repositories
critique
Run a Grok Build critique that challenges the implementation approach and design choices.
check
Check whether the local Grok Build CLI is ready for the Claude Code bridge.
review
Run a read-only Grok code review against local git state.
adversarial-review
Run a skeptical, adversarial Grok code review against local git state.
rescue
Delegate a coding, debugging, or review task to the Grok CLI as a parallel worker.
setup
Check whether the local Grok CLI is installed, signed in, and ready to delegate to.