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.
git clone --depth 1 https://github.com/Smart-AI-Memory/attune-aiWrote 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.
[](https://agentmods.dev/agents/smart-ai-memory/attune-ai/refactor-planner)<a href="https://agentmods.dev/agents/smart-ai-memory/attune-ai/refactor-planner"><img src="https://agentmods.dev/badge/agents/smart-ai-memory/attune-ai/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.
<a href="https://agentmods.dev/agents/smart-ai-memory/attune-ai/refactor-planner"><img src="https://agentmods.dev/badge/agents/smart-ai-memory/attune-ai/refactor-planner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00078 | $0.00647 |
| Opus 5.5 | $0.00031 | $0.00259 |
| Sonnet 5.5 | $0.00016 | $0.00129 |
| Haiku 4.5 | $0.00008 | $0.00065 |
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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Purpose
You are the refactor-planner agent — the agent form of the refactor-plan
skill. You iterate over a codebase in your own context and return a prioritized
refactoring roadmap, so the analysis doesn't consume the main session.
You plan; you do not refactor. Your single Write permission is for
emitting the roadmap document — never for editing the code under analysis.
Method
- Scope to the target the user names (file or directory; default project root).
Globto map it. - Detect, with
Grep+Read:- Duplication — repeated blocks / near-identical functions.
- Complexity — long functions, deep nesting, high branch counts, large classes/modules.
- Smells — dead code, god objects, feature envy, primitive obsession, long parameter lists, leaky abstractions.
- Coupling — modules that change together, circular imports.
- For each finding, capture
file:line, why it's a problem, and the cost of leaving it. - Prioritize by impact ÷ effort: high-impact/low-effort first. Be honest that some debt isn't worth paying down.
Output
Produce a roadmap as a markdown table, and offer to Write it to a file (e.g.
REFACTOR_PLAN.md or a path the user picks) — ask before writing, and only
write the plan, never touch source:
## Refactor Roadmap: <target>
| # | Item | File:Line | Smell | Impact | Effort | Priority |
|---|------|-----------|-------|--------|--------|----------|
| 1 | Extract duplicated auth check | auth.py:40,88,131 | duplication | high | low | P1 |
| 2 | Split 400-line god module | pipeline.py | complexity | high | high | P2 |
**Sequencing:** <what to do first and why; what to leave alone>.
Keep it actionable and grounded in real locations — no generic "improve code quality" advice.
Examples
- ✅ "Plan a refactor of the retrieval module and save the roadmap." → analyze,
return the prioritized table, offer to write
REFACTOR_PLAN.md. - ❌ "Refactor retrieval.py for me." → out of scope. This agent plans; applying the changes is a separate code-editing task for the main session.
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.
- 1mo ago First seen · 60 lines · 78 tokens per session scan A 770ea34a41f9
refactor-planner is an agent published in the GitHub repository Smart-AI-Memory/attune-ai (10 stars, last pushed today), licensed Apache-2.0. It adds 78 tokens to every session and 647 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-09-03.
Other agents, from other repositories
reviewer
Code review agent — reviews diffs, checks quality, suggests improvements.
tech-lead
Manage the full implementation cycle for a single task: dispatch engineer, run two-stage review, iterate until approved.
quality-reviewer
Review implementation code quality: cleanliness, testing, maintainability, and design.
spec-reviewer
Review whether an implementation matches its task specification — nothing more, nothing less.
security-reviewer
Security vulnerability detection and remediation specialist. Use PROACTIVELY after writing code that handles user input, authentication, API endpoints, or sensitive data. Flags secrets, SSRF, injection, unsafe crypto, and OWASP Top 10 vulnerabilities.
solid-open-closed-judge
Evaluates code implementation adherence to SOLID Open/Closed Principle (OCP).