cleanup

cleanup is a skill for Claude Code from mkanat/skills. It costs 17 tokens per session (242 once invoked), scanned A, original, CC0-1.0.

A code-review cleanup workflow for a large change or an entire codebase. It looks for unnecessary transformations, duplicate logic, compatibility workarounds, and defensive code, then removes them and checks again.

In plain words
What is it for?
Use it after a large implementation or during maintenance to find and fix redundant code, repeated data handling, and unnecessary safeguards.
Why use it?
It helps reduce code that is harder to understand or maintain without changing the intended behavior. Rechecking after each cleanup can reveal further simplifications.

Skill for Claude Code

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

Part of the skills plugin — 1 skill shipped together

Good fit Use it after a large implementation or during maintenance to find and…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mkanat/skills/cleanup
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 mkanat/skills --skill cleanup
Clone the repo
git clone --depth 1 https://github.com/mkanat/skills

Made for: Claude Code.

Or install skills, the plugin that ships this one along with the rest of its 1 skill.

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 cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/mkanat/skills/cleanup.svg)](https://agentmods.dev/skills/mkanat/skills/cleanup)
Your own site
<a href="https://agentmods.dev/skills/mkanat/skills/cleanup"><img src="https://agentmods.dev/badge/skills/mkanat/skills/cleanup.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 242 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.00017 $0.00242
Opus 5 $0.00009 $0.00121
Sonnet 5 $0.00003 $0.00048
Haiku 4.5 $0.00002 $0.00024

Measured 7d ago against content hash a9c9a973a6c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

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

skills/cleanup/SKILL.md · 28 lines

What it actually says

Cleanup

Look over the current change (or the whole codebase if there is no current change) and look for:

  • Any transformations or indexes that are redundant with data structures or relationships already known earlier in the whole-program data flow.
  • Any backwards-compatibility shims, unnecessary defensive code, or unnecessary deduplication.
  • For any deduplication added in this change, ask yourself: could these objects have arrived here inherently deduplicated?

Print out your findings, if any. Then, fix any findings you found.

After fixing your findings, look over the code again: now that we have done that cleanup, are there any other cleanups available? Print out your new findings. Then fix them.

Continue to do that in a loop (look over the code again, find any new cleanups that are visible now that you've fixed the last ones, print them out, and fix them if you find any) until you find no more cleanups to do upon reinspection.

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. 7d ago First seen · 28 lines · 17 tokens per session scan A a9c9a973a6c8

Subscribe to this mod's changes

cleanup is a skill published in the GitHub repository mkanat/skills (69 stars, last pushed 13d ago), licensed CC0-1.0. It adds 17 tokens to every session and 242 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-08-30.

Related

Other skills, from other repositories

rigor3

Audit, score, remediate, and verify repositories across code hygiene, architecture hygiene, and engineering hygiene. Use for an explicit Rigor3 or three-hygiene request, a strict repository-wide quality audit, a cross-dimensional cleanup plan, or before-and-after verification. Do not use for an ordinary focused review…

MaySudo/rigor3 · 78 tokens

recipe-front-review

Reviews completed frontend implementation for governing-source compliance, scope economy, repository quality, and security, then applies user-approved React corrections.

shinpr/claude-code-workflows · 29 tokens

brooks-sweep

Full-sweep mode: runs a unified analysis across all quality dimensions — code decay, architecture, tech debt, and test quality — then applies fixes directly to the codebase. Safe changes are auto-applied; risky changes are confirmed before execution. Drawing on twelve classic engineering books. Triggers when: user…

hyhmrright/brooks-lint · 178 tokens

package-optimizer

Evaluate one existing package or bounded package family from recorded evaluator evidence and a capability profile, then propose retain, simplify, strengthen, retire, or inconclusive without editing. Use when optimizing a skill, agent, hook, rule, command, utility, or preset; evaluating whether package detail is…

Mathews-Tom/armory · 110 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

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