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 skills/dashpot4/grok-plugin-for-claude/grok-cli-runtimenpx skills add dashpot4/grok-plugin-for-claude --skill grok-cli-runtimegit 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/skills/dashpot4/grok-plugin-for-claude/grok-cli-runtime)<a href="https://agentmods.dev/skills/dashpot4/grok-plugin-for-claude/grok-cli-runtime"><img src="https://agentmods.dev/badge/skills/dashpot4/grok-plugin-for-claude/grok-cli-runtime.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.01229 |
| Opus 5 | $0.00010 | $0.00615 |
| Sonnet 5 | $0.00004 | $0.00246 |
| Haiku 4.5 | $0.00002 | $0.00123 |
Grade A, and why
grok-cli-runtime 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 yesterday.
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 — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Grok Runtime
Use this skill only inside the grok:grok-delegate subagent.
Primary helper:
node "${CLAUDE_PLUGIN_ROOT}/scripts/grok-companion.mjs" task "<raw arguments>"
Execution rules:
- The delegate subagent is a forwarder, not an orchestrator. Its only job is to invoke
taskonce and return that stdout unchanged. - Prefer the helper over hand-rolled direct Grok CLI strings or any other Bash activity.
- Do not call
setup,review,status,result, orcancelfromgrok:grok-delegate. - Use
taskfor every delegate request, including diagnosis, planning, research, and explicit fix requests. - Workspace effort default (from
/grok:effort) applies automatically unless overridden here. - Detect effort requests from the user's request text (both explicit flags and natural language) to override. Map phrases such as:
- "max", "maximum", "grok max", "max mode", "max effort", "맥스", "grok max 모드", "최대", "highest", "maximum effort" →
--effort xhigh - "xhigh", "extra high", "x-high", "매우 높음" →
--effort xhigh - "high", "높음", "high effort" →
--effort high - "medium", "중간", "보통" →
--effort medium - "low", "낮음", "low effort" →
--effort lowIf a specific effort is clearly requested (in any form), include the corresponding--effort <level>when building thetaskcommand.
- "max", "maximum", "grok max", "max mode", "max effort", "맥스", "grok max 모드", "최대", "highest", "maximum effort" →
- Leave model unset by default. Add
--modelonly when the user explicitly asks for one. - Advanced Grok features support (image/video, vision, files, search, code):
- Recognize and forward accurately: "generate image", "edit image at [path]", "analyze image [path]", "grok vision", "generate video", "edit video", "upload file at [path]", "brainstorm", "grok search x", "run code", "calculate".
- Preserve every file path, URL, or detail exactly. Do not summarize or alter paths.
- Vision/analysis: Include the image path in the prompt so the
grokbinary can process it. - Generation/edit: The upstream delegation usually enables writes when needed.
- Permission handling (key for file/folder operations):
- File access (read for vision, write for edits/generation) is handled by the
grokprocess in the workspace cwd. - Be explicit with paths in the
node ... taskcommand. If permission problems arise (e.g. "permission denied"), the output will surface them for the main Claude session to handle or re-delegate with different scope. - Do not hide or auto-resolve permissions. Structure the forwarded prompt so the main Claude can approve the initial Bash delegation or use --no-subagents for more control.
- For sensitive or complex file tasks, the subagent should just forward cleanly; permission decisions stay with the user/Claude main thread.
- File access (read for vision, write for edits/generation) is handled by the
- Default to write-capable Grok work in
grok:grok-delegateunless the user explicitly asks for read-only behavior. - Preserve the user's task text as-is apart from stripping routing flags.
- Do not inspect the repository, solve the task yourself, or add independent analysis outside the forwarded prompt text.
- Return the stdout of the
taskcommand exactly as-is — even on a non-zero exit, Grok's answer or a rendered failure message is on stdout. - Only return nothing when there is no stdout at all (for example Grok could not be launched); then point the user to
/grok:setup.
Command selection:
- Use exactly one
taskinvocation per delegate handoff. --waitis the default execution mode: runtaskin the foreground and return its stdout (Grok's answer) to the user in-band. Strip--waitfrom the task text and do not pass it totask.--backgroundis an explicit opt-in for long-running or fire-and-forget work: pass--backgroundthrough totaskso the companion launches a detached worker and returns a job id (the user retrieves the answer later via/grok:statusand/grok:result). Strip--backgroundfrom the natural-language task text but DO pass the flag totask. Never add--backgroundyourself based on task size, open-endedness, or complexity — only when the user explicitly requested it.- If the forwarded request includes
--model, pass it through totask. - If the (forwarded or natural-language) request indicates a specific effort level, include
--effort <level>in thetaskcommand. - Web search is disabled by default. Pass
--webthrough totaskonly when the user explicitly asks for web search. Pass--no-webwhen the user asks to force-disable web search for this run. Strip these flags from the natural-language task text. - If the forwarded request includes
--resume, strip that token from the task text and add--resume-last. - If the forwarded request includes
--fresh, strip that token from the task text and do not add--resume-last. --effort: accepted values arelow,medium,high,xhigh. Natural-language requests for maximum effort map toxhigh.task --resume-last: internal helper for follow-up instructions after a previous delegate run.
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.
- yesterday Changed · +1 lines 95a032a4134e
- 5d ago First seen · 54 lines · 19 tokens per session scan A 5e298db2d321
grok-cli-runtime is a skill published in the GitHub repository dashpot4/grok-plugin-for-claude (4 stars, last pushed 4d ago), licensed Apache-2.0. It adds 19 tokens to every session and 1,229 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 skills, from other repositories
grok-brand-media
Prompt recipes for Grok image/video generation from Codex (OG images, README banners, launch clips).
grok-workflows
When and how to run Grok Rhai multi-agent workflows from Codex.
grok-cli-runtime
Internal helper contract for calling the grok-companion runtime from Codex.
grok-routing
When Codex should delegate to Grok vs handle work itself.
grok-prompting
Internal guidance for composing clear Grok task prompts from Codex rescue handoffs.
grok-routing
When to reach for Grok Build rather than doing the work in Claude Code — the routing tiers (manual, second-opinion, reach, offload-first, delegate-write), what each one covers, what it costs, and how to call it. Load this before offloading work, before asking for a second opinion, and before delegating anything to…