cleanup-codebase

cleanup-codebase is a skill for Claude Code, Codex from OutlineDriven/odin-codex-plugin. It costs 57 tokens per session (2,059 once invoked), scanned A, original, Apache-2.0.

A local code-cleanup practice for removing unused data, duplicate logic, unnecessary wrappers, and speculative abstractions while working nearby code. It focuses on internal code rather than changing public APIs.

In plain words
What is it for?
Use it during routine work on an existing code path when you find dead fields, redundant functions, stale configuration, or other nearby complexity.
Why use it?
It reduces clutter and indirection that make existing code harder to understand and maintain.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths.

Good fit Use it during routine work on an existing code path when you find dead fields, redundant functions, stale configuration, or other nearby complexity.

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

Made for: Claude Code, Codex.

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-codebase

README.md
[![agentmods](https://agentmods.dev/badge/skills/outlinedriven/odin-codex-plugin/cleanup-codebase/github.svg)](https://agentmods.dev/skills/outlinedriven/odin-codex-plugin/cleanup-codebase)
Your own site
<a href="https://agentmods.dev/skills/outlinedriven/odin-codex-plugin/cleanup-codebase"><img src="https://agentmods.dev/badge/skills/outlinedriven/odin-codex-plugin/cleanup-codebase/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 cleanup-codebase

Your own site · 80×15
<a href="https://agentmods.dev/skills/outlinedriven/odin-codex-plugin/cleanup-codebase"><img src="https://agentmods.dev/badge/skills/outlinedriven/odin-codex-plugin/cleanup-codebase.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,059 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.00057 $0.02059
Opus 5.5 $0.00023 $0.00824
Sonnet 5.5 $0.00011 $0.00412
Haiku 4.5 $0.00006 $0.00206

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

Security

Grade A, and why

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

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/cleanup-codebase/SKILL.md · 122 lines

How it starts

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

Cleanup codebase — local simplicity, ruthlessly applied

Code rots in two directions: outward (drift from the original design) and downward (accretion of dead state, redundant indirection, speculative ceremony). This skill addresses the second. The thesis is local: you are already in nearby code for some other reason; while you are there, remove what does not earn its keep.

Modern insight (2025): Kent Beck's Tidy First? thesis and Casey Muratori's dataflow-first design heuristic both converge on the same conclusion that this skill's compress-side operations operationalize — small, frequent, atomic cleanups embedded in the active commit stream beat scheduled "cleanup PRs" by a wide margin. Scheduled cleanups bundle unrelated concerns and become unreviewable; embedded cleanups stay reviewable because their scope is the file already in your hands.

See dead-fields for examples of dead struct fields, props, and class members. See redundant-wrappers for examples of single-line passthrough functions that should be inlined. See dead-config for stale feature flags, environment variables, and dead config branches.


Mandates, not suggestions

These are mandates, not suggestions. Internalize them as rules; do not paraphrase.

1. Minimize concepts, duplication, and ceremony.

Every concept the reader has to hold in their head has a cost. Every duplicated piece of logic has two places to drift apart. Every ceremonial wrapper, factory, or builder that does not protect a real boundary is a tax on every future reader. Reducing concepts is not the same as reducing lines — it is reducing the number of distinct things a reader has to track.

2. One real owner per contract. No mirroring, no wrappers unless they remove real coupling.

A "contract" is the truth about what some piece of state means or what some operation does. It must have exactly one owner. Mirroring (two structures holding the same field; two services maintaining the same cached state) is a guaranteed-future-bug pattern. Wrappers are coupling-removal tools — if a wrapper just renames or forwards without removing coupling, it is ceremony.

Read the full file on GitHub · 122 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 · 122 lines · 57 tokens per session scan A 5dd9a64ae18b

Subscribe to this mod's changes

cleanup-codebase is a skill published in the GitHub repository OutlineDriven/odin-codex-plugin (14 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 57 tokens to every session and 2,059 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

improve-codebase-architecture

Surface deepening refactors that turn shallow modules into deep ones, informed by CONTEXT.md and docs/adr/. Use when the user asks to improve architecture, find refactor candidates, raise testability, or make a codebase more agent-navigable. Skip for single localized fixes.

OutlineDriven/odin-gemini-cli-extension · 69 tokens

security-review

Adversarial security audit — STRIDE, OWASP Top 10, supply-chain (CVE/SBOM), secrets scan, auth/authz analysis. Use on changes touching auth, input parsing, deserialization, network I/O, dependencies, or secrets; before any production release or external-surface PR.

OutlineDriven/odin-gemini-cli-extension · 66 tokens

pr-reviews

Review code changes on a given GitHub PR using gh CLI. Use when the user asks to review a pull request, analyze PR diffs, or provide feedback on open PRs with structured quality, security, and testing assessments.

OutlineDriven/odin-gemini-cli-extension · 50 tokens

resolve

Resolve code review comments by verifying validity, then proposing multiple architectural solutions (not naive fixes) for confirmed issues. Use when addressing review feedback or analyzing comment validity.

OutlineDriven/odin-gemini-cli-extension · 34 tokens

reviews

Review the code changes on the current branch. Use when the user asks to review their current work, analyze recent commits, or get a code quality assessment of the active branch against the main branch.

OutlineDriven/odin-gemini-cli-extension · 41 tokens

gh-address-comments

Help address review/issue comments on the open GitHub PR for the current branch using gh CLI; verify gh auth first and prompt the user to authenticate if not logged in.

OutlineDriven/odin-gemini-cli-extension · 39 tokens