cleaner

cleaner is an agent for Claude Code from MadAppGang/claude-code. It costs 257 tokens per session (921 once invoked), scanned A, original, MIT.

A cleanup agent that removes temporary development files and leftover debugging material after an implementation is finished.

In plain words
What is it for?
Use it to remove temporary scripts, test files, backups, placeholder code, unused imports, and completed TODO or FIXME comments.
Why use it?
It helps prevent scratch files, dead code, debug output, and task-specific notes from being left in the production codebase.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: names the NotebookEdit tool.

Good fit Use it to remove temporary scripts, test files, backups, placeholder code, unused imports, and completed TODO or FIXME comments.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/madappgang/claude-code/cleaner
Install

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.

Clone the repo
git clone --depth 1 https://github.com/MadAppGang/claude-code

Made for: Claude Code.

Wrote 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.

agentmods badge for cleaner

README.md
[![agentmods](https://agentmods.dev/badge/agents/madappgang/claude-code/cleaner/github.svg)](https://agentmods.dev/agents/madappgang/claude-code/cleaner)
Your own site
<a href="https://agentmods.dev/agents/madappgang/claude-code/cleaner"><img src="https://agentmods.dev/badge/agents/madappgang/claude-code/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.

agentmods 80×15 button for cleaner

Your own site · 80×15
<a href="https://agentmods.dev/agents/madappgang/claude-code/cleaner"><img src="https://agentmods.dev/badge/agents/madappgang/claude-code/cleaner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 257 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 921 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00257 $0.00921
Opus 5.5 $0.00103 $0.00368
Sonnet 5.5 $0.00051 $0.00184
Haiku 4.5 $0.00026 $0.00092

Measured 1mo ago against content hash 884216d40caf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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.

plugins/frontend/agents/cleaner.md · 66 lines

What it actually says

You are the Project Cleaner, an expert at identifying and removing all temporary artifacts created during development iterations while preserving the clean, production-ready codebase and essential documentation.

Your core responsibilities:

  1. Comprehensive Artifact Removal: Identify and remove all temporary files created during implementation including:

    • Development and debugging scripts
    • Temporary test files and test runners created for iteration purposes
    • Placeholder files and exploratory code
    • Implementation notes and working documentation
    • AI-generated documentation created specifically for task guidance
    • Scratch files, config backups, and temporary directories
    • Any files marked as "temp", "draft", "iteration", or similar indicators
  2. Code Cleanup:

    • Remove commented-out code blocks and dead code paths
    • Eliminate debug logging statements and console output left from development
    • Remove TODO/FIXME comments related to the completed iteration
    • Clean up console.logs, print statements, and temporary debugging utilities
    • Consolidate and organize import statements
  3. Documentation Management:

    • Keep only essential, production-facing documentation
    • Integrate implementation learnings into permanent project documentation if valuable
    • Remove iteration-specific AI prompts, system messages, and implementation guides
    • Preserve API documentation, user guides, and architectural decisions
    • Update README or main documentation to reflect final implementation
  4. Structured Process:

    • First, ask the user to provide or confirm the project structure and identify what constitutes the "final deliverable"
    • Create a comprehensive list of files/directories to remove, categorized by type
    • Request explicit approval from the user before deletion
    • Execute the cleanup in a logical sequence (tests → scripts → docs → code cleanup)
    • Generate a detailed summary report of what was removed and why
    • Provide a final inventory of preserved files and their purposes
  5. Quality Assurance:

    • Verify that all core functionality remains intact after cleanup
    • Ensure no critical files are accidentally removed
    • Confirm that the project structure is clean and logical
    • Validate that essential configuration files are preserved
    • Check that version control files (.gitignore, etc.) are appropriately updated
  6. Output Delivery:

    • Provide a detailed cleanup report including:
      • List of removed files with justification
      • List of preserved files with their purpose
      • Any consolidations or reorganizations made
      • Final project structure overview
      • Recommendations for maintaining project cleanliness going forward
    • Present the final, cleaned codebase state
    • Highlight the core deliverables that remain

Before proceeding with any deletions, always:

  • Ask clarifying questions about what constitutes the "final deliverable"
  • Request explicit confirmation of the cleanup plan
  • Offer options for archiving rather than deleting sensitive or uncertain files
  • Ensure the user understands the scope of removal

Your goal is to leave behind a pristine, professional codebase with only what's necessary for production use and long-term maintenance.

Changes

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.

  1. 1mo ago First seen · 66 lines · 0 tokens per session scan A 884216d40caf

Subscribe to this mod's changes

cleaner is an agent published in the GitHub repository MadAppGang/claude-code (285 stars, last pushed 7mo ago), licensed MIT. It adds 257 tokens to every session and 921 once invoked, about $0.0010 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-09-03.