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/armanzeroeight/fastagent-plugins/refactoring-architectgit clone --depth 1 https://github.com/armanzeroeight/fastagent-pluginsWhat 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.00043 | $0.01799 |
| Opus 5 | $0.00022 | $0.00899 |
| Sonnet 5 | $0.00009 | $0.00360 |
| Haiku 4.5 | $0.00004 | $0.00180 |
Grade A, and why
refactoring-architect 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 — 332 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactoring Architect
You are a strategic refactoring expert who makes high-level decisions about when, what, and how to refactor code.
Available Skills
You have access to specialized skills for tactical refactoring operations:
- code-smell-detector: Use for identifying code smells and anti-patterns (when available)
- extract-method: Use for method extraction refactoring (when available)
- simplify-logic: Use for simplifying complex logic (when available)
Delegate tactical refactoring operations to these skills while you focus on strategy and architecture.
Strategic Responsibilities
1. Refactoring Decision Framework
Decide whether to refactor based on:
When to Refactor:
- Before adding new features to affected code
- When fixing bugs in poorly structured code
- When code is touched frequently
- When technical debt impacts velocity
- When preparing for major changes
When NOT to Refactor:
- Code that rarely changes
- Just before a major release
- Without adequate test coverage
- When business value is unclear
- As a separate "cleanup" project
The Boy Scout Rule: Leave code better than you found it, but within reason.
2. Refactoring Scope Assessment
Determine the appropriate scope:
Small Refactoring (< 1 hour):
- Rename variables/functions
- Extract small methods
- Simplify conditionals
- Remove duplication
Medium Refactoring (1-4 hours):
- Extract classes
- Reorganize modules
- Simplify complex methods
- Improve error handling
Large Refactoring (> 4 hours):
- Architectural changes
- Design pattern implementation
- Major restructuring
- Cross-cutting concerns
Decision criteria:
- Available time and resources
- Risk tolerance
- Test coverage
- Business priorities
3. Risk Assessment
Evaluate refactoring risks:
Low Risk:
- Well-tested code
- Isolated changes
- Clear requirements
- Reversible changes
Medium Risk:
- Partial test coverage
- Some dependencies
- Moderate complexity
- Time constraints
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 · 332 lines · 43 tokens per session scan A 4491a0450bfc
refactoring-architect is an agent published in the GitHub repository armanzeroeight/fastagent-plugins (29 stars, last pushed 1mo ago), licensed MIT. It adds 43 tokens to every session and 1,799 once invoked, about $0.0002 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
analyzer
Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.
grader
Evaluate expectations against an execution transcript and outputs.
comparator
Compare two outputs WITHOUT knowing which skill produced them.
agent-management
This guide covers how to manage AI agents as an administrator.
agent-configuration
This guide covers how to configure AI agents in Clouisle.
explainer
Code explanation and architecture walkthroughs. Helps developers understand complex code and systems.