Skip to content
Skill

Erase

Guides an agent through verified cleanup of CodeEraser duplication and dead-code findings

Erase is an open-source agent skill for developer tools. It is available on Claude Code.

Scripts
None
Platforms
Claude Code
GitHub stars
16
Last commit
License
Apache-2.0
Listing updated

Similar skills

About Erase

This skill teaches an agent to act on the findings CodeEraser reports, rather than deleting whatever a scanner flags. It starts by recording the current ce check score, runs the deterministic ce erase dry-run, and only applies the changes that tool considers provably safe. Everything else the tool marks as advisory is treated as a judgment call that the agent must verify by reading both sides of each candidate in full, checking callers and references, and honouring existing exemptions such as .ceignore entries and allow markers.

The workflow pulls candidates from several CodeEraser JSON reports, including clone blocks, unreferenced files, similarity-position-churn rankings, merged clone groups, dead statements inside functions, and index queries against declared architecture rules. Unreferenced files are checked by searching the repository for their name and stem before removal, since they may be run as scripts, referenced from build or CI config, or loaded by a tool convention. Deletions proceed in small batches, each followed by a re-run of the clone budget and the ratchet check, and the agent finishes by reporting what was removed, what was kept and why, and the before and after scores.

The skill expects the CodeEraser command-line tool to be installed and the target project to be a git repository with a clean worktree before applying erasures. It has no bundled scripts and sets no tool restrictions of its own.

When your agent uses it

Guided cleanup of CodeEraser findings — read the reports, verify every candidate against the actual code, delete safely, and prove convergence with ce check. Invoke when the user asks to clean up duplication, dead code, or act on CodeEraser findings.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (6 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the codeeraser plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add skymanbp/CodeEraser
/plugin install codeeraser@codeeraser

Or copy only this skill to ~/.claude/skills/erase:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/skymanbp/CodeEraser.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/erase &&
cp -R "$tmp/plugin/skills/erase" ~/.claude/skills/erase &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/erase inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/erase to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/skymanbp/CodeEraser.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/erase &&
cp -R "$tmp/plugin/skills/erase" ~/.agents/skills/erase &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/erase inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/erase to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/skymanbp/CodeEraser.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/erase &&
cp -R "$tmp/plugin/skills/erase" ~/.cursor/skills/erase &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/erase inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/skymanbp/CodeEraser.git --path plugin/skills/erase

Or copy the folder to ~/.gemini/skills/erase yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/erase:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/skymanbp/CodeEraser.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/erase &&
cp -R "$tmp/plugin/skills/erase" ~/.copilot/skills/erase &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/erase inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/skymanbp/CodeEraser.git

Then copy CodeEraser/plugin/skills/erase into your agent's skills folder as erase. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Deterministic erase pass
Runs the dry-run plan first and applies only the removals the tool can prove safe.
Candidate verification
Requires reading both sides of every clone or unreferenced file before any deletion.
Multi-signal candidate collection
Gathers clone blocks, dead files, similarity-position-churn rankings and dead statements.
Reference and convention checks
Searches for scripts, build references and tool conventions before removing a file.
Batch deletion with gates
Removes code in small batches and re-runs clone budget and ratchet checks after each.
Convergence reporting
Ends by reporting deletions, kept items and before and after check scores.

Good for

  • Clean up duplicated code flagged by CodeEraser
  • Remove dead code that CodeEraser reports as unreferenced
  • Review and act on CodeEraser findings in a repository
  • Verify that a cleanup left the ce check ratchet passing
  • Collapse a family of near-identical functions into one

Erase FAQ

When does Erase trigger?

It is invoked when the user asks to clean up duplication, dead code, or act on CodeEraser findings.

Does Erase delete files automatically?

No. Only the changes ce erase marks as provably safe are applied by the tool; everything advisory requires the agent to read and verify each candidate first.

What must be in place before applying changes?

ce erase --apply requires a git repository with a clean worktree.

What does Erase check before removing an unreferenced file?

It searches the repository for the file's basename and stem, checking scripts, build and CI config, and tool conventions, and reports what it searched.

How do I install Erase in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/erase to use it in all your projects, or to .claude/skills/erase in one project. Or install the codeeraser plugin, which includes it: /plugin marketplace add skymanbp/CodeEraser, then /plugin install codeeraser@codeeraser.

Does Erase run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Erase?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

What are the best alternatives to Erase?

The closest alternatives to Erase are Dead code cleanup edho ferdian, Principle subtract before you add, Code reachability audit, Config hygiene edho ferdian and Safe execution edho ferdian.

Where this comes from

  • Description: from the skill's own SKILL.md.