grok

grok is a skill for Claude Code, Codex from handong66/grok-plugin-codex. It costs 79 tokens per session (2,080 once invoked), scanned A, original, MIT.

Instructions for operating and troubleshooting an installed Grok MCP capability, including its command-line and model controls.

In plain words
What is it for?
Checking Grok setup, running prompts or continuations, inspecting or exporting sessions, controlling known background jobs, and performing bounded reviews with an explicit workspace target.
Why use it?
They separate checks for discovery, login, access, available models, and actual callability, while defining safe handling of sessions and background jobs.

Skill for Claude CodeCodex

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/handong66/grok-plugin-codex/grok
Any agent
npx skills add handong66/grok-plugin-codex --skill grok
Clone the repo
git clone --depth 1 https://github.com/handong66/grok-plugin-codex

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/handong66/grok-plugin-codex/grok.svg)](https://agentmods.dev/skills/handong66/grok-plugin-codex/grok)
Your own site
<a href="https://agentmods.dev/skills/handong66/grok-plugin-codex/grok"><img src="https://agentmods.dev/badge/skills/handong66/grok-plugin-codex/grok.svg" alt="Measured on agentmods" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,080 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.00079 $0.02080
Opus 5 $0.00039 $0.01040
Sonnet 5 $0.00016 $0.00416
Haiku 4.5 $0.00008 $0.00208

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

Security

Grade A, and why

grok 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 today.

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-plugin-codex/skills/grok/SKILL.md · 37 lines

How it starts

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

Grok Capability Layer

Operate the installed grok_* tools according to their current schemas. Codex owns scope, workspace state, verification, git, and final judgment.

Required contract

  • Use grok_check when CLI discovery, compatibility, login, or model listing is uncertain. Treat cliDiscovered, authenticated, entitled, modelsListed, and callable as separate facts. authenticated and entitled are true, false, or the string "unknown" — never null — so never read an undetermined fact as a negative one; entitled: false means the account listed models but has no quota. modelInvocationTested/callable stay false/null unless you pass probeInvocation: true, which spends real quota on one bounded call; do not enable it routinely.
  • Configure a custom executable through trusted MCP environment variable GROK_BIN; never accept a binary path from a task prompt or tool argument.
  • Pass an explicit absolute cwd for workspace, session, and export operations. That value grants only this tool call access to the exact canonical directory; it need not already be an advertised MCP root and is not remembered. This does not grant operation approval: alwaysApprove stays opt-in, while review and adversarial-review calls remain read-only plan mode without subagents. They also require an explicit non-empty target. Spell it target or, equivalently, promptgrok_rescue takes problem or prompt the same way — and pass exactly one of the pair (a string or an array of strings, joined into bullets). Only cwd is required by the schema; a missing, empty, or doubled target is the non-retryable target_required, and one over the limit is target_too_large with details.chars/details.maxChars.
  • background defaults to true for grok_run, grok_review, grok_adversarial_review, and grok_rescue, and to false for grok_continue; a background start returns data.background === true and data.job.id. Call status, result, or cancel with that jobId only; job state is private and independent of workspace cwd. background: false blocks the MCP call for up to timeoutMs plus a 10 s grace and then returns foreground_wait_timeout carrying the same job id. An omitted timeoutMs defaults per kind (run/continue 180000, review/rescue 240000, adversarial_review 300000); an explicit value is never clamped, and every envelope echoes effectiveTimeoutMs / effectiveMaxTurns.
  • Accept an answer only when data.resultComplete === true; it already accounts for truncation. outputSummary.outputTruncated alone does not disqualify an answer — it usually means tool-call echo overflowed the capture window — while outputSummary.textTruncated means answer text was dropped. The plugin normalises stopReason case- and separator-insensitively (end_turn, EndTurn, cancelled, Cancelled are all understood); never string-match the raw value yourself. Treat cancelled_output and max_turns_reached as partial. Use data.finalText, not previews or raw log tails; grok_result returns the raw stdoutTail/stderrTail only when you pass includeRawTail: true.
  • grok_adversarial_review accepts threatModel: the operating scope the review must judge against. Findings outside it are labelled out-of-model and are advisory — they must never block, force NO_GO, or interrupt work in progress.
  • grok_finalize({ cwd, jobId }) is the one-call form of the recovery: one turn, no tools, complete answer, anything unverified marked UNVERIFIED. Use it for timeout, max_turns_reached, cancelled_output, and permission_denied_headless instead of rerunning the task. It inherits the read-only mode of the session it resumes.
  • Every non-complete result carries a recovery handle: error.details.recovery on a failed foreground call and data.recovery on grok_result, shaped { jobId, grokSessionId, partialTextChars, suggested: { tool: "grok_finalize", args }, fallback: { tool: "grok_continue", args } }. Run that suggestion as given — one turn, no tools, complete answer — or the fallback if you only call grok_continue; neither asks for a shortened answer. Do not rerun the task or raise the budget. The partial answer is never destroyed: error.details.finalTextRef is the job id and grok_result returns the complete captured finalText whatever resultComplete says.
  • When outputSummary.stopReasonRecognised === false the plugin accepted an unfamiliar stop reason and said so in warnings. The answer is still returned; reject it only if your task needs strict vocabulary matching.
  • Continue only a known sessionId or explicitly request the latest session. Continuing a session that this plugin created for a review, adversarial review, or rescue inherits enforced read-only plan mode, and alwaysApprove on such a session is refused with the non-retryable readonly_session_escalation; when a named sessionId is unknown to the plugin the call proceeds with a warning saying the original mode could not be verified.
  • continueLatest: true names no session, so the plugin infers the target from the newest session it started in this cwd, and that inference may only restrict, never certify. If the inferred session was read-only, alwaysApprove is refused with readonly_session_escalation and error.details.inferredFromLatestJob === true (non-retryable — do not retry it), and a plain continuation inherits plan mode. Every continueLatest call also warns that the resumed session could not be verified, because the CLI may resume a session this plugin never created. The remedy in both cases is one parameter: pass the explicit sessionId of the session you mean, or start a new one with grok_run. Export returns Markdown; the plugin does not write a caller-selected output file.

Read the full file on GitHub · 37 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. today Changed 09ac3563461f
  2. 3d ago First seen · 37 lines · 79 tokens per session scan A 0e4be906e3f9

Subscribe to this mod's changes

grok is a skill published in the GitHub repository handong66/grok-plugin-codex (0 stars, last pushed 2d ago), licensed MIT. It adds 79 tokens to every session and 2,080 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

agent-host-e2e-tests

Use when writing, recording, updating, validating, or troubleshooting the agent host end-to-end tests under src/vs/platform/agentHost/test/node/e2e (black-box tests that drive the whole agent host over the AHP protocol, using a CapiReplayProxy record/replay system for Claude/Copilot/Codex). Covers adding a…

microsoft/vscode · 111 tokens

lint-js

Lint JS/TS code only. Use before opening a PR when only JavaScript or TypeScript files were changed (no Rust).

denoland/deno · 29 tokens

schema-exploration

Lists tables, describes columns and data types, identifies foreign key relationships, and maps entity relationships in a database. Use when the user asks about database schema, table structure, column types, what tables exist, ERD, foreign keys, or how entities relate.

langchain-ai/deepagents · 57 tokens

nemoclaw-contributor-implement-issue

Implement an accepted NemoClaw GitHub issue in the current checkout. Use when a user asks to pick up an issue for implementation, implement or fix a named issue, or add the issue's tests. Confirm accepted scope, deliver the smallest independently valuable capability slice, and record validation and remaining gates…

NVIDIA/NemoClaw · 134 tokens

analyze-market

Perform a market analysis for a product category or segment. Trigger on: market analysis, market size, TAM SAM SOM, market opportunity, industry analysis.

langchain-ai/deepagents · 34 tokens

diagnose

Trace from a reproduced symptom to the source code that causes it. Pin the specific file and approximate line, rate confidence in the cause and clarity of the fix independently, and always propose a concrete fix.

emdash-cms/emdash · 43 tokens