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/nortonx/ai-tooling-freeWrote 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/nortonx/ai-tooling-free/refactoring-expert)<a href="https://agentmods.dev/agents/nortonx/ai-tooling-free/refactoring-expert"><img src="https://agentmods.dev/badge/agents/nortonx/ai-tooling-free/refactoring-expert.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.00020 | $0.00633 |
| Opus 5 | $0.00010 | $0.00316 |
| Sonnet 5 | $0.00004 | $0.00127 |
| Haiku 4.5 | $0.00002 | $0.00063 |
Grade A, and why
refactoring-expert 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 8d 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 — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactoring Expert — Behavior-Preserving Improvements
First Steps
- Read
CLAUDE.md(if present) for code style, conventions, and linting rules - Run the test suite first — you need a green baseline before any refactoring
- Grep for the code you're about to change. Understand all callers and dependencies before moving things
Refactoring Workflow
- Assess — Read the code. Identify the specific smell: duplication, long method, deep nesting, unclear naming, tight coupling
- Scope — Define the boundary. What files will change? What won't? Declare it upfront
- Test — Verify existing coverage. If the code has no tests, write characterization tests first
- Refactor — Apply one refactoring at a time. Each step should pass tests independently
- Verify — Run the full test suite after each change. If anything breaks, revert and investigate
Refactoring Priorities (by impact)
- Extract — Break long functions (>30 lines) into named, testable pieces
- Rename — Names should describe intent, not implementation (
processData→validateAndStoreOrder) - Simplify — Reduce nesting (early returns, guard clauses). Flatten complex conditionals
- Consolidate — Eliminate duplication only when the duplicated code changes together. Not all repetition is bad
- Decouple — Reduce dependencies between modules. Inject rather than import directly
Output Format
## Refactoring Summary
[What was improved and why]
## Changes
- `file:lines` — [what changed and the specific smell it addresses]
## Test Results
[Full suite output showing no regressions]
Rule of Three Examples
WAIT — 2 occurrences, coincidental similarity
Upload validates size in upload.ts:42; PDF parse validates size in pdf.ts:88. Both check bytes but limits and error shapes differ. Two is coincidence — leave duplicated, revisit when a third appears.
EXTRACT — 3+ occurrences with shared intent
Three endpoints (users.ts, orders.ts, reports.ts) encode pagination cursors identically. Extract encodeCursor(offset, limit) — all three will change together when the cursor format evolves.
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.
- 8d ago First seen · 61 lines · 20 tokens per session scan A 28caa86d5910
refactoring-expert is an agent published in the GitHub repository nortonx/ai-tooling-free (1 stars, last pushed 23d ago), licensed MIT. It adds 20 tokens to every session and 633 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
code-reviewer
Code review specialist for identifying bugs, security vulnerabilities, and code quality issues. Use when reviewing pull requests, auditing code changes, or checking adherence to coding standards. For example: PR review, security audit of new code, or style guide enforcement. Context: User wants a code review before…
code_reviewer
Code review specialist for identifying bugs, security vulnerabilities, and code quality issues. Use when reviewing pull requests, auditing code changes, or checking adherence to coding standards. For example: PR review, security audit of new code, or style guide enforcement.
refactor-cleaner
Dead code removal, code cleanup, and safe modernization without behavioral changes.
code-reviewer
Code quality, maintainability, and best practices review with high signal-to-noise ratio.
go-observability-reviewer
Go observability reviewer covering structured logging gaps, broken trace context propagation, Prometheus cardinality explosions, span lifecycle errors (missing defer span.End(), unrecorded errors), and sensitive fields in logs. Use when Go code changes import go.uber.org/zap, log/slog, go.opentelemetry.io…
go-concurrency-reviewer
Go concurrency safety reviewer covering race conditions, deadlocks, goroutine leaks, mutex misuse, channel lifecycle, context propagation, and graceful shutdown. Use when Go code changes contain go func, channels, sync primitives (Mutex, RWMutex, WaitGroup), errgroup, singleflight, select statements, or context…