cli-audit-code

cli-audit-code is a skill for Claude Code from Destynova2/cli-code-skills. It costs 92 tokens per session (2,364 once invoked), scanned A, original, MIT.

A code-review workflow that scores code quality across 12 areas, such as naming, complexity, module design, errors, security, tests, and architecture. It also identifies named code problems, often called anti-patterns or code smells.

In plain words
What is it for?
Reviewing code quality, checking for maintainable design, finding repeated or overly complex code, examining error and security handling, and assessing tests and architecture.
Why use it?
It turns a broad code-quality review into evidence-backed findings tied to specific file and line locations. It also accounts for the project's programming language and records good practices as well as problems.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: agent in frontmatter.

Part of the cli-code-skills plugin — 36 skills shipped together

Good fit Reviewing code quality, checking for maintainable design, finding repeated or overly complex code, examining error and security handling, and assessing tests and architecture.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/destynova2/cli-code-skills/cli-audit-code
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.

Any agent
npx skills add Destynova2/cli-code-skills --skill cli-audit-code
Clone the repo
git clone --depth 1 https://github.com/Destynova2/cli-code-skills

Made for: Claude Code.

Or install cli-code-skills, the plugin that ships this one along with the rest of its 36 skills.

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 cli-audit-code

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/destynova2/cli-code-skills/cli-audit-code"><img src="https://agentmods.dev/badge/skills/destynova2/cli-code-skills/cli-audit-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,364 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.00092 $0.02364
Opus 5.5 $0.00037 $0.00946
Sonnet 5.5 $0.00018 $0.00473
Haiku 4.5 $0.00009 $0.00236

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

Security

Grade A, and why

cli-audit-code 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.

cli-audit-code/SKILL.md · 170 lines

How it starts

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

Optimization: This skill uses on-demand loading. Heavy content lives in references/ and is loaded only when needed.

Language rule: Skill instructions are written in English. When generating user-facing output, detect the project's primary language (from README, comments, docs, commit messages) and produce the report in that language. If the project is bilingual, ask the user which language to use before proceeding.

Audit Code — Code Quality Index (CQI)

"Complexity is the single greatest enemy of reliability." — John Ousterhout

Core Principles

  1. Evidence-based — every finding needs a file:line reference. No vague "the code could be better"
  2. Proportional — a 200-line function matters more than a missing doc comment. Scale to project type
  3. Language-aware — detect the project language and apply its idiomatic patterns, not Java/C# defaults
  4. Named anti-patterns — use Fowler/Mantyla taxonomy names (Feature Envy, Shotgun Surgery) in findings
  5. Positive reinforcement — always highlight good practices found, not just violations
  6. Gotchas — read ../gotchas.md before producing output to avoid known mistakes

Input

$ARGUMENTS is the target to audit (file path, directory, or empty for whole src/).

  • If a specific file: audit that file deeply
  • If a directory: audit all source files in it
  • If empty: audit src/ broadly (sample 15-20 key files)

12-Dimension Framework

Score each dimension 0.0-1.0, then compute a weighted CQI. Read references/categories.md for detailed check lists per category.

# Category Weight Key question
C1 Naming & Readability 8% Do names reveal intent? No magic numbers?
C2 Functions & Cognitive Complexity 12% < 30 lines? Cognitive complexity < 15?
C3 Module Design (deep vs shallow) 10% Deep modules? No pass-through layers?
C4 DRY & Change Amplification 8% One change = one file? No copy-paste?
C5 Error Handling & Robustness 10% Errors propagated? No swallowed errors?
C6 Type Safety & Language Idioms 8% Type system leveraged? Idiomatic patterns?
C7 Comments & Public API Docs 5% Public API documented? No redundant comments?
C8 Test Quality 12% Error paths tested? No flaky tests?
C9 Security & Input Validation 10% Inputs validated at boundaries? No hardcoded secrets?
C10 Immutability & State Management 7% Minimal mutable state? No global mutables?
C11 Cognitive Load & Control Flow 5% < 3 nesting levels? No negative conditionals?
C12 Dependencies & Architecture 5% No circular deps? DIP respected?

Read the full file on GitHub · 170 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 170 lines · 92 tokens per session scan A e4b6b2e37962

Subscribe to this mod's changes

cli-audit-code is a skill published in the GitHub repository Destynova2/cli-code-skills (5 stars, last pushed 1mo ago), licensed MIT. It adds 92 tokens to every session and 2,364 once invoked, about $0.0004 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

Other skills, from other repositories

argot-refresh

Refresh Argot's committed fit snapshot safely — first diagnose why maintenance is recommended, re-audit corpus scope and structural path changes, review stale mutes and policy entries with the user, then fit locally, verify, and prepare the reviewed .argot/ update. Use when argot status, argot check, MCP, or CI…

get-tmonier/argot · 136 tokens

printing-press-output-review

Internal sub-skill: agentic review of a printed CLI's sampled command output for plausibility issues that rule-based checks can't encode (substring-match relevance, format bugs, silent source drops, ranking failures). Invoked via the Skill tool by the main printing-press skill at Phase 4.85 and printing-press-polish…

mvanhorn/cli-printing-press · 102 tokens

roam

Codebase comprehension via roam-code CLI. Use when exploring codebases, planning modifications, debugging failures, assessing PR risk, or checking architecture health. Triggers on: understanding project structure, pre-change safety checks, finding symbols/files, blast radius analysis, affected tests, health scoring…

Cranot/roam-code · 86 tokens

dorodango

Polishes working code through successive quality passes in fresh subagents. Use after tests pass when code needs multi-dimension refinement before release.

athola/claude-night-market · 31 tokens

audit

Fast quality gate — detects stack, runs static analysis, checks cross-layer consistency, fixes issues. Run between every pipeline phase, before every commit push, after every feature batch. Lighter than /analyze but catches the same critical issues.

skillmds/skillmd · 50 tokens

ring:searching-code

Forensic code search and analysis with optional Chain of Draft (CoD) ultra-concise mode. Five-phase methodology (clarification, planning, execution, analysis, synthesis) with severity assessment. Use for targeted investigation of specific patterns, bugs, or vulnerabilities. Skip for broad architecture mapping (use…

LerianStudio/ring · 74 tokens