plan

plan is a command for Claude Code from juanmhidalgo/claude-plugins. It costs 36 tokens per session (2,502 once invoked), scanned A, original, MIT.

A command for creating an ordered plan for safely refactoring code, meaning changing its internal structure without intentionally changing its behavior.

In plain words
What is it for?
Use it after analysing a refactoring target to document the goal, scope, risks, required tests, and execution steps.
Why use it?
It turns a broad refactoring task into checked preparation steps and smaller implementation phases.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the refactor plugin — 2 commands, 3 agents shipped together

Good fit Use it after analysing a refactoring target to document the goal, scope, risks, required tests, and execution steps.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/juanmhidalgo/claude-plugins/plan
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.

Clone the repo
git clone --depth 1 https://github.com/juanmhidalgo/claude-plugins

Made for: Claude Code.

Or install refactor, the plugin that ships this one along with the rest of its 2 commands, 3 agents.

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/juanmhidalgo/claude-plugins/plan/github.svg)](https://agentmods.dev/commands/juanmhidalgo/claude-plugins/plan)
Your own site
<a href="https://agentmods.dev/commands/juanmhidalgo/claude-plugins/plan"><img src="https://agentmods.dev/badge/commands/juanmhidalgo/claude-plugins/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/juanmhidalgo/claude-plugins/plan"><img src="https://agentmods.dev/badge/commands/juanmhidalgo/claude-plugins/plan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,502 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.00036 $0.02502
Opus 5.5 $0.00014 $0.01001
Sonnet 5.5 $0.00007 $0.00500
Haiku 4.5 $0.00004 $0.00250

Measured 26d ago against content hash 0876802eebc0, 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 26d 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.

refactor/commands/plan.md · 256 lines

How it starts

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

Refactoring Plan

Create a structured refactoring plan.

Target: $ARGUMENTS

Phase 1: Gather Context

Before launching, list with Grep (not sampled):

  • Targets: every file and directory the refactor will touch — including the consumers that a rename would reach, not just the file being restructured.
  • Symbols: the names you expect to rename, move, or delete. Leave empty only if the refactor genuinely renames nothing; the semantic-overlap scan is the half git cannot do for you.

Then launch the refactor:refactor workflow and wait for its notification. It runs refactor-planner and conflict-scout in parallel and returns both reports as structured data:

Workflow({ name: "refactor:refactor", args: {
  mode: "plan", target: "<the target>",
  targets: ["<path>", "<path>"], symbols: ["<name>", "<name>"] } })
  • target is the file, directory or topic as given.
  • Add skip_explore: true only if a recent /refactor:analyze already covers this target; the scout always runs.
  • Add base: "<branch>" only when the user named a base branch; otherwise the scout reads it from origin/HEAD.

The planner gathers what needs to change and why, test coverage, dependencies that could break and similar refactorings done in this project. The scout maps the targets and symbols against open PRs, branches and local work. A plan written without this scan orders the work by internal risk alone and ignores the only cost that grows while you work: someone else's branch drifting away from yours.

Read what comes back. summary is first and survives a result cut off at the end; the full reports are explore (the planner) and scout:

Read the full file on GitHub · 256 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. 26d ago Changed · -16 lines · -77 tokens per session 0876802eebc0
  2. 28d ago Changed · +88 lines 497480d378d7
  3. 29d ago Changed · -33 lines · +77 tokens per session bd8d2eb5ad81
  4. 1mo ago Changed · -3 lines 4a31ef1b82fd
  5. 1mo ago Changed · +22 lines dbbc061f03c4
  6. 2mo ago Changed 5cddac6be063
  7. 2mo ago Changed · +45 lines 426efc246c34
  8. 2mo ago First seen · 153 lines · 36 tokens per session scan A 358b926b294e

Subscribe to this mod's changes

plan is a command published in the GitHub repository juanmhidalgo/claude-plugins (8 stars, last pushed 18d ago), licensed MIT. It adds 36 tokens to every session and 2,502 once invoked, about $0.0001 per session on Opus 5.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-03.

Related

plan compared with commands from other repositories

plan next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
planjuanmhidalgo/claude-pluginsCommand818d agoMITA36Claude Code
bugfixnWave-ai/nWaveCommand63612d agoMITA18Claude Code
hub-tddKastalien-Research/thoughtboxCommand6620d agoMITA27Claude Code
speckit.tdd.planarrrrny/zuraffaCommand5todayMITA37Claude Code
task-verifythixpin/pitwayCommand201mo agoMITA0Claude Code
usage-addthixpin/pitwayCommand201mo agoMITA0Claude Code
milestone-listthixpin/pitwayCommand201mo agoMITA0Claude Code