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/stdevmac/grok-in-codex/grok-cli-runtimenpx skills add stdevMac/grok-in-codex --skill grok-cli-runtimegit clone --depth 1 https://github.com/stdevMac/grok-in-codexWhat 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.01120 |
| Opus 5 | $0.00010 | $0.00560 |
| Sonnet 5 | $0.00004 | $0.00224 |
| Haiku 4.5 | $0.00002 | $0.00112 |
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 2d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- grok-cli-runtime — 89% identical, 4 lines differ
How it starts
The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Grok Runtime
Use through the Grok MCP tools. If MCP is unavailable, call the companion directly with node plugins/grok/scripts/grok-companion.mjs <command> ....
Recommended Grok CLI version: ≥ 0.2.118.
Workspace
Installed Codex plugin MCP servers start from the plugin cache. Pass cwd with the active project
directory on every Grok MCP call so Grok inspects, edits, and stores artifacts in the intended
workspace rather than the cached plugin directory. Direct companion calls can use --cwd <path>.
Concurrency
- Multiple companion jobs may run at once. There is no global single-agent lock.
- Prefer
background: trueor--backgroundwhen a Codex turn is launching more than one Grok job. - Each MCP call should make exactly one companion invocation.
- Parallelism = multiple background companion jobs, not a serialized queue.
- When several jobs are running, always pass job ids to
status/result/cancel.
Control flags (most write/plan commands)
MCP input keys map to companion flags:
| MCP property | Companion flag |
|---|---|
sandbox |
--sandbox |
planMode |
--plan |
permissionMode |
--permission-mode |
agent |
--agent |
noSubagents |
--no-subagents |
memory / noMemory |
--memory / --no-memory |
allow / deny |
--allow / --deny (repeatable) |
disableWebSearch |
--disable-web-search |
forkSession |
--fork-session |
maxTurns |
--max-turns |
CLI posture
- Prefer denylist (
--disallowed-tools) over tools allowlist (Grok session-create bugs). - Media: no yolo / no tools allowlist.
--dry-run/--validate-only/ babysitlist: read-only (no yolo).- Write-capable default for rescue/design/execute/babysit add|check|remove.
Depth notes
grok_execute_planwithlatest=trueresolves newest.grok-designs/*.md.- Design/workflow/plan/document jobs harvest copies into
.grok-designs//.grok-workflows//.grok-plans//.grok-docs/. - Review
postPending=true: skips empty findings; empty/oversize diffs fail closed and save findings under.grok-reviews/. - Plan results prefer harvested
plan.mdbody over narration. - Stop-gate uses sandbox
read-only+ denylist (no yolo).
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.
- 2d ago First seen · 102 lines · 19 tokens per session scan A c39947573309
grok-cli-runtime is a skill published in the GitHub repository stdevMac/grok-in-codex (22 stars, last pushed 28d ago), licensed Apache-2.0. It adds 19 tokens to every session and 1,120 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-30.
Other skills, from other repositories
ima2
Use the ima2-gen CLI/server to generate, edit, inspect, and manage local AI image generation jobs.
local-image-gen
Generate or edit local images using Codex, Grok, or Gemini/Antigravity subscriptions when logged in, with optional API keys for the same models. Use when the user asks to 生图, 画图, 生成图片, 文生图, 改图, 编辑图片, 配图, 插图, 封面, 海报, image generation, image edit, inpaint, gpt-image-2, grok-imagine, nano banana, or wants to pick model…
grokodex-imagine
Generate images via local Grok (MCP grokimagine). Use when the user wants app icons, mockups, concept art, or any image generation through Grokodex. 通过 Grokodex 调用本地 Grok 生图。.
grok-membership-media
Use the local paid ChatGPT and Grok memberships to create website first frames and real MP4 video without developer APIs or API keys.
videoagent-image-studio
Tired of juggling 8 API keys? This skill gives you one-command access to Midjourney, Flux, Ideogram, and more, with zero setup. Use when you want to generate any image without worrying about API keys.
motion
How an agent turns a character mesh into a usable animated FBX — and how to judge whether the result is shippable.