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 agentmods add skills/rtazima/claude-proj-blueprint/refactornpx skills add rtazima/claude-proj-blueprint --skill refactorgit clone --depth 1 https://github.com/rtazima/claude-proj-blueprintWrote 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/rtazima/claude-proj-blueprint/refactor)<a href="https://agentmods.dev/skills/rtazima/claude-proj-blueprint/refactor"><img src="https://agentmods.dev/badge/skills/rtazima/claude-proj-blueprint/refactor.svg" alt="Measured on agentmods" 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.00053 | $0.01099 |
| Opus 5 | $0.00026 | $0.00549 |
| Sonnet 5 | $0.00011 | $0.00220 |
| Haiku 4.5 | $0.00005 | $0.00110 |
Grade A, and why
refactor 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 6d 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 — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactoring
Change code structure without changing behavior. Tests must pass before AND after. This is NOT the slop-cleaner (cosmetic). Refactoring is structural/architectural.
Rules
- Tests green before starting — if tests don't pass, fix them first (that's debugging, not refactoring)
- One refactoring at a time — don't mix extract-function with rename with move-file
- Commit between refactorings — each structural change gets its own commit
- Tests green after each change — run tests after every refactoring step
- ADR for architectural changes — if the refactoring changes module boundaries, create an ADR
- Update imports/references — grep the entire codebase for references to moved/renamed items
- Update docs — CLAUDE.md module map, README project structure if files moved
Refactoring Catalog
Extract
| What | When | How |
|---|---|---|
| Extract function | Logic repeated in 2+ places, or function > 30 lines | Identify the cohesive block, extract, name by intent |
| Extract module/file | File > 300 lines or has 2+ distinct responsibilities | Identify responsibility boundaries, split, update imports |
| Extract interface/type | Concrete type used in 3+ places, or to enable mocking | Define interface, make existing code implement it |
| Extract constant/config | Magic numbers or strings used in multiple places | Move to config or constants file, reference everywhere |
Move
| What | When | How |
|---|---|---|
| Move function | Function is in the wrong module (called more from elsewhere) | Move, update all imports (grep -r "functionName" src/) |
| Move file | File doesn't belong in its current directory | Move, update all imports, update CLAUDE.md if module map changes |
Rename
| What | When | How |
|---|---|---|
| Rename variable/function | Name doesn't describe intent, or naming convention changed | Rename in definition AND all references |
| Rename file | File name doesn't match its content or convention | Rename, update all imports |
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.
- 6d ago First seen · 99 lines · 53 tokens per session scan A 9502e787c657
refactor is a skill published in the GitHub repository rtazima/claude-proj-blueprint (20 stars, last pushed 3mo ago), licensed MIT. It adds 53 tokens to every session and 1,099 once invoked, about $0.0003 per session on Opus 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-30.
Other skills, from other repositories
sparc-methodology
SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) comprehensive development methodology with multi-agent orchestration.
architecture-diagram
Dark-themed SVG architecture/cloud/infra diagrams as HTML.
studio
Architecture Studio control plane — initialize or inspect a studio workspace, create and register projects, or route an architecture/AEC task to the right agent or skill. Use when the user runs /as:studio, asks to set up or open their studio, manage its projects, or describes a task without naming a skill.
modular-skills
Build composable skill modules with hub-and-spoke loading. Use when token budget is tight.
product-image-processor
Download, resize, and remove backgrounds from product images at scale. Use when the user asks to "process product images", batch-download images from the schedule, strip backgrounds, or standardize product photos.
tool-catalog
Show the available Architecture Studio skills and their host-appropriate commands, plus Claude Code's native Architecture Studio agents. Use when the user invokes tool-catalog, asks "what can you do" or "what skills are available", or wants a directory of plugin commands. Do not use for a host's native skill-list…