erase

A guided process for acting on CodeEraser reports, where CodeEraser is a tool that identifies duplication, dead code, and other codebase clutter.

In plain words
What is it for?
Use it to review CodeEraser findings, apply safe cleanup, assess advisory candidates, and confirm that the codebase still passes its checks.
Why use it?
It helps remove reported candidates safely by checking the real code and rerunning quality checks after changes.

Skill for Claude CodeCodex

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

Made for: Claude Code, Codex.

Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 765 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.00056 $0.00765
Opus 5 $0.00028 $0.00382
Sonnet 5 $0.00011 $0.00153
Haiku 4.5 $0.00006 $0.00076

Measured 2d ago against content hash 2d0ee9a6d463, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

erase 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.

plugin/skills/erase/SKILL.md · 82 lines

How it starts

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

erase — from findings to deletions, safely

CodeEraser finds entropy; this skill is the OTHER half — acting on it without breaking anything. The contract: never delete what you have not read, and never claim convergence without re-running the gates.

0. Snapshot first

ce check .          # the before-score and the current ratchet state

Record the score line. Every deletion below must leave ce check passing; the score should not fall.

1. The deterministic pass FIRST — ce erase

ce erase .            # dry-run plan: what is PROVABLY safe to remove
ce erase . --apply    # act on it (git repo + clean worktree required)

Three classes erase without judgment (dead files, verbatim doc duplicates, whole-unit byte-identical twins in dead files) — the tool plans them deterministically, applies behind preconditions, and proves its own convergence (contract: docs/reference/erase.md). Do NOT hand-delete anything the plan already covers. Everything it prints as advisory is YOUR half — that is where the judgment below begins.

2. Collect the advisory candidates (three signals, JSON faces)

ce dedup . --format json      # T1/T2 clone blocks
ce deadcode . --format json   # zero-liveness verdicts (graph-based)
ce join . --days 14 --format json   # similarity × position × churn

ce join ranks the strongest deletion candidates: high similarity, weak graph position, low churn. Start from the top of that list.

3. Verify each candidate — no exceptions

For every candidate pair or dead unit:

  1. Read both sides in full (the whole function/section, not the matched span). Tool-reported similarity is a lead, not a verdict.
  2. Check callers/references: prefer deleting the copy with fewer references; re-point the survivors.
  3. Respect exemptions: a .ceignore entry means a human already ruled — skip it. For docdup candidates the same is true of an adjacent ce:allow(docdup) -- <why> line — one grammar (cli/src/allow.rs), also read by deadcode (ce:allow(deadcode) claims liveness for a whole file) and by the unmentioned advisory (ce:allow(unmentioned)); a bare marker with no why claims nothing, and dedup exemptions go through .ceignore.
  4. Dead code with an entry_globs match or exported surface may be a public API — confirm before removing.

Read the full file on GitHub · 82 lines

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 First seen · 82 lines · 56 tokens per session scan A 2d0ee9a6d463

Subscribe to this mod's changes

erase is a skill published in the GitHub repository skymanbp/CodeEraser (20 stars, last pushed 2d ago), licensed Apache-2.0. It adds 56 tokens to every session and 765 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.

Related

Other skills, from other repositories

cli-analysis

Run the pyscn command-line tool for Python code quality analysis - CI/CD quality gates, HTML/JSON/CSV reports, full analysis runs, and project configuration. Use when user wants a CI check, a shareable report file, or to configure pyscn for a project.

ludo-technologies/pyscn · 59 tokens

health-check

Get an overall Python code quality health score using pyscn. Use when user asks how healthy or good the code is, wants a quality overview, a grade, a summary of technical debt, or a before/after quality comparison.

ludo-technologies/pyscn · 49 tokens

architecture-review

Analyze Python module architecture using pyscn - class coupling (CBO), cohesion (LCOM), dependency cycles, and module communities. Use when user asks about architecture, module structure, coupling, circular dependencies, or which files to review or change together.

ludo-technologies/pyscn · 53 tokens

refactoring

Find refactoring targets in Python code using pyscn - duplicate code (clones), overly complex functions, and dead code. Use when user asks about refactoring, code duplication, complexity hotspots, unreachable code, or cleaning up a codebase.

ludo-technologies/pyscn · 52 tokens

scan

Scan a project with sentrux to get structural health grades (A-F) across 14 dimensions including coupling, cycles, cohesion, dead code, and test coverage. Use when the user wants to check code quality, architecture health, or before/after an agent session.

sentrux/sentrux · 57 tokens

audit-quality-gates

Use this skill when the user wants to audit how a project configures its style checkers and static analyzers.

yegor256/purist · 29 tokens