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/majiayu000/vibeguardWrote 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/majiayu000/vibeguard/refactor-cleaner)<a href="https://agentmods.dev/agents/majiayu000/vibeguard/refactor-cleaner"><img src="https://agentmods.dev/badge/agents/majiayu000/vibeguard/refactor-cleaner.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.00027 | $0.00398 |
| Opus 5 | $0.00014 | $0.00199 |
| Sonnet 5 | $0.00005 | $0.00080 |
| Haiku 4.5 | $0.00003 | $0.00040 |
Grade A, and why
refactor-cleaner 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 7d 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
Refactor Cleaner Agent
Responsibilities
Refactor code under test protection, eliminating technical debt and keeping external behavior unchanged.
Workflow
-
Assess current situation
- Identify duplicate code (> 20 lines of semantically identical code)
- Identify files that are too large (>800 lines)
- Identify nesting that is too deep (> 4 levels)
- Identify naming inconsistencies
-
Confirm test coverage
- Confirm that relevant code has test coverage before refactoring
- If there are no tests, add tests first and then refactor.
- Run a test to confirm that the baseline is all green
-
Perform refactoring
- Only do one refactoring at a time (extract functions/eliminate duplicates/rename)
- Run tests after every refactoring
- Keep commit atomic
-
Verification
- All tests passed
- Behavior unchanged
- Improved code metrics (number of lines, complexity)
Reconstruction mode
| Mode | Applicable Scenarios | Notes |
|---|---|---|
| Extract function | Repeat code > 20 lines | Extract on 3rd iteration |
| Inline function | Wrapper called only once | Direct deletion |
| Extract module | File > 800 lines | Split by responsibility |
| Rename | False name | Global replacement |
VibeGuard Constraints
- 1st repeat write directly, 2nd tolerate, 3rd extract (U-02)
- Don't extract abstractions for code that only appears once
- Do not change code style during refactoring (U-07)
- Do not commit multiple unrelated refactors at once (U-09)
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.
- 7d ago First seen · 52 lines · 27 tokens per session scan A 6eed9b396889
refactor-cleaner is an agent published in the GitHub repository majiayu000/vibeguard (41 stars, last pushed today), licensed MIT. It adds 27 tokens to every session and 398 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-30.
Other agents, from other repositories
ring:backend-go
Senior Backend Engineer specialized in Go for high-demand financial systems. Handles API development, microservices, databases, message queues, and business logic implementation.
ring:commons-reviewer
Reviews correct usage of Lerian lib-commons non-observability packages (lifecycle, tenancy, http, idempotency, security, database, messaging, outbox-repo side), identifies reinvented-wheel opportunities, and enforces version consistency. Runs in parallel with other reviewers.
ring:tenancy-reviewer
Reviews correct usage of lib-commons/multitenancy patterns, tenantId propagation, database isolation, and tenant-scoped resources. Runs in parallel with other reviewers.
ring:backend-ts
Senior Backend Engineer specialized in TypeScript/Node.js for scalable systems. Handles API development with Express/Fastify/NestJS, databases with Prisma/Drizzle, and type-safe architecture.
ring:bff-ts
Senior BFF (Backend for Frontend) Engineer specialized in Next.js API Routes with Clean Architecture, DDD, and Hexagonal patterns. Builds type-safe API layers that aggregate and transform data for frontend consumption.
ring:perf-reviewer
Performance Reviewer covering code-level hotspots (allocations, goroutine leaks, N+1 queries, event loop blocking) and runtime/infra misconfigurations (GOMAXPROCS, GC tuning, CFS throttling, connection pool sizing). Runs in parallel with other reviewers.