handbook: Skill for Claude Code

.claude/skills/cleanup/SKILL.md

cleanup is a skill for Claude Code from nicograef/handbook. It costs 125 tokens per session (1,550 once invoked), scanned A, original, MIT.

A code-review workflow that checks recent changes or a specified area for maintainability problems, design issues, and overly generated-looking code. It can also report broader cross-layer consistency issues when a whole-project audit is requested.

In plain words
What is it for?
Use it to review staged or unstaged changes, a recent commit, a module, route, component, or page, and to suggest or apply cleanup fixes after confirmation.
Why use it?
It helps identify unclear structure, repeated patterns, and inconsistencies before they become harder to fix. It uses surrounding code as the project's style baseline.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is nicograef/handbook's own configuration. It tells Claude Code how to work on handbook itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything handbook configures →

Part of the handbook plugin — 23 skills, 1 agent, 1 hook shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to nicograef/handbook. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/nicograef/handbook/main/.claude/skills/cleanup/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/nicograef/handbook

Made for: Claude Code.

Or install handbook, the plugin that ships this one along with the rest of its 23 skills, 1 agent, 1 hook.

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/nicograef/handbook/cleanup.svg)](https://agentmods.dev/skills/nicograef/handbook/cleanup)
Your own site
<a href="https://agentmods.dev/skills/nicograef/handbook/cleanup"><img src="https://agentmods.dev/badge/skills/nicograef/handbook/cleanup.svg" alt="Measured on agentmods" height="20"></a>
Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,550 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.00125 $0.01550
Opus 5 $0.00063 $0.00775
Sonnet 5 $0.00025 $0.00310
Haiku 4.5 $0.00013 $0.00155

Measured 2d ago against content hash c8c343179383, 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 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.

.claude/skills/cleanup/SKILL.md · 140 lines

How it starts

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

Cleanup

Workflow

1. Determine scope

Resolve the file set in this order:

Order Source Command
1 Files, module, route, component, or page named by the user
2 Staged changes git diff --cached --name-only
3 Unstaged changes git diff --name-only
4 Last commit git diff HEAD~1 --name-only
5 Still empty Ask the user what to review
  • Ask the user to confirm scope if ambiguous.
  • Incremental default: never scan the entire codebase — stay within the determined scope.
  • Reviewing a diff (staged/unstaged/commit): read both the diff and the full files to understand context.
  • Repo-wide scope mode — triggered by a request for a repo-wide quality audit or a whole-project cross-layer consistency check.
  • Repo-wide mode widens the scope to the codebase and reports findings without applying fixes.
  • It also adds the cross-layer.md trace across 3–5 representative flows per feature area, on top of the per-file passes.

2. Understand conventions

  • Before flagging anything, read surrounding code that is NOT part of the changes.

3. Multi-pass review

Run these passes on each file in scope; skip the irrelevant ones.

Pass Reference Applies to
Readability & clarity readability.md All files (code, docs, configs)
Readability — German prose readability-de.md German-language docs, comments, READMEs — use instead of the prose section in readability.md
Principles principles.md Code files
Code smells code-smells.md Code files + config files
Architecture & boundaries architecture.md Service, domain, handler, repository layers
Cross-layer consistency cross-layer.md Repo-wide scope mode only
Test readability readability.md + code-smells.md Test files only

Read the full file on GitHub · 140 lines

Files

What ships with it

6 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. 2d ago Changed · -8 lines c8c343179383
  2. 6d ago First seen · 148 lines · 125 tokens per session scan A fac95e16657f

Subscribe to this mod's changes

cleanup is a skill published in the GitHub repository nicograef/handbook (2 stars, last pushed 3d ago), licensed MIT. It adds 125 tokens to every session and 1,550 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-31.