cleanup-audit

A read-only review of an entire codebase for unnecessary complexity and over-engineering. It ranks code and dependencies that may be deleted, simplified, or replaced with standard library or platform features.

In plain words
What is it for?
It helps inspect the repository structure, dependencies, entry points, and references, then produce a prioritized list of simplification opportunities.
Why use it?
It helps find bloat outside the current code change, including dead code, unused flexibility, needless wrappers, and duplicated logic.

Skill for Claude CodeCodex

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 skills/pymodel/pythinker-cli/cleanup-audit
Any agent
npx skills add PyModel/pythinker-cli --skill cleanup-audit
Clone the repo
git clone --depth 1 https://github.com/PyModel/pythinker-cli

Made for: Claude Code, Codex.

Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 661 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 $0.00113 $0.00661
Opus 5 $0.00056 $0.00331
Sonnet 5 $0.00023 $0.00132
Haiku 4.5 $0.00011 $0.00066

Measured 2d ago against content hash 92d49690d81e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cleanup-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 2d 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.

src/pythinker_code/skills/cleanup-audit/SKILL.md · 51 lines

How it starts

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

Cleanup Audit

A read-only, whole-repo pass that hunts accidental complexity and over-engineering. The diff-scoped version of this job already ships as pythinker review diff --mode deslopify; this skill is its repo-wide complement — scan the whole tree, rank the biggest cut first.

Scope is complexity only. Correctness bugs, security holes, and performance belong to a normal review or security pass — note them in one line if you trip over them, but do not chase them here.

What to hunt

  • Dead code, unused flexibility, and speculative features no caller needs.
  • Hand-rolled logic the standard library already ships — name the function that replaces it.
  • A dependency (or hand-written code) doing what the language, runtime, or framework already does.
  • Single-implementation interfaces, one-product factories, wrappers that only delegate, a module that exports one trivial thing, dead flags and config nobody sets.
  • The same logic spelled out long-hand where a shorter, equally clear form exists.

How to work

  1. Map before judging: read the tree, the manifest/lockfile, and entry points; use Grep/Glob (or LSP for references and call hierarchy) to confirm a thing is actually unused before proposing its deletion. A deletion proposed without checking callers is a guess.
  2. Rank findings biggest cut first.
  3. Apply nothing. This is a report.

Output

One line per finding, ranked, each tagged and citing a path:

  • delete: — dead code / speculative feature. Replacement: nothing.
  • stdlib: — hand-rolled thing the standard library ships. Name the function.
  • native: — dependency or code doing what the platform/framework already does. Name the feature.
  • yagni: — abstraction with one implementation, config nobody sets, layer with one caller.
  • shrink: — same logic, fewer lines. Show the shorter form.

Format: <tag> <what to cut>. <replacement>. [path:line] End with an estimate: net: ~-<N> lines, -<M> deps possible. Nothing to cut: Lean already.

Read the full file on GitHub · 51 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. 2d ago First seen · 51 lines · 113 tokens per session scan A 92d49690d81e

Subscribe to this mod's changes

cleanup-audit is a skill published in the GitHub repository PyModel/pythinker-cli (20 stars, last pushed 5d ago), licensed Apache-2.0. It adds 113 tokens to every session and 661 once invoked, about $0.0006 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.

Related

Other skills, from other repositories

peer-review

Structured manuscript/grant review with checklist-based evaluation. Use when writing formal peer reviews with specific criteria methodology assessment, statistical validity, reporting standards compliance (CONSORT/STROBE), and constructive feedback. Best for actual review writing, manuscript revision. For evaluating…

xintaofei/codeg · 71 tokens

scientific-critical-thinking

Evaluate scientific claims and evidence quality. Use for assessing experimental design validity, identifying biases and confounders, applying evidence grading frameworks (GRADE, Cochrane Risk of Bias), or teaching critical analysis. Best for understanding evidence quality, identifying flaws. For formal peer review…

xintaofei/codeg · 63 tokens

release-notes

Generate user-facing release notes for Intelligent Terminal. Use when asked to write release notes, changelog, what-is-new summary, or prepare a release. Compares git commits between releases, looks up PR-linked issues and community contributors, then outputs formatted notes with "Verbed + Impact + Scenario" style…

microsoft/intelligent-terminal · 73 tokens

statistical-analysis

Guided statistical analysis for research data - test selection, assumption checking, effect sizes, power analysis, Bayesian alternatives, and APA-formatted reporting. Use whenever a user wants to compare groups, test a hypothesis, analyze experimental or survey data, check statistical assumptions, compute required…

xintaofei/codeg · 111 tokens

statistical-power

Sample-size and statistical power calculations for planning studies. Use whenever someone asks "how many subjects/samples/replicates do I need", wants an a priori power analysis, a minimum detectable effect (MDE), a power curve, or needs to justify a sample size for a grant, IRB protocol, or pre-registration. Covers…

xintaofei/codeg · 190 tokens

pr-integration-test

Design, implement, and validate Intelligent Terminal integration tests for a target pull request or regression. Use when asked to add PR integration tests, convert a bug fix into E2E coverage, prove existing behavior still works, map tests to the release checklist, or verify E2E reports mark checklist cases complete.

microsoft/intelligent-terminal · 66 tokens