plan

plan is a command for coding agents from promptadvisers/claudex. It costs 31 tokens per session (1,724 once invoked), scanned A, original, MIT.

A command that runs a repeated planning and review process: one agent writes a plan and another checks it for problems until it is accepted or the review limit is reached.

In plain words
What is it for?
Use it to create or refine plans for software changes, with optional control over review rounds or an existing draft.
Why use it?
It helps catch missing steps and weak assumptions before implementation begins.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the claudex plugin — 6 commands, 1 hook 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/promptadvisers/claudex/plan
Clone the repo
git clone --depth 1 https://github.com/promptadvisers/claudex

Or install claudex, the plugin that ships this one along with the rest of its 6 commands, 1 hook.

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 plan

README.md
[![agentmods](https://agentmods.dev/badge/commands/promptadvisers/claudex/plan.svg)](https://agentmods.dev/commands/promptadvisers/claudex/plan)
Your own site
<a href="https://agentmods.dev/commands/promptadvisers/claudex/plan"><img src="https://agentmods.dev/badge/commands/promptadvisers/claudex/plan.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,724 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.00031 $0.01724
Opus 5 $0.00015 $0.00862
Sonnet 5 $0.00006 $0.00345
Haiku 4.5 $0.00003 $0.00172

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

Security

Grade A, and why

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

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/claudex/commands/plan.md · 122 lines

How it starts

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

/claudex:plan

User argument: $ARGUMENTS

You are running the claudex plan-mode autonomous loop. The user wants you to draft a plan, hand it to Codex for adversarial review, revise based on findings, and loop until Codex has nothing material left to flag (or until the round budget is exhausted).

Optional flags

Parse these flags from the start of $ARGUMENTS (the script handles them; you mainly need to detect --skip-interview):

  • --rounds N. Override the default max rounds (3). Common picks: 3 (default, fast), 5 (deeper grilling), 7+ (very high stakes).
  • --from-draft. Use the existing PLAN.md in the project root instead of drafting from scratch. PLAN.md must exist and be non-empty.
  • --skip-interview. Bypass the topic-sharpening interview offer in step 2 below. Useful when you've already nailed the topic or you're in a rush.

Procedure

1. Empty arguments → ask for a topic

If $ARGUMENTS is empty (no topic, no flags), do NOT run start-loop.sh. Instead, ask the user a single question:

What feature or change should I plan? (e.g. "add expiry dates to my links", "migrate auth to Clerk")

Optional: prefix with --rounds N to override the default of 3 grilling rounds, --from-draft to use an existing PLAN.md, or --skip-interview to skip the interview offer.

Wait for their reply, then re-invoke /claudex:plan <their answer>. Do not proceed past this step until you have a topic.

2. Offer the topic-sharpening interview

If $ARGUMENTS does NOT contain --skip-interview, use the AskUserQuestion tool to offer the user a quick interview before launching the loop. The interview lets the user front-load constraints and worries that would otherwise come out only when Codex flags them on round 2 or 3, a much cheaper signal capture.

Use this exact AskUserQuestion call:

  • Question: "Want me to interview you to sharpen the topic before launching the adversarial loop, or just go?"
  • Header: "Interview"
  • Options:
    1. Label: "Interview me first (Recommended)", Description: "I'll ask 3 quick questions about scope, constraints, and edge cases you're worried about. Then I launch the loop with a sharper topic. Costs ~30 seconds, saves a round of grilling."
    2. Label: "Just launch the loop", Description: "Skip the interview and start drafting PLAN.md from the topic as written. Faster, but Codex may surface basic gaps you could have answered up front."

Read the full file on GitHub · 122 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 · 122 lines · 31 tokens per session scan A 598e8df4ef2d

Subscribe to this mod's changes

plan is a command published in the GitHub repository promptadvisers/claudex (119 stars, last pushed 4mo ago), licensed MIT. It adds 31 tokens to every session and 1,724 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-09-01.