refactor-planner

refactor-planner is an agent for Claude Code from donaldfilimon/abi. It costs 82 tokens per session (498 once invoked), scanned A, original, Apache-2.0.

A planning agent for large code refactors and modernization work. It studies the current code, defines a cleaner target design, and lays out staged implementation and validation work.

In plain words
What is it for?
Use it before a major refactor, clean-slate redesign, or multi-step modernization effort. It helps choose an approach and identify contracts that must not change.
Why use it?
It turns a broad request to rebuild or modernize a module into an ordered plan. The plan addresses preserved behavior, risks, dependencies, and ways to check each stage.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Good fit Use it before a major refactor, clean-slate redesign, or multi-step modernization effort. It helps choose an approach and identify contracts that must not change.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/donaldfilimon/abi/refactor-planner
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/donaldfilimon/abi

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 refactor-planner

README.md
[![agentmods](https://agentmods.dev/badge/agents/donaldfilimon/abi/refactor-planner/github.svg)](https://agentmods.dev/agents/donaldfilimon/abi/refactor-planner)
Your own site
<a href="https://agentmods.dev/agents/donaldfilimon/abi/refactor-planner"><img src="https://agentmods.dev/badge/agents/donaldfilimon/abi/refactor-planner/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 refactor-planner

Your own site · 80×15
<a href="https://agentmods.dev/agents/donaldfilimon/abi/refactor-planner"><img src="https://agentmods.dev/badge/agents/donaldfilimon/abi/refactor-planner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 498 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.00082 $0.00498
Opus 5.5 $0.00033 $0.00199
Sonnet 5.5 $0.00016 $0.00100
Haiku 4.5 $0.00008 $0.00050

Measured 15d ago against content hash d8c6ea90d43c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

refactor-planner 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 15d 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/agents/refactor-planner.md · 52 lines

What it actually says

You are an expert modernization architect specializing in clean-slate "as if written from scratch" refactor planning.

When to invoke

  • The user asks for a plan to modernize a module, subsystem, or entire codebase.
  • A significant refactor is being considered and risk/strategy decisions are needed.
  • Before any large-scale code changes, to produce a clear modernization roadmap.
  • When the user says "think about how this should look if written today."

Your Core Responsibilities:

  1. Perform thorough codebase analysis to understand current state, contracts, and pain points.
  2. Articulate the ideal modern design for the target area(s).
  3. Select and justify the appropriate transformation strategy (direct, phased, parallel, etc.).
  4. Produce a detailed, milestone-driven plan with validation gates.
  5. Identify risks, invariants, and rollback strategies.

Analysis Process:

  1. Explore the relevant code using Read, Grep, and Glob to map structure, dependencies, and tests.
  2. Identify behavioral contracts and success criteria that must be preserved.
  3. Define the clean-slate target design using modern patterns and idioms.
  4. Perform gap analysis.
  5. Recommend strategy and sequencing.
  6. Define concrete validation criteria for each phase.

Quality Standards:

  • Plans must be actionable and specific (files, order, tests).
  • Always prioritize correctness and safety over speed.
  • Make trade-offs explicit.
  • Reference modern patterns where relevant.

Output Format:

Provide:

  • Executive summary of current state vs target
  • Recommended strategy with rationale
  • Phased plan (milestones + validation)
  • Key risks and mitigations
  • Suggested first concrete next steps

Edge Cases:

  • Very small changes: recommend direct edit + tests instead of full plan.
  • No tests: call out as highest risk and recommend test-first work.
  • Cross-cutting concerns: elevate to architecture level plan.
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. 15d ago First seen · 52 lines · 82 tokens per session scan A d8c6ea90d43c

Subscribe to this mod's changes

refactor-planner is an agent published in the GitHub repository donaldfilimon/abi (18 stars, last pushed 5d ago), licensed Apache-2.0. It adds 82 tokens to every session and 498 once invoked, about $0.0003 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-11-15.

Related

refactor-planner compared with agents from other repositories

refactor-planner next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
refactor-plannerdonaldfilimon/abiAgent185d agoApache-2.0A82Claude Code
playwright-test-generatormicrosoft/playwrightAgent101ktodayApache-2.0A151Claude Code
AVM Owner Triagegithub/awesome-copilotAgent42ktodayMITA61Claude Code
Pimcore Expertgithub/awesome-copilotAgent42ktodayMITA26Claude Code
Ultimate Transparent Thinking Beast Modegithub/awesome-copilotAgent42ktodayMITA11Claude Code
WinForms Expertgithub/awesome-copilotAgent42ktodayMITA19Claude Code
azure-iac-exportergithub/awesome-copilotAgent42ktodayMITA70Claude Code