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.
npx skills add Notysoty/openagentskills --skill refactor-plannergit clone --depth 1 https://github.com/Notysoty/openagentskillsWrote 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/skills/notysoty/openagentskills/refactor-planner)<a href="https://agentmods.dev/skills/notysoty/openagentskills/refactor-planner"><img src="https://agentmods.dev/badge/skills/notysoty/openagentskills/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/skills/notysoty/openagentskills/refactor-planner"><img src="https://agentmods.dev/badge/skills/notysoty/openagentskills/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.00022 | $0.01534 |
| Opus 5.5 | $0.00009 | $0.00614 |
| Sonnet 5.5 | $0.00004 | $0.00307 |
| Haiku 4.5 | $0.00002 | $0.00153 |
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 3mo 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 — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactor Planner
What this skill does
This skill directs the agent to analyze a block of code (or an entire module) and produce an ordered, safe refactoring plan. Rather than rewriting everything at once, it breaks the work into small, reversible steps — each one leaving the tests green and the behavior unchanged. It identifies code smells, maps dependencies, flags high-risk areas, and sequences the changes so you can ship incrementally without introducing regressions.
Use this when you have messy, hard-to-understand code that works but needs cleaning up before you can safely add features.
How to use
Claude Code / Cline
Copy this file to .agents/skills/refactor-planner/SKILL.md in your project root.
Then ask the agent:
- "Use the Refactor Planner skill on
src/utils/dataProcessor.ts." - "Plan a safe refactor of this function using the Refactor Planner skill."
Paste in the code you want refactored, or point to a file path.
Cursor
Add the "Prompt / Instructions" section below to your .cursorrules file, or paste it directly into the Cursor AI pane before sharing the code you want refactored.
Codex
Paste the target code into the chat along with the instructions from the section below. For large files, include the full file plus any files that import from it so Codex can map dependencies.
The Prompt / Instructions for the Agent
When asked to plan a refactor, follow these steps precisely:
-
Read the code thoroughly. If a file path is given, read the full file. Also read any files that import from it or that it imports from, so you understand the dependency graph.
-
Identify code smells. Look for:
- Functions longer than 40 lines
- Deeply nested conditionals (more than 3 levels)
- Duplicated logic (copy-paste code)
- Magic numbers and hardcoded strings
- God objects or functions that do too many things
- Inconsistent naming conventions
- Mutable shared state
- Missing or misleading comments
- Dead code (unreachable or unused)
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.
- 3mo ago First seen · 154 lines · 22 tokens per session scan A be69ab8fea80
Refactor Planner is a skill published in the GitHub repository Notysoty/openagentskills (9 stars, last pushed 3mo ago), licensed MIT. It adds 22 tokens to every session and 1,534 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-08-31.
Refactor Planner compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| Refactor PlannerNotysoty/openagentskills | Skill | 9 | 3mo ago | MIT | A | 22 | Claude Code, Codex |
| absolute-simplifymaddhruv/absolute | Skill | 223 | 4mo ago | MIT | A | 178 | Claude Code |
| loud-errorsmikestangdevs/craft-skills | Skill | 4 | 20d ago | MIT | A | 76 | Claude Code |
| setup-craft-skillsmikestangdevs/craft-skills | Skill | 4 | 20d ago | MIT | A | 64 | Claude Code |
| boyscoutmikestangdevs/craft-skills | Skill | 4 | 20d ago | MIT | A | 64 | Claude Code |
| delete-thismikestangdevs/craft-skills | Skill | 4 | 20d ago | MIT | A | 68 | Claude Code |
| explain-backmikestangdevs/craft-skills | Skill | 4 | 20d ago | MIT | A | 78 | Claude Code |