setup

setup is a command for coding agents from xzawed/claude-grok-build-plugin. It costs 11 tokens per session (609 once invoked), scanned C, original, MIT.

A setup guide and readiness check for the Grok command-line tool, including installation and sign-in instructions.

In plain words
What is it for?
Use it to verify installation and authentication, understand the configured billing mode, and try a small first task.
Why use it?
It explains what to fix when Grok is missing, signed out, or lacks an API key, without attempting those changes for the user.

Command

Part of the grok plugin — 4 skills, 27 commands, 1 agent, 1 hook, 1 MCP server 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 commands/xzawed/claude-grok-build-plugin/setup
Clone the repo
git clone --depth 1 https://github.com/xzawed/claude-grok-build-plugin

Or install grok, the plugin that ships this one along with the rest of its 4 skills, 27 commands, 1 agent, 1 hook, 1 MCP server.

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 setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/xzawed/claude-grok-build-plugin/setup.svg)](https://agentmods.dev/commands/xzawed/claude-grok-build-plugin/setup)
Your own site
<a href="https://agentmods.dev/commands/xzawed/claude-grok-build-plugin/setup"><img src="https://agentmods.dev/badge/commands/xzawed/claude-grok-build-plugin/setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 609 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.00011 $0.00609
Opus 5 $0.00005 $0.00304
Sonnet 5 $0.00002 $0.00122
Haiku 4.5 $0.00001 $0.00061

Measured 3d ago against content hash d6b670ac3eaf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

setup scanned grade C with 2 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 3d 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

- macOS/Linux: `curl -fsSL https://x.ai/cli/install.sh | bash`

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- macOS/Linux: `curl -fsSL https://x.ai/cli/install.sh | bash`
commands/setup.md · 53 lines

How it starts

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

Prefer grok_build_status (one-shot). Fallback: grok_auth_check.

If not ready (ready: false / ok: false)

Show the message / authMessage and guide the fix by reason:

  • grok_not_installed → follow the tool message (platform-aware). Install CLI:
    • macOS/Linux: curl -fsSL https://x.ai/cli/install.sh | bash
    • Windows PowerShell: irm https://x.ai/cli/install.ps1 | iex
    • Then open a new terminal / restart Claude Code so PATH picks up ~/.grok/bin
  • not_logged_in → run grok login in a terminal (one-time browser OAuth)
  • no_api_key → set XAI_API_KEY (API mode)

Do not attempt to log in or install on the user's behalf.

If ready — first success path

Report mode, expected billing, serverVersion, and any billingMismatch warning from status. Confirm Grok is ready.

Then guide a short first win (do not run destructive work):

  1. Optional sample (throwaway dir or user-approved path):
    /grok:delegate with prompt like: create hello.txt containing exactly ok
    — or call grok_build_delegate with that prompt and absolute cwd.
  2. After the run, highlight billing: users on SuperGrok / X Premium+ should see "subscription" (not "metered_api"). If they see metered unexpectedly, the server is running with GROK_BUILD_AUTH_MODE=api — that setting alone decides the tag. Point them at docs/02-auth-strategy.md.
  3. Remind: no auto-commit — review filesChanged before committing.

Next scenarios (where Grok shines)

Suggest trying one when relevant:

Command Use for
/grok:tests Test backfill / expansion
/grok:migrate Same pattern across many files
/grok:boilerplate Scaffold / CRUD / DTO stubs
/grok:plan Read-only approach preview
/grok:verify Delegate + Grok self-check

Claude should also propose Grok on fit tasks via the grok-routing skill without waiting for a slash command.

If the user is new or asks what to do next, offer /grok:tour (15-minute guided first win) and point to docs/08-getting-started-with-grok.md for the human map.

Read the full file on GitHub · 53 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. 3d ago First seen · 53 lines · 11 tokens per session scan C d6b670ac3eaf

Subscribe to this mod's changes

setup is a command published in the GitHub repository xzawed/claude-grok-build-plugin (1 stars, last pushed yesterday), licensed MIT. It adds 11 tokens to every session and 609 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.