setup

A setup command that checks whether Claude Code is installed and signed in, selects its default model, and controls an optional review check when work stops.

In plain words
What is it for?
Use it to test readiness, choose or clear the default Claude model, and enable or disable the stop-time review gate.
Why use it?
It identifies setup problems before you delegate coding work. It also provides guidance for installing or authenticating Claude Code when needed.

Command

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/tornikegomareli/claude-plugin-codex/setup
Clone the repo
git clone --depth 1 https://github.com/tornikegomareli/claude-plugin-codex
Per session 49 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 649 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.00049 $0.00649
Opus 5 $0.00024 $0.00324
Sonnet 5 $0.00010 $0.00130
Haiku 4.5 $0.00005 $0.00065

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

Security

Grade A, and why

setup 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.

plugins/claude/commands/setup.md · 36 lines

What it actually says

Check whether Claude Code is ready for delegation, and manage the optional stop-time review gate.

Raw slash-command arguments: $ARGUMENTS

Locating the companion script:

  • The companion script is scripts/claude-companion.mjs inside this plugin's root directory (the installed claude plugin directory that contains .codex-plugin/plugin.json).
  • Always invoke it with an absolute path.

Flow:

  1. Run:
node "<plugin-root>/scripts/claude-companion.mjs" setup --json $ARGUMENTS
  1. If the report shows Claude Code is not installed and npm is available, ask the user exactly once, in plain conversation, with "Install Claude Code (Recommended)" first and "Skip for now" second. If they accept, run npm install -g @anthropic-ai/claude-code, then rerun the setup command.
  2. If Claude Code is installed but not authenticated, tell the user to run claude interactively and use /login to sign in. Mention claude setup-token for headless machines.
  3. If the report shows ready: true and defaultModel is null and the user did not pass --model or --clear-model: ask the user exactly once, in plain conversation, which model Claude should use for delegated tasks in this repository, with these options — "Claude Code's own default (Recommended)", "sonnet", "opus", "haiku". If they pick a specific model, run the setup command again with --model <choice>. If they keep the default, change nothing.
  4. Rerun the setup command without --json and present the rendered report verbatim.

Default model:

  • --model <model> stores a default Claude model for this repository (haiku, sonnet, opus, fable, or a full model name; fast maps to haiku). All delegated runs use it unless a per-run --model overrides it.
  • --clear-model removes the stored default so Claude Code's own default model applies again.

Review gate:

  • --enable-review-gate turns on a Stop hook that runs a Claude review of each Codex turn before the session can end, and blocks if it finds issues. Warn the user that this can create long Claude/Codex loops and consume usage quickly.
  • --disable-review-gate turns it off.

Sandbox requirements:

  • The companion spawns the claude CLI, which needs network access to reach the Anthropic API.
  • If the sandbox blocks the command or Claude reports a connection error, rerun the same shell command with escalated permissions and explain why in the justification.
  • Do not work around a sandbox denial by improvising your own review or edits; the command's value is Claude's independent output.
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. 2d ago First seen · 36 lines · 49 tokens per session scan A 51a0394a6b0e

Subscribe to this mod's changes

setup is a command published in the GitHub repository tornikegomareli/claude-plugin-codex (9 stars, last pushed 1mo ago), licensed MIT. It adds 49 tokens to every session and 649 once invoked, about $0.0002 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.