clean-code-audit

clean-code-audit is a command for Claude Code from helmedeiros/clean-code-skills. It costs 57 tokens per session (736 once invoked), scanned A, original, MIT.

A broad review of a codebase against common code-quality practices, including TDD, where tests are written around the code's expected behavior.

In plain words
What is it for?
Checking project structure, test coverage and patterns, refactoring opportunities, SOLID design principles, object-oriented code, functional techniques, and architecture.
Why use it?
It brings many kinds of maintainability problems into one report, including missing tests, complex code, design violations, and code smells.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the clean-code-skills plugin — 21 skills, 2 commands shipped together

Good fit Checking project structure, test coverage and patterns, refactoring opportunities, SOLID design principles, object-oriented code, functional techniques, and architecture.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/helmedeiros/clean-code-skills/clean-code-audit
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/helmedeiros/clean-code-skills

Made for: Claude Code.

Or install clean-code-skills, the plugin that ships this one along with the rest of its 21 skills, 2 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-code-audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/helmedeiros/clean-code-skills/clean-code-audit/github.svg)](https://agentmods.dev/commands/helmedeiros/clean-code-skills/clean-code-audit)
Your own site
<a href="https://agentmods.dev/commands/helmedeiros/clean-code-skills/clean-code-audit"><img src="https://agentmods.dev/badge/commands/helmedeiros/clean-code-skills/clean-code-audit/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-code-audit

Your own site · 80×15
<a href="https://agentmods.dev/commands/helmedeiros/clean-code-skills/clean-code-audit"><img src="https://agentmods.dev/badge/commands/helmedeiros/clean-code-skills/clean-code-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 736 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.00057 $0.00736
Opus 5.5 $0.00023 $0.00294
Sonnet 5.5 $0.00011 $0.00147
Haiku 4.5 $0.00006 $0.00074

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

Security

Grade A, and why

clean-code-audit 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 3mo 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.

commands/clean-code-audit.md · 104 lines

How it starts

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

Clean Code Audit

Perform a comprehensive code quality audit on the current project. Evaluate the codebase against all 20 clean code skills and produce a structured report.

Audit Process

Step 1: Scan the Codebase

Identify the primary language(s), framework(s), and project structure. Focus on source files, excluding vendored dependencies and generated code.

Step 2: TDD Assessment

  • Check for test files and test coverage patterns.
  • Evaluate whether tests follow the Arrange-Act-Assert pattern.
  • Look for test-first indicators (test files matching source files, comprehensive edge case coverage).
  • Flag untested public methods or classes.

Step 3: Refactoring Opportunities

  • Identify long methods that should be extracted (more than 20 lines of logic).
  • Flag poorly named variables, methods, or classes.
  • Detect complex conditionals (nested if/else, switch statements with shared logic) that could use polymorphism.

Step 4: SOLID Compliance

  • SRP: Flag classes with multiple reasons to change (mixed concerns).
  • OCP: Look for modification-heavy code that should use extension points.
  • LSP: Check inheritance hierarchies for contract violations.
  • ISP: Find large interfaces that force clients to depend on unused methods.
  • DIP: Identify high-level modules directly depending on low-level implementations.

Step 5: OOP Review

  • Check for data classes with no behavior (anemic domain models).
  • Flag exposed internal state (public fields, getter/setter pairs without invariants).
  • Identify deep inheritance hierarchies that should use composition.

Step 6: Functional Programming Opportunities

  • Spot impure functions with hidden side effects.
  • Identify loops that could be replaced with map/filter/reduce.
  • Find null-based error handling that could use Result/Either/Option patterns.

Step 7: Architecture Assessment

  • Evaluate dependency direction (do domain modules depend on infrastructure?).
  • Check for port/adapter separation at system boundaries.
  • Flag domain logic mixed with I/O, serialization, or framework code.

Read the full file on GitHub · 104 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. 3mo ago First seen · 104 lines · 57 tokens per session scan A 21112d1c918d

Subscribe to this mod's changes

clean-code-audit is a command published in the GitHub repository helmedeiros/clean-code-skills (3 stars, last pushed 9mo ago), licensed MIT. It adds 57 tokens to every session and 736 once invoked, about $0.0002 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-08-31.

Related

clean-code-audit compared with commands from other repositories

clean-code-audit next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
clean-code-audithelmedeiros/clean-code-skillsCommand39mo agoMITA57Claude Code
review-packandyzengmath/solitonCommand15mo agoMITA40Claude Code
dc-reviewtaipt1504/agent-skillsCommand56mo agononeA52Claude Code
metataipt1504/agent-skillsCommand56mo agononeA36Claude Code
verifytaipt1504/agent-skillsCommand56mo agononeA28Claude Code
initazrtydxb/procoderCommand21222d agoApache-2.0A16Claude Code
gitazrtydxb/procoderCommand21222d agoApache-2.0A20Claude Code