grok-cli-runtime

grok-cli-runtime is a skill for Claude Code, Codex from dashpot4/grok-plugin-for-claude. It costs 19 tokens per session (1,229 once invoked), scanned A, original, Apache-2.0.

An internal helper for sending one request from Claude Code to a Grok runtime. It forwards the request and returns the runtime's output unchanged.

In plain words
What is it for?
Use it inside the specified Grok delegate workflow for tasks such as diagnosis, planning, research, or requested fixes.
Why use it?
It gives a designated delegate agent a standard way to call Grok without building its own command handling.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

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

Install

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.

agentmods
npx agentmods add skills/dashpot4/grok-plugin-for-claude/grok-cli-runtime
Any agent
npx skills add dashpot4/grok-plugin-for-claude --skill grok-cli-runtime
Clone the repo
git clone --depth 1 https://github.com/dashpot4/grok-plugin-for-claude

Made for: Claude Code, Codex.

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-cli-runtime

README.md
[![agentmods](https://agentmods.dev/badge/skills/dashpot4/grok-plugin-for-claude/grok-cli-runtime.svg)](https://agentmods.dev/skills/dashpot4/grok-plugin-for-claude/grok-cli-runtime)
Your own site
<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>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,229 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00019 $0.01229
Opus 5 $0.00010 $0.00615
Sonnet 5 $0.00004 $0.00246
Haiku 4.5 $0.00002 $0.00123

Measured yesterday against content hash 95a032a4134e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

plugins/grok/skills/grok-cli-runtime/SKILL.md · 55 lines

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 task once 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, or cancel from grok:grok-delegate.
  • Use task for 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 low If a specific effort is clearly requested (in any form), include the corresponding --effort <level> when building the task command.
  • Leave model unset by default. Add --model only 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 grok binary 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 grok process in the workspace cwd.
    • Be explicit with paths in the node ... task command. 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.
  • Default to write-capable Grok work in grok:grok-delegate unless 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 task command 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 task invocation per delegate handoff.
  • --wait is the default execution mode: run task in the foreground and return its stdout (Grok's answer) to the user in-band. Strip --wait from the task text and do not pass it to task.
  • --background is an explicit opt-in for long-running or fire-and-forget work: pass --background through to task so the companion launches a detached worker and returns a job id (the user retrieves the answer later via /grok:status and /grok:result). Strip --background from the natural-language task text but DO pass the flag to task. Never add --background yourself based on task size, open-endedness, or complexity — only when the user explicitly requested it.
  • If the forwarded request includes --model, pass it through to task.
  • If the (forwarded or natural-language) request indicates a specific effort level, include --effort <level> in the task command.
  • Web search is disabled by default. 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. 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 are low, medium, high, xhigh. Natural-language requests for maximum effort map to xhigh.
  • task --resume-last: internal helper for follow-up instructions after a previous delegate run.

Read the full file on GitHub · 55 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. yesterday Changed · +1 lines 95a032a4134e
  2. 5d ago First seen · 54 lines · 19 tokens per session scan A 5e298db2d321

Subscribe to this mod's changes

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.