codebase-prune-review

codebase-prune-review is a skill for Codex from jimtin/production-ai. It costs 98 tokens per session (975 once invoked), scanned A, original, MIT.

A careful review process for removing obsolete code from an existing codebase, including unused, replaced, or redundant paths.

In plain words
What is it for?
Use it to map current behavior, check references and tests, remove one verified layer at a time, and validate each removal.
Why use it?
It reduces technical debt—the cost of maintaining old code—and can shrink the code exposed to security attacks without removing live behavior accidentally.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: $skill-name invocation.

Good fit Use it to map current behavior, check references and tests, remove one verified layer at a time, and validate each removal.

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

Made for: 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 codebase-prune-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/jimtin/production-ai/codebase-prune-review/github.svg)](https://agentmods.dev/skills/jimtin/production-ai/codebase-prune-review)
Your own site
<a href="https://agentmods.dev/skills/jimtin/production-ai/codebase-prune-review"><img src="https://agentmods.dev/badge/skills/jimtin/production-ai/codebase-prune-review/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 codebase-prune-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/jimtin/production-ai/codebase-prune-review"><img src="https://agentmods.dev/badge/skills/jimtin/production-ai/codebase-prune-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 975 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.00098 $0.00975
Opus 5.5 $0.00039 $0.00390
Sonnet 5.5 $0.00020 $0.00195
Haiku 4.5 $0.00010 $0.00097

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

Security

Grade A, and why

codebase-prune-review 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.

skills/codebase-prune-review/SKILL.md · 56 lines

How it starts

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

Codebase Prune Review

Purpose

Use this skill to safely remove obsolete code from an existing repo without losing live functionality. It audits current behavior, classifies removal candidates, proves test coverage, removes in small layers, and validates after each layer.

This is not a generic refactor pass. The goal is to reduce tech debt and attack surface by retiring code paths that are proven superseded, dead, or no longer part of the live product.

Operating Rules

  • Start from current repo truth and live entrypoints. Prefer code, runtime config, package scripts, deployment config, tests, and workflows over historical docs.
  • Build a behavior and ownership map before deleting anything.
  • Classify each candidate as active, compatibility, superseded, dead, or unknown.
  • Do not remove unknown paths until usage is disproven by references, tests, runtime config, logs, or explicit user confirmation.
  • Add or update tests before removing a path when current behavior is not already covered.
  • Remove one coherent layer at a time and run targeted tests after each layer.
  • Keep rollback simple. Do not mix unrelated cleanup, formatting, dependency churn, or feature work into a prune layer.
  • Use $security-threat-model when removals touch auth, uploads, parsers, webhooks, admin paths, secrets, provider clients, storage, payments, or deployment surfaces.
  • Use $test-readiness-preflight before expensive validation and after each removal layer to clear predictable blockers.
  • Use $feature-design-preflight when the prune follows a provider/platform replacement or migration whose new path still needs requirement tracing.

Workflow

  1. Baseline the repo. Read instructions, package scripts, deployment config, routes, jobs, API handlers, provider integrations, env examples, and tests. Use references/discovery-checklist.md.
  2. Map live behavior. List the functionality that must remain unchanged, the entrypoints that serve it, the providers it depends on, and the tests that prove it.
  3. Classify candidates. Mark each old path as active, compatibility, superseded, dead, or unknown. Record evidence for every classification.
  4. Build the proof plan first. Map each behavior to unit, integration, browser/E2E, visual, migration, security, and local/container validation as applicable. Add missing tests before deletion.
  5. Remove progressively. Follow references/removal-layers.md; remove one coherent layer, then run targeted tests. Update docs, env examples, fixtures, workflows, and dependency manifests as obsolete paths disappear.
  6. Validate and report. Run the final local/container gate, dependency audit, containerized repo-scoped gitleaks, and security review when push/readiness is in scope. Use references/evidence-report.md for the completion report.

Read the full file on GitHub · 56 lines

Files

What ships with it

4 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 · 56 lines · 98 tokens per session scan A 826b36c9c788

Subscribe to this mod's changes

codebase-prune-review is a skill published in the GitHub repository jimtin/production-ai (1 stars, last pushed 4mo ago), licensed MIT. It adds 98 tokens to every session and 975 once invoked, about $0.0004 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-31.

Related

Other skills, from other repositories

code-that-fits-in-your-head

Software-engineering heuristics based on Mark Seemann's Code That Fits in Your Head (2021), updated for agent-driven development. Use when writing or reviewing code, refactoring accidental complexity or a Big Ball of Mud, controlling technical or architectural debt in generated code, designing APIs and invariants…

CodeAlive-AI/ai-driven-development · 169 tokens

create-pr

Create pull requests following Sentry conventions. Use when opening PRs, writing PR descriptions, or preparing changes for review. Follows Sentry's code review guidelines.

agent-skills-hub/agent-skills-hub · 36 tokens

git-pr-review

A read-only reviewer for GitHub pull requests, which are proposed code changes submitted for review. It produces an evidence-based report about whether a pull request should be merged.

huangwb8/skills · 76 tokens

code-remediate

Collect and resolve selected findings in one pass, then verify; bare PR targets use online items, while PR +review adds the latest matching artifact.

Borda/AI-Rig · 34 tokens

codex-review

Professional code review with auto CHANGELOG generation, integrated with Codex AI.

agent-skills-hub/agent-skills-hub · 18 tokens

challenge-resolve

Independently review and fix a bounded task through convergence rounds, with evidence-backed closure and explicit stop/remediation decisions. Use only when the user explicitly requests an adversarial review-and-fix loop over an existing implementation, feature, problem, or diff; not for ordinary review (code-review)…

Borda/AI-Rig · 74 tokens