clean

clean is a command for coding agents from davepoon/buildwithclaude. It costs 11 tokens per session (508 once invoked), scanned A, original, MIT.

A command that finds and fixes linting, formatting, and static-analysis problems across a codebase. Linters check code for likely mistakes or style violations, while formatters make its layout consistent.

In plain words
What is it for?
Use it to clean Python, JavaScript or TypeScript, Go, Rust, Java, or Ruby projects, including formatting, import sorting, lint fixes, and type checking where supported.
Why use it?
It removes repetitive cleanup work and helps bring files into line with the project's language tools and scripts. It first looks for the languages and project-specific commands before choosing tools.

Command

Part of the all-commands plugin — 23 commands shipped together

About the project

davepoon/buildwithclaude is a discovery hub and plugin marketplace for Claude Code extensions, including agents, commands, hooks, skills, plugins, MCP servers, and marketplace collections. Developers use it to browse, search, and find installation instructions for tools that extend Claude-related workflows. Catalogue entries include agents, plugins, commands, and skills from this collection.

davepoon/buildwithclaude · 3,415 stars · on GitHub · buildwithclaude.com

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.

agentmods
npx agentmods add commands/davepoon/buildwithclaude/clean
Clone the repo
git clone --depth 1 https://github.com/davepoon/buildwithclaude

Or install all-commands, the plugin that ships this one along with the rest of its 23 commands.

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 clean

README.md
[![agentmods](https://agentmods.dev/badge/commands/davepoon/buildwithclaude/clean.svg)](https://agentmods.dev/commands/davepoon/buildwithclaude/clean)
Your own site
<a href="https://agentmods.dev/commands/davepoon/buildwithclaude/clean"><img src="https://agentmods.dev/badge/commands/davepoon/buildwithclaude/clean.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 508 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00011 $0.00508
Opus 5 $0.00005 $0.00254
Sonnet 5 $0.00002 $0.00102
Haiku 4.5 $0.00001 $0.00051

Measured today against content hash a08c0a4f9fdf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

clean 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 today.

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/all-commands/commands/clean.md · 62 lines

What it actually says

Fix all linting, formatting, and static analysis issues in the entire codebase.

Process:

  1. Detect Project Language(s):

    • Check file extensions and configuration files
    • Common indicators:
      • Python: .py files, requirements.txt, pyproject.toml
      • JavaScript/TypeScript: .js/.ts files, package.json
      • Go: .go files, go.mod
      • Rust: .rs files, Cargo.toml
      • Java: .java files, pom.xml
      • Ruby: .rb files, Gemfile
  2. Run Language-Specific Linters:

    Python:

    • Formatting: black . or autopep8
    • Import sorting: isort .
    • Linting: flake8 or pylint
    • Type checking: mypy

    JavaScript/TypeScript:

    • Linting: eslint . --fix
    • Formatting: prettier --write .
    • Type checking: tsc --noEmit

    Go:

    • Formatting: go fmt ./...
    • Linting: golangci-lint run --fix

    Rust:

    • Formatting: cargo fmt
    • Linting: cargo clippy --fix

    Java:

    • Formatting: google-java-format or spotless
    • Linting: checkstyle or spotbugs

    Ruby:

    • Linting/Formatting: rubocop -a
  3. Check for Project Scripts:

    • Look for lint/format scripts in package.json, Makefile, etc.
    • Common script names: lint, format, fix, clean
  4. Fix Issues:

    • Apply auto-fixes where available
    • Manually fix issues that can't be auto-fixed
    • Re-run linters to verify all issues are resolved
  5. Verify Clean State:

    • Run all linters again without fix flags
    • Ensure no errors or warnings remain

Fix all issues found until the codebase passes all linting and formatting checks.

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. today First seen · 62 lines · 11 tokens per session scan A a08c0a4f9fdf

Subscribe to this mod's changes

clean is a command published in the GitHub repository davepoon/buildwithclaude (3,415 stars, last pushed yesterday), licensed MIT. It adds 11 tokens to every session and 508 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-09-05.