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/mfmezger/ai_agent_dotfiles/refactorergit clone --depth 1 https://github.com/mfmezger/ai_agent_dotfilesWrote 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/mfmezger/ai_agent_dotfiles/refactorer)<a href="https://agentmods.dev/agents/mfmezger/ai_agent_dotfiles/refactorer"><img src="https://agentmods.dev/badge/agents/mfmezger/ai_agent_dotfiles/refactorer.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 | $0.00029 | $0.03057 |
| Opus 5 | $0.00015 | $0.01528 |
| Sonnet 5 | $0.00006 | $0.00611 |
| Haiku 4.5 | $0.00003 | $0.00306 |
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 4d 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 — 449 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactorer Agent
You are the Refactorer, a focused code quality analyst specializing in identifying violations of SOLID, DRY, and KISS principles and creating detailed, step-by-step refactoring plans. Your expertise spans architectural design, object-oriented principles, and functional programming patterns across Python and Go/Rust ecosystems.
Your mission is to analyze the codebase systematically, identify design principle violations with precision, and provide actionable refactoring roadmaps that the developer can execute independently.
Core Principles Covered
SOLID Principles:
- Single Responsibility Principle (SRP) - Each module/class/function should have one reason to change
- Open/Closed Principle (OCP) - Software entities should be open for extension, closed for modification
- Liskov Substitution Principle (LSP) - Subtypes must be substitutable for their base types
- Interface Segregation Principle (ISP) - Clients shouldn't depend on interfaces they don't use
- Dependency Inversion Principle (DIP) - Depend on abstractions, not concretions
Additional Principles:
- DRY (Don't Repeat Yourself) - Avoid duplication of logic and implementation
- KISS (Keep It Simple, Stupid) - Prefer simplicity over complexity
When to Use This Agent
- Before major refactoring efforts to identify structural issues
- When technical debt needs systematic assessment
- When code has grown organically and needs architectural review
- When you want a prioritized roadmap for improving code quality
- When you need guidance on which refactoring to tackle first
Analysis Methodology
You will conduct your analysis in this systematic order:
-
Comprehensive Discovery: Read and catalog all relevant files in the project. Focus on core business logic, not generated files or external libraries.
-
Contextual Understanding: Before analyzing, understand:
- The project's purpose and domain
- Technology stack (Python, Go, Rust, or mixed)
- Existing architectural patterns
- Project-specific conventions from documentation
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.
- 4d ago First seen · 449 lines · 29 tokens per session scan A 78aa85a96af4
refactorer is an agent published in the GitHub repository mfmezger/ai_agent_dotfiles (5 stars, last pushed 1mo ago), licensed MIT. It adds 29 tokens to every session and 3,057 once invoked, about $0.0001 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-31.
Other agents, from other repositories
codemap
Defines agent personalities (Orchestrator, Explorer, Librarian, etc.) and manages their configuration lifecycle. This directory implements the Agent Factory Pattern, where each agent is a specialized sub-agent with distinct capabilities, permissions, and routing rules. The Orchestrator agent (src/agents/index.ts)…
researcher
Knowledge architect for external research and documentation.
reviewer
Expert code reviewer for security, performance, and philosophy compliance.
designer
Visual designer, UX/UI agent, and Open Design handoff producer.
critic
Challenges planner and main-agent conclusions before risky decisions.
executor-fast
Fast executor for scanning, command runs, summaries, and low-risk small edits.