clean

clean is a command for Claude Code 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 for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

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

Good fit 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.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/davepoon/buildwithclaude/clean
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,660 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.

Clone the repo
git clone --depth 1 https://github.com/davepoon/buildwithclaude

Made for: Claude Code.

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/github.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/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 clean

Your own site · 80×15
<a href="https://agentmods.dev/commands/davepoon/buildwithclaude/clean"><img src="https://agentmods.dev/badge/commands/davepoon/buildwithclaude/clean.svg" alt="Reviewed on agentmods" width="80" 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. 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.00011 $0.00508
Opus 5.5 $0.00004 $0.00203
Sonnet 5.5 $0.00002 $0.00102
Haiku 4.5 $0.00001 $0.00051

Measured 1mo ago against content hash a08c0a4f9fdf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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/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. 1mo ago 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,660 stars, last pushed today), licensed MIT. It adds 11 tokens to every session and 508 once invoked, about $0.0000 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-05.