tidy

tidy is a skill for Claude Code, Codex from mblode/agent-skills. It costs 68 tokens per session (852 once invoked), scanned A, original, MIT.

A code-cleanup skill that finds unnecessary complexity in the current Git diff, applies simplifications to the working files, and checks the build.

In plain words
What is it for?
Use it after a feature works and tests pass, before opening a pull request. It reviews and edits only the current diff, then verifies that the build still works.
Why use it?
It removes duplicated, overbuilt, wasteful, or poorly placed code before review. It also helps catch some React, TypeScript, and project-guideline issues in the changed code.

Skill for Claude CodeCodex

Part of the agent-skills plugin — 27 skills shipped together

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/mblode/agent-skills/tidy
Any agent
npx skills add mblode/agent-skills --skill tidy
Clone the repo
git clone --depth 1 https://github.com/mblode/agent-skills

Made for: Claude Code, Codex.

Or install agent-skills, the plugin that ships this one along with the rest of its 27 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 tidy

README.md
[![agentmods](https://agentmods.dev/badge/skills/mblode/agent-skills/tidy.svg)](https://agentmods.dev/skills/mblode/agent-skills/tidy)
Your own site
<a href="https://agentmods.dev/skills/mblode/agent-skills/tidy"><img src="https://agentmods.dev/badge/skills/mblode/agent-skills/tidy.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 852 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.00068 $0.00852
Opus 5 $0.00034 $0.00426
Sonnet 5 $0.00014 $0.00170
Haiku 4.5 $0.00007 $0.00085

Measured today against content hash 3b0940d4907b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tidy 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 today.

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/tidy/SKILL.md · 41 lines

How it starts

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

Tidy

Apply simplifications inside the current diff and incorporate actionable review findings. A clean diff may need no edits. For a read-only report use pr-reviewer; wider architectural changes belong to codebase-architecture.

Workflow

  1. Record the staged and unstaged scope, or the requested branch range, plus existing edits. Use applicable project instructions and check results already available at this revision.
  2. Inspect the relevant angles below. Reuse prior findings; do not repeat a full review simply because a different command produced it. Work locally by default. Delegation is useful only for substantial independent scopes supported by the host.
  3. Merge findings by root cause, discard false positives, and apply the smallest complete fixes. Correctness fixes precede simplification; ownership fixes precede polishing code they remove.
  4. Run checks affected by the changes, plus repository-required gates. Preserve exit codes and distinguish baseline failures. Report applied changes, material deferred decisions, and check results.

Review angles

Angle Distinctive question Evidence for a change
Reuse Does this code need to exist, or does a live repository helper, stdlib, platform feature, or installed dependency cover it? Existing contract and call site, including the boundary cases it handles
Quality Does this introduce a second owner of state, an unused extension point, or unnecessary compatibility? Actual consumers and state ownership, not line count alone
Efficiency Does this add repeated work on a real hot path? Call frequency, duplicate reads, unbounded retention, or a defeated no-change signal
Ownership Is a caller patch compensating for a shared mechanism, or placed outside the subsystem that owns this behavior? Writers, callers, and adjacent implementations; the deeper fix must be smaller than the special case
Test value Can the test fail for a reason someone would act on? A named regression, reachable branch, or public contract; literal diff mirrors and mock echoes add no assurance

Read the full file on GitHub · 41 lines

Files

What ships with it

1 file 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. today Changed · -164 lines · -154 tokens per session 3b0940d4907b
  2. 5d ago First seen · 205 lines · 222 tokens per session scan A 8774e9f31b52

Subscribe to this mod's changes

tidy is a skill published in the GitHub repository mblode/agent-skills (102 stars, last pushed today), licensed MIT. It adds 68 tokens to every session and 852 once invoked, about $0.0003 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.