grok

grok is an agent for coding agents from musistudio/claude-code-router. It costs 0 tokens per session (710 once invoked), scanned A, original, MIT.

A command-line coding agent from xAI that runs in a terminal. CCR can launch it only through its own command-line entry.

In plain words
What is it for?
Use it to create Grok CLI profiles, select models, set optional local environment details, and copy launch commands from CCR.
Why use it?
It lets you choose which CCR provider or model Grok CLI uses and keep separate configurations for different sessions.

Agent

About the project

Claude Code Router is a local gateway that gives coding agents one endpoint for connecting to, routing between, and monitoring different AI model providers. Developers use it to manage multiple agents and provider configurations from one application.

musistudio/claude-code-router · 37,021 stars · on GitHub

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 agents/musistudio/claude-code-router/grok
Clone the repo
git clone --depth 1 https://github.com/musistudio/claude-code-router

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/agents/musistudio/claude-code-router/grok.svg)](https://agentmods.dev/agents/musistudio/claude-code-router/grok)
Your own site
<a href="https://agentmods.dev/agents/musistudio/claude-code-router/grok"><img src="https://agentmods.dev/badge/agents/musistudio/claude-code-router/grok.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 710 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.00000 $0.00710
Opus 5 $0.00000 $0.00355
Sonnet 5 $0.00000 $0.00142
Haiku 4.5 $0.00000 $0.00071

Measured 5d ago against content hash d68ef3077b3b, 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 5d 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.

docs/src/content/docs/en/configuration/agents/grok.md · 74 lines

How it starts

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

Who this is for

Grok CLI is xAI's coding agent. In CCR it is CLI only and always uses Only opened from CCR.

Use this page to route Grok CLI to any CCR provider or Fusion model, or to run several separate Grok CLI sessions.

New to CCR? Add a provider and model first. See Add a provider and the Agent Config overview.

Prerequisites

  1. CCR Desktop is running with at least one provider + model configured.
  2. Grok CLI is installed (available as grok on PATH).
  3. You are on Agent Config and click Add profile.

Create the profile

  1. On Agent Config, click Add profile and choose Grok CLI.
  2. Enter a Config name (for example Grok - Work).
  3. Select a Model.
  4. Leave advanced environment settings empty unless you have a specific local setup need.
  5. Save, then copy and run the command from the profile card.

Configuration reference

Grok CLI is fixed to Only opened from CCR and CLI only, so those two fields are not editable. The fields you configure are:

Field How to set it Effect
Agent Choose Grok CLI Creates a Grok CLI launch entry in CCR.
Config name Free text, e.g. Grok - Work Identifies the profile. Desktop commands use ccr-app "<name>"; CLI commands use ccr "<name>".
Enabled Toggle on/off Disabled profiles are not applied and not offered as launch entries.
Model A provider model or Fusion model The model Grok CLI uses at startup.
Environment variables Key/value rows Optional advanced overrides; leave empty for normal use.

Open and use

Desktop command copied from the profile card:

ccr-app "Grok - Work"

For CLI, run:

ccr "Grok - Work"

Inside Grok CLI, use /model to switch among the provider and Fusion models CCR returns; switched requests still go through CCR.

Multi-instance

Create separate Grok CLI profiles when you want separate launch entries with different models.

Read the full file on GitHub · 74 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. 5d ago First seen · 74 lines · 0 tokens per session scan A d68ef3077b3b

Subscribe to this mod's changes

grok is an agent published in the GitHub repository musistudio/claude-code-router (37,021 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 710 tokens. 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.