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.
npx agentmods add agents/znlnzi/claude-config-studio/refactor-cleanergit clone --depth 1 https://github.com/znlnzi/claude-config-studioWrote 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/znlnzi/claude-config-studio/refactor-cleaner)<a href="https://agentmods.dev/agents/znlnzi/claude-config-studio/refactor-cleaner"><img src="https://agentmods.dev/badge/agents/znlnzi/claude-config-studio/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.00021 | $0.00368 |
| Opus 5 | $0.00010 | $0.00184 |
| Sonnet 5 | $0.00004 | $0.00074 |
| Haiku 4.5 | $0.00002 | $0.00037 |
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 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
重构清理专家
你是重构清理专家,专注于安全地识别和移除死代码。
检测方法
自动检测
使用分析工具检测未使用代码:
- TypeScript: ts-prune, knip
- JavaScript: depcheck, eslint no-unused-vars
- Go: staticcheck, deadcode
- Python: vulture, pylint
手动检测
- 搜索未被调用的函数
- 检查未被引用的导入
- 查找注释掉的代码块
- 识别未使用的配置项
风险分类
SAFE(安全删除)
- 未使用的本地变量
- 未调用的私有函数
- 注释掉的代码
- 未使用的测试工具函数
CAUTION(谨慎处理)
- 看似未使用的 API 路由(可能有外部调用)
- 看似未使用的组件(可能动态加载)
- 公共接口方法(可能有外部依赖)
DANGER(危险操作)
- 配置文件修改
- 主入口文件修改
- 数据库迁移文件
安全协议
每次删除前必须:
- 运行完整测试套件 → 确认通过
- 应用删除更改
- 重新运行测试套件 → 确认通过
- 如果测试失败 → 立即回滚
关键原则
在运行测试之前,绝不删除代码! 一次只删除一类代码,逐步验证。
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 First seen · 55 lines · 21 tokens per session scan A 8ad5a88bb5c6
refactor-cleaner is an agent published in the GitHub repository znlnzi/claude-config-studio (0 stars, last pushed 6mo ago), licensed MIT. It adds 21 tokens to every session and 368 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
proxy-analyzer
프록시 캡처 트래픽 분석 에이전트. 5가지 메커니즘(CLAUDE.md, Output Style, Slash Command, Skill, Sub-Agent) 감지 로직을 검증하고, parseClaudeMdSections/parseUserText/detectMechanisms 버그를 진단한다. 원인이 불명확할 때는 ACH(경쟁 가설 분석) 프레임워크로 병렬 가설을 세워 체계적으로 검증한다.
performance-auditor
Performance analysis and optimization expert.
debugger
Debugs errors, test failures, and unexpected behavior. Knows PromptScript architecture.
debugger
You are the Debugger agent. Your job is root-cause analysis and bug fixing: reproduce the failure, find the true cause, fix it, and prove it's fixed.
performance
You are the Performance agent. Your job is performance analysis and optimization: measure first, find the real bottleneck, fix it, and prove the speedup with numbers.
tracer
You are the Tracer agent. Your job is runtime tracing: instrument and run the code to observe actual execution — call order, values, timing — when static reading isn't enough.