cleanup

cleanup is a command for Claude Code from Marcel-Bich/marcel-bich-claude-marketplace. It costs 18 tokens per session (1,850 once invoked), scanned A, original, MIT.

A command for finding and fixing code patterns that make AI or agent involvement visible. It first checks the repository for project-specific rules about these patterns.

In plain words
What is it for?
Checking files for items such as unwanted typography, phrases, emojis, or other AI-related traces, then applying the applicable cleanup rules.
Why use it?
It helps bring generated or edited code back in line with the repository's writing and formatting conventions.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the dogma plugin — 9 commands, 1 agent shipped together

Good fit Checking files for items such as unwanted typography, phrases, emojis, or other AI-related traces, then applying the applicable cleanup rules.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/marcel-bich/marcel-bich-claude-marketplace/cleanup
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/Marcel-Bich/marcel-bich-claude-marketplace

Made for: Claude Code.

Or install dogma, the plugin that ships this one along with the rest of its 9 commands, 1 agent.

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 cleanup

README.md
[![agentmods](https://agentmods.dev/badge/commands/marcel-bich/marcel-bich-claude-marketplace/cleanup/github.svg)](https://agentmods.dev/commands/marcel-bich/marcel-bich-claude-marketplace/cleanup)
Your own site
<a href="https://agentmods.dev/commands/marcel-bich/marcel-bich-claude-marketplace/cleanup"><img src="https://agentmods.dev/badge/commands/marcel-bich/marcel-bich-claude-marketplace/cleanup/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 cleanup

Your own site · 80×15
<a href="https://agentmods.dev/commands/marcel-bich/marcel-bich-claude-marketplace/cleanup"><img src="https://agentmods.dev/badge/commands/marcel-bich/marcel-bich-claude-marketplace/cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,850 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.00018 $0.01850
Opus 5 $0.00009 $0.00925
Sonnet 5 $0.00004 $0.00370
Haiku 4.5 $0.00002 $0.00185

Measured 11d ago against content hash 00ea1c1c37fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

cleanup 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 11d 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/dogma/commands/cleanup.md · 257 lines

How it starts

The opening of the file, as written. The whole thing — 257 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Claude-Dogma: Cleanup AI Traces

You are executing the /dogma:cleanup command. Your task is to find and fix AI-typical patterns in the codebase that reveal AI/agent usage.

Step 1: Load Rules

Check for Dogma Rules First

Look for AI trace rules in this order:

  1. GUIDES/ai-traces.md - Dedicated AI traces documentation
  2. CLAUDE/CLAUDE.git.md - Check for <ai_traces> section
  3. CLAUDE.git.md - Check for <ai_traces> section
  4. .claude/CLAUDE.git.md - Check for <ai_traces> section

If found, extract the rules:

Found AI trace rules in GUIDES/ai-traces.md:
- Typography: Use straight quotes " (U+0022), normal dashes - (U+002D), three dots (...)
- Avoid: Curly quotes (U+201C/U+201D), em-dashes (U+2014), smart apostrophes (U+2018/U+2019), ellipsis (U+2026)
- Phrases: Avoid "Let me...", "Sure!", etc.
- Emojis: Never in code comments or logs

Fallback: Default Rules

If no Dogma rules found, use these defaults:

DEFAULT_RULES:

Typography:
- Curly quotes: " (U+201C) and " (U+201D) -> straight quotes " (U+0022)
- Em-dash: -- (U+2014) and en-dash -- (U+2013) -> normal dash - (U+002D)
- Ellipsis: ... (U+2026) -> three dots ...
- Smart apostrophes: ' (U+2018), ' (U+2019), ‚ (U+201A) -> straight ' (U+0027)

Emojis in Code:
- Remove emojis from: comments, variable names, log messages
- Keep emojis in: UI strings, user-facing output

Phrases (in comments/docs):
- "Let me..." -> remove or rephrase
- "I'll..." -> remove or rephrase
- "Sure!" -> remove
- "Certainly!" -> remove
- "Great question!" -> remove

German Umlauts (optional, ask user):
- In strings: ae->ä, oe->ö, ue->ü, ss->ß (where appropriate)
- In code identifiers: keep ASCII (ae, oe, ue, ss)

Step 2: Determine Scan Path

The user provided: $ARGUMENTS

  • If empty: scan current directory
  • If path provided: scan that path
SCAN_PATH="${1:-.}"

Step 3: Find Files to Scan

Exclude common non-code directories:

# Find source files, excluding:
# - node_modules, .git, dist, build, vendor, __pycache__
# - Binary files, images, etc.

EXCLUDE_DIRS="node_modules|\.git|dist|build|vendor|__pycache__|\.next|coverage"
INCLUDE_EXTENSIONS="js|ts|jsx|tsx|py|rb|go|java|php|md|txt|json|yaml|yml|sh|bash"

Read the full file on GitHub · 257 lines

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. 11d ago First seen · 257 lines · 18 tokens per session scan A 00ea1c1c37fc

Subscribe to this mod's changes

cleanup is a command published in the GitHub repository Marcel-Bich/marcel-bich-claude-marketplace (13 stars, last pushed 2d ago), licensed MIT. It adds 18 tokens to every session and 1,850 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.