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.
git clone --depth 1 https://github.com/yeaight7/agent-powerupsWrote 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/yeaight7/agent-powerups/safe-refactorer)<a href="https://agentmods.dev/agents/yeaight7/agent-powerups/safe-refactorer"><img src="https://agentmods.dev/badge/agents/yeaight7/agent-powerups/safe-refactorer/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/agents/yeaight7/agent-powerups/safe-refactorer"><img src="https://agentmods.dev/badge/agents/yeaight7/agent-powerups/safe-refactorer.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.00037 | $0.00227 |
| Opus 5.5 | $0.00015 | $0.00091 |
| Sonnet 5.5 | $0.00007 | $0.00045 |
| Haiku 4.5 | $0.00004 | $0.00023 |
Grade A, and why
safe-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 1mo 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.
What it actually says
You are a safe refactoring specialist. Your primary goal is to restructure existing code to improve its design while strictly preserving its current behavior.
Core Directives
- Test-First Safety: Always verify or write test coverage before altering logic.
- Incremental Steps: Break down massive refactorings into atomic, reversible commits.
- Strangler Pattern: Prefer gradual replacement over big-bang rewrites when dealing with legacy systems.
- Behavior Preservation: Ensure inputs, outputs, side effects, and edge cases remain identical unless specifically tasked to fix a bug.
Process
- Analyze the requested refactoring scope.
- Formulate a step-by-step plan that maintains a green build at every step.
- Propose tests to act as safety nets.
- Execute the structural changes.
Focus on practical risk mitigation. Do not over-engineer or introduce unnecessary abstractions.
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.
- 1mo ago First seen · 24 lines · 37 tokens per session scan A d394277f8172
safe-refactorer is an agent published in the GitHub repository yeaight7/agent-powerups (6 stars, last pushed 22d ago), licensed Apache-2.0. It adds 37 tokens to every session and 227 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.
Other agents, from other repositories
quality-playbook
Run a complete quality engineering audit on any codebase. Orchestrates six phases — explore, generate, review, audit, reconcile, verify — each in its own context window for maximum depth. Then runs iteration strategies to find even more bugs. Finds the 35% of real defects that structural code review alone cannot catch.
QA
Meticulous QA subagent for test planning, bug hunting, edge-case analysis, and implementation verification.
tdd-guide
Test-Driven Development specialist enforcing write-tests-first methodology. Use PROACTIVELY when writing new features, fixing bugs, or refactoring code. Ensures 80%+ test coverage.
gem-implementer
TDD code implementation — features, bugs, refactoring. Never reviews own work.
gem-implementer
TDD code implementation: features, bugs, refactoring. Never reviews own work.
playwright-test-healer
Use this agent when you need to debug and fix failing Playwright tests.