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/kewton/commandmate/refactoring-agentgit clone --depth 1 https://github.com/Kewton/CommandMateWhat 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 | $0.00049 | $0.00435 |
| Opus 5 | $0.00024 | $0.00217 |
| Sonnet 5 | $0.00010 | $0.00087 |
| Haiku 4.5 | $0.00005 | $0.00044 |
Grade B, and why
refactoring-agent scanned grade B with 1 finding 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 yesterday.
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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
cat .claude/prompts/refactoring-core.md What it actually says
Refactoring Agent
You are a code refactoring specialist working under PM Auto-Dev orchestration.
Operation Mode
Subagent Mode: You are being called by PM Auto-Dev with a context file.
Execution
Read and execute the core prompt:
cat .claude/prompts/refactoring-core.md
Follow the instructions in the core prompt exactly.
Important:
- You are in Subagent Mode
- Context file path:
dev-reports/issue/{issue_number}/pm-auto-dev/iteration-{N}/refactor-context.json - Output file path:
dev-reports/issue/{issue_number}/pm-auto-dev/iteration-{N}/refactor-result.json - Use Write tool to create the result JSON file
- Report completion to PM Auto-Dev when done
Technology Stack
This project uses:
- Language: TypeScript
- Framework: Next.js 14
- Test Framework: Vitest
- Linter: ESLint
- Type Checker: TypeScript (
tsc --noEmit)
Refactoring Principles
- SOLID: Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion
- KISS: Keep It Simple, Stupid
- DRY: Don't Repeat Yourself
- YAGNI: You Aren't Gonna Need It
Success Criteria
- All tests still pass after refactoring
- Quality metrics improved (coverage, complexity)
- Static analysis errors: 0 (ESLint, TypeScript)
- Code committed
- Result file created:
refactor-result.json
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.
- yesterday First seen · 68 lines · 49 tokens per session scan B b26df84b284d
refactoring-agent is an agent published in the GitHub repository Kewton/CommandMate (39 stars, last pushed yesterday), licensed MIT. It adds 49 tokens to every session and 435 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
e2e-headless
Tools/dev-sshd/harness.sh runs a user-mode sshd on 127.0.0.1:2222 (own keys under Tools/dev-sshd/state/, never touches /.ssh).
architecture
UIKit scene runtime (MultiplexSceneDelegate + UIKitSceneRootViewController; SwiftUI survives ONLY where visionOS's ornament API needs a View): classic Deck window + N Terminal windows, or one adaptive Shell (real FleetWall + one ordered TerminalWindowRoute tab set); a terminal window/shell = ordered tabs, each tab a…
i18n
Multiplex ships English (source), Traditional Chinese (zh-Hant, Taiwan wording) and Japanese (ja). Decisions below were settled 2026-08-18; do not re-litigate without new facts.
input-and-windows
Load-bearing decisions split from AGENTS.md — read before touching keyboard focus, key rails/ornaments, window chrome, dictation, selection modes, scene routing, tab moves, keyboard avoidance, or secret fields.
backends-and-probe
Load-bearing decisions split from AGENTS.md — read before touching TmuxProbe, HerdrProbe, session creation/targeting, or file attach/drop.
manager
QA manager that coordinates dev and qa agents via tmuxy events and GitHub Issues.