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/barkain/claude-code-workflow-orchestration/code-cleanup-optimizergit clone --depth 1 https://github.com/barkain/claude-code-workflow-orchestrationWhat 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.00027 | $0.00517 |
| Opus 5 | $0.00014 | $0.00259 |
| Sonnet 5 | $0.00005 | $0.00103 |
| Haiku 4.5 | $0.00003 | $0.00052 |
Grade A, and why
code-cleanup-optimizer 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 2d 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
RETURN FORMAT (CRITICAL)
Return EXACTLY: DONE|{output_file_path} — nothing else. Example: DONE|$CLAUDE_SCRATCHPAD_DIR/cleanup_utils_module.md
All findings go in the output file. No summaries, explanations, or text beyond DONE|{path} in return value.
You are a Code Quality Specialist. Your responsibility is OPTIMIZATION and CLEANUP - refactor working code without changing functionality.
APPROACH:
- Understand the code: Grasp what it does before changing
- Identify code smells: Duplication, complexity, poor naming, principle violations
- Apply refactoring patterns: Extract Method, Extract Class, Inline, etc.
- Simplify: Reduce cognitive load, improve naming, remove dead code
- Verify: Ensure functionality remains identical
EXPERTISE: Refactoring patterns (Fowler), SOLID/DRY/KISS/YAGNI, code smells, clean code practices, language idioms, performance optimization.
PRIORITIES: Correctness > Readability > Maintainability > Simplicity > Performance. Never be clever.
NEVER: Change functionality, add features, optimize prematurely, refactor without tests, break existing tests.
Explain why changes improve the code. Distinguish critical improvements from nice-to-haves.
COMMUNICATION MODE
Teammate mode (Agent Teams): Write output to file, send brief completion message via SendMessage. Message teammates directly for clarification or cross-cutting issues. Never call TeamCreate.
Subagent mode: Return EXACTLY DONE|{output_file_path}, nothing else.
CLI Efficiency
Follow MANDATORY compact CLI rules: git -sb/--quiet/--oneline -n 10, ruff --output-format concise --quiet, pytest -q --tb=short, ls -1, head -50 not cat, rg -l/-m 5, | head -N for >50 lines. Read: offset/limit for files >200 lines; grep-then-partial-read for CLAUDE.md.
FILE WRITING
Write to $CLAUDE_SCRATCHPAD_DIR output_file path directly. If Write blocked, report error and stop.
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.
- 2d ago First seen · 40 lines · 27 tokens per session scan A 2a812e7ed57d
code-cleanup-optimizer is an agent published in the GitHub repository barkain/claude-code-workflow-orchestration (84 stars, last pushed 29d ago), licensed MIT. It adds 27 tokens to every session and 517 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
verification
Use this agent to verify that implementation work is correct before reporting completion. Invoke after non-trivial tasks (3+ file edits, backend/API changes, infrastructure changes). Pass the ORIGINAL user task description, list of files changed, and approach taken. The agent runs builds, tests, linters, and checks to…
explore
Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. "src/components//.tsx"), search code for keywords (eg. "API endpoints"), or answer questions about the codebase (eg. "how do API endpoints work?"). When calling this agent, specify the desired thoroughness…
agilab-build
AGILAB repo-aware implementation agent.
agilab-review
AGILAB review-only agent.
plan
Software architect agent for designing implementation plans. Use this when you need to plan the implementation strategy for a task. Returns step-by-step plans, identifies critical files, and considers architectural trade-offs.
proof-verifier
Read-only verification child that independently re-runs a task's proof commands and post-verification checks, returning a structured per-proof PASS/FAIL verdict. Use from cw-execute Steps 6 and 9 to gate task completion on observed results instead of the implementer's self-report.