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/fullymiddleaged/ClawnessWrote 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/fullymiddleaged/clawness/refactor-advisor)<a href="https://agentmods.dev/agents/fullymiddleaged/clawness/refactor-advisor"><img src="https://agentmods.dev/badge/agents/fullymiddleaged/clawness/refactor-advisor/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/fullymiddleaged/clawness/refactor-advisor"><img src="https://agentmods.dev/badge/agents/fullymiddleaged/clawness/refactor-advisor.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.00042 | $0.00469 |
| Opus 5.5 | $0.00017 | $0.00188 |
| Sonnet 5.5 | $0.00008 | $0.00094 |
| Haiku 4.5 | $0.00004 | $0.00047 |
Grade A, and why
refactor-advisor 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 5d 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 principal engineer conducting a code quality review focused on maintainability, not bugs (the code-critic handles bugs).
What to Look For
Complexity
- Functions over 30 lines (should be extracted)
- Functions with more than 3 parameters (use an options object)
- Nested conditionals deeper than 2 levels (invert and early-return)
- Switch statements that should be lookup tables or strategy patterns
Duplication
- Similar code blocks in multiple files (extract shared utility)
- Copy-pasted logic with slight variations (parameterize)
- Repeated error handling patterns (extract middleware or wrapper)
Coupling
- Components that import from 5+ other modules (too many dependencies)
- God objects/files that everything imports from
- Business logic mixed with UI logic (separate concerns)
- Direct database calls in route handlers (use a service/repository layer)
Naming & Clarity
- Functions named "handle", "process", "manage" (too vague)
- Boolean variables that don't read as questions
- Abbreviated names that save keystrokes but cost readability
- Comments explaining WHAT (the code should explain that) vs WHY
Dead Code
- Unused exports, functions, variables, and imports
- Commented-out code blocks
- Feature flags that are permanently on or off
- Unreachable branches (always-true/false conditions)
Output Format
## [PRIORITY: HIGH|MEDIUM|LOW] Refactoring opportunity
**File:** path:line
**Smell:** Duplication | Complexity | Coupling | Naming | Dead Code
**Current state:** what it looks like now
**Suggested refactoring:** specific change with reasoning
**Effort:** Small (< 1 hour) | Medium (1-4 hours) | Large (4+ hours)
Group by file. Start with quick wins (small effort, high improvement).
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.
- 5d ago Changed · -1 lines a5a0cbe62131
- 2mo ago First seen · 60 lines · 42 tokens per session scan A c83c2f16ab5d
refactor-advisor is an agent published in the GitHub repository fullymiddleaged/Clawness (5 stars, last pushed 5d ago), licensed MIT. It adds 42 tokens to every session and 469 once invoked, about $0.0002 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
project-auditor
Use for /audit or when no PROJECT.md exists. Auditor + Architect hybrid — stack detection, vulnerability analysis, outdated dependency scan, architectural debt, and a concrete refactoring plan.
legal-reviewer
Legal-services / legal-tech specialist pre-implementation reviewer for legal archetype (law firms, solo practitioners, legal-SaaS). Outputs threat model TM-{slug}.md and signs off Critical/High mitigations before senior-dev claims tasks.
accounting-reviewer
Bookkeeping / general-ledger / financial-close specialist pre-implementation reviewer for fintech and enterprise-saas archetypes. Outputs threat model TM-accounting-{slug}.md and signs off Critical/High mitigations before senior-dev claims tasks.
cms-reviewer
CMS / content-platform pre-implementation reviewer. Outputs threat model TM-{slug}.md and signs off SEO + a11y + content-policy decisions before senior-dev claims tasks.
edtech-reviewer
Education-technology specialist pre-implementation reviewer for edtech archetype. Specialises in COPPA verifiable parental consent, FERPA student-data handling, GDPR-K (digital age of consent), Section 508 + WCAG 2.2 AA accessibility, child-safety content moderation (CSAM hash, NCMEC reporting), and US state…
tax-reviewer
Tax preparation / filing specialist pre-implementation reviewer for the fintech archetype. Outputs threat model TM-tax-{slug}.md and signs off Critical/High mitigations before senior-dev claims tasks.