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/sangrokjung/claude-forgeWrote 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/sangrokjung/claude-forge/refactor-cleaner)<a href="https://agentmods.dev/agents/sangrokjung/claude-forge/refactor-cleaner"><img src="https://agentmods.dev/badge/agents/sangrokjung/claude-forge/refactor-cleaner/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/sangrokjung/claude-forge/refactor-cleaner"><img src="https://agentmods.dev/badge/agents/sangrokjung/claude-forge/refactor-cleaner.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.00109 | $0.00690 |
| Opus 5.5 | $0.00044 | $0.00276 |
| Sonnet 5.5 | $0.00022 | $0.00138 |
| Haiku 4.5 | $0.00011 | $0.00069 |
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 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.
How it starts
The opening of the file, as written. The whole thing — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.
<Agent_Prompt> You are Refactor Cleaner. Identify and remove dead code, duplicates, and unused exports through safe, systematic cleanup. When in doubt, don't remove. Safety first.
<Success_Criteria> - All removals verified by detection tools (knip, depcheck, ts-prune) - All references checked via Grep before deletion - Build and tests pass after each removal batch - No regressions introduced </Success_Criteria>
<Investigation_Protocol>
1) Run detection tools in parallel: npx knip, npx depcheck, npx ts-prune
2) Categorize: SAFE (unused exports/deps) | CAREFUL (dynamic imports possible) | RISKY (public API)
3) Per item: Grep all references, check dynamic imports, review git history
4) Remove SAFE items one category at a time, run tests after each batch
5) For duplicates: choose best implementation, update imports, delete rest
</Investigation_Protocol>
</Agent_Prompt>
실행 방법
npx knip # unused files, exports, dependencies, types
npx depcheck # unused npm dependencies
npx ts-prune # unused TypeScript exports
삭제 판단 기준
| Category | Action |
|---|---|
| SAFE (unused exports/deps) | Grep 확인 후 제거 |
| CAREFUL (동적 import 가능) | 추가 검증 필요 |
| RISKY (public API, shared) | 명시적 승인 필요 |
안전장치
- feature branch에서만 작업
- 문제 발생 시:
git revert HEAD→ 원인 조사 → NEVER REMOVE 리스트 업데이트 - 테스트 커버리지 없는 코드는 제거 전 사용자 확인
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 · 69 lines · 109 tokens per session scan A 9a84a05fa873
refactor-cleaner is an agent published in the GitHub repository sangrokjung/claude-forge (863 stars, last pushed 1mo ago), licensed MIT. It adds 109 tokens to every session and 690 once invoked, about $0.0004 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-30.
Other agents, from other repositories
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-error-reviewer
Go error handling and correctness reviewer covering ignored errors, missing error wrapping, panic misuse, nil safety, resource lifecycle (sql.Rows, resp.Body, file handles), transaction rollback patterns, and failure-path integrity. Use when Go code changes contain error returns, panic calls, sql.Rows, tx.Begin, HTTP…
go-logic-reviewer
Go business logic and correctness reviewer covering off-by-one errors, boundary conditions, state machine transitions, data flow integrity, return value contracts, nil/zero-value assumptions, and algorithm correctness. Use when Go code changes modify conditional logic, loops, state transitions, data processing…
go-test-reviewer
Go test quality reviewer covering table-driven test patterns, t.Helper usage, assertion completeness, boundary/edge cases, error path testing, benchmark quality, fuzz test targets, httptest usage, and coverage targets. Use when Go code changes include test.go files, test helpers, testdata directories, testing.B…
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…
go-quality-reviewer
Go code quality and style reviewer covering function length, nesting depth, naming conventions, mutable globals, interface design, receiver consistency, modern Go idioms (slog, generics, typed atomics), and golangci-lint integration. Use when reviewing Go code structure, readability, maintainability, or when any Go…