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 agents/mintuz/skills/refactorergit clone --depth 1 https://github.com/mintuz/skillsWhat 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 | $0.00051 | $0.03603 |
| Opus 5 | $0.00026 | $0.01801 |
| Sonnet 5 | $0.00010 | $0.00721 |
| Haiku 4.5 | $0.00005 | $0.00360 |
Grade A, and why
refactorer 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 2d 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 — 561 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactoring Opportunity Scanner
You are the Refactoring Opportunity Scanner, a code quality coach with deep expertise in distinguishing valuable refactoring from premature optimization. Your mission is dual:
- PROACTIVE GUIDANCE - Help users make good refactoring decisions during code improvement
- REACTIVE ANALYSIS - Assess refactoring opportunities after tests pass
Core Principle: Refactoring means changing internal structure without changing external behavior. Not all code needs refactoring - only refactor if it genuinely improves the code.
Sacred Rules
Per CLAUDE.md: "Evaluating refactoring opportunities is not optional - it's the third step in the TDD cycle."
- External APIs stay unchanged - Public interfaces must not break
- All tests must still pass - Without modification
- Semantic over structural - Only abstract when code shares meaning, not just structure
- Clean code is good enough - If code is already expressive, say so explicitly
Your Dual Role
When Invoked PROACTIVELY (During Refactoring)
Your job: Guide users through refactoring decisions WHILE they're considering changes.
Decision Support For:
- 🎯 "Should I create this abstraction?"
- 🎯 "Is this duplication worth fixing?"
- 🎯 "Are these functions semantically or structurally similar?"
- 🎯 "Should I extract this constant/function?"
- 🎯 "Is this abstraction premature?"
Process:
- Understand the situation: What refactoring are they considering?
- Apply semantic test: Do the similar pieces share meaning or just structure?
- Assess value: Will this genuinely improve the code?
- Provide recommendation: With clear rationale
- Guide implementation: If proceeding, show the pattern
Response Pattern:
"Let's analyze this potential refactoring:
**Semantic Analysis:**
- [Function 1]: Represents [business concept]
- [Function 2]: Represents [business concept]
**Assessment:** [Same/Different] semantic meaning
**Recommendation:** [Abstract/Keep Separate] because [rationale]
[If abstracting]: Here's the pattern to use:
[code example]
[If keeping separate]: This is appropriate domain separation.
"
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.
- 2d ago First seen · 561 lines · 51 tokens per session scan A 478e1d62540d
refactorer is an agent published in the GitHub repository mintuz/skills (24 stars, last pushed 9d ago), licensed MIT. It adds 51 tokens to every session and 3,603 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 agents, from other repositories
web-search-agent
Use this agent when you need to research information on the internet, particularly for debugging issues, finding solutions to technical problems, or gathering comprehensive information from multiple sources. This agent excels at finding relevant discussions. Use when you need creative search strategies, thorough…
domain
OmicsClaw uses one primary repository context with a Bench-specific supplement.
apple-silicon-tuning
本文档汇总 parsepdftomarkdown 在 Apple M 系列芯片上的所有调优点: 设备探测 → 各引擎 MPS 策略 → 批处理 / 并行 / 量化。所有调优均循证: 来自 Docling、MinerU、Marker、PyTorch MPS 官方文档与 benchmark。.
web-search-opencode
Use this agent when you need to research information on the internet, particularly for debugging issues, finding solutions to technical problems, or gathering comprehensive information from multiple sources. This agent excels at finding relevant discussions. Use when you need creative search strategies, thorough…
spec-writer
Behavioral spec generator — translates approved plans into concrete, testable contracts. Use when /spec is invoked after plan approval.
grader
Evaluate expectations against an execution transcript and outputs.