claude-code-workflow: Command for Claude Code

.claude/commands/plan.md

plan is a command for Claude Code from Caspian-Sun/claude-code-workflow. It costs 0 tokens per session (1,978 once invoked), scanned A, original, MIT.

A software-architecture planning command that turns an approved product requirements document into a traceable implementation task list. A PRD is a document describing what a product must do and the rules it must follow.

In plain words
What is it for?
Use it to read PRD feature headings, check required business rules, and prepare tasks linked back to the original requirements.
Why use it?
It prevents plans and generated tests from being based on undocumented assumptions or missing business rules.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths; mentions CLAUDE.md.

This is Caspian-Sun/claude-code-workflow's own configuration. It tells Claude Code how to work on claude-code-workflow itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-code-workflow configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Caspian-Sun/claude-code-workflow. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Caspian-Sun/claude-code-workflow/main/.claude/commands/plan.md
Clone the repo
git clone --depth 1 https://github.com/Caspian-Sun/claude-code-workflow

Made for: Claude Code.

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/caspian-sun/claude-code-workflow/plan/github.svg)](https://agentmods.dev/commands/caspian-sun/claude-code-workflow/plan)
Your own site
<a href="https://agentmods.dev/commands/caspian-sun/claude-code-workflow/plan"><img src="https://agentmods.dev/badge/commands/caspian-sun/claude-code-workflow/plan/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for plan

Your own site · 80×15
<a href="https://agentmods.dev/commands/caspian-sun/claude-code-workflow/plan"><img src="https://agentmods.dev/badge/commands/caspian-sun/claude-code-workflow/plan.svg" alt="Reviewed on agentmods" width="80" 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 1,978 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.01978
Opus 5.5 $0.00000 $0.00791
Sonnet 5.5 $0.00000 $0.00396
Haiku 4.5 $0.00000 $0.00198

Measured 2mo ago against content hash e3f39cb5d49c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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.

.claude/commands/plan.md · 155 lines

How it starts

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

You are now acting as a Software Architect. Based on the requirements I provide, complete the following:

Step 0: Locate the PRD (mandatory)

Task lists must be traceable to PRD anchors — otherwise the downstream /test command cannot generate tests from business rules.

  1. Determine input type:

    • Input is @docs/prds/xxx.md path → read directly
    • Input is a text description → stop and ask the user:
      • Does a corresponding PRD already exist? What is the path?
      • If not, recommend running /prd <requirement description> to generate a PRD draft first, then fill in all [TBD] items before coming back to run /plan
    • Do not hardcode requirements without a PRD — the resulting acceptanceCriteria would be AI guesses, and tests would be wrong too
  2. Extract all H2 feature headings from the PRD as anchor sources for subsequent prdRef fields:

    Anchors extracted from docs/prds/user-list.md:
      - #search-form
      - #data-table
      - #bulk-delete
    
  3. If the PRD lacks a "Business Rules" section, prompt the user to fill it in before continuing (no rules = no reliable test generation)

  4. Hard gate: invoke /prd-check for completeness validation (stop if it fails)

    Must run /prd-check against the input PRD (defined in .claude/commands/prd-check.md) and get the result:

    • Pass → proceed to the "Analysis Steps"
    • Fail → output the /prd-check error content, terminate, do not proceed to task breakdown

    How to run: as an embedded step in /plan, run all 5 checks defined in prd-check.md in full — same rules, output format, and blocking decisions. Do not re-implement the check logic, and do not downgrade or skip it.

    Why it's a separate command:

    • Users can independently run /prd-check @docs/prds/xxx.md during PRD review for real-time self-checking without needing to run /plan
    • /plan and /prd-check share the same check rules, avoiding divergence

Analysis Steps

Read the full file on GitHub · 155 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. 2mo ago First seen · 155 lines · 0 tokens per session scan A e3f39cb5d49c

Subscribe to this mod's changes

plan is a command published in the GitHub repository Caspian-Sun/claude-code-workflow (10 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,978 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-31.