# Erase

> Erase is an open-source agent skill for developer tools. Guides an agent through verified cleanup of CodeEraser duplication and dead-code findings. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/skymanbp/CodeEraser/tree/main/plugin/skills/erase
- **Repository:** https://github.com/skymanbp/codeeraser
- **GitHub stars:** 16
- **License:** Apache-2.0
- **Skill name:** erase
- **Collection:** https://github.com/skymanbp/CodeEraser
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

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.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/skymanbp/CodeEraser/tree/HEAD/plugin/skills/erase)
- [License: Apache-2.0](https://github.com/skymanbp/CodeEraser/tree/HEAD/plugin/skills/erase)

## Features

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

## Install

### Claude Code

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

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

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

```sh
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.

### Codex

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

```sh
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.

### Cursor

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

```sh
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.

### Gemini CLI

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

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

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

### VS Code

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

```sh
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.

### Other agents

Get the folder:

```sh
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.

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

## Alternatives

- [Dead code cleanup edho ferdian](https://ai-powered.com/skills/dead-code-cleanup-edho-ferdian): Dead code cleanup edho ferdian is an open-source agent skill for developer tools.
- [Principle subtract before you add](https://ai-powered.com/skills/principle-subtract-before-you-add): Principle subtract before you add is an open-source agent skill for developer tools.
- [Code reachability audit](https://ai-powered.com/skills/code-reachability-audit): Code reachability audit is an open-source agent skill for developer tools.
- [Config hygiene edho ferdian](https://ai-powered.com/skills/config-hygiene-edho-ferdian): Config hygiene edho ferdian is an open-source agent skill for developer tools.
- [Safe execution edho ferdian](https://ai-powered.com/skills/safe-execution-edho-ferdian): Safe execution edho ferdian is an open-source agent skill for developer tools.
- [Code simplifier](https://ai-powered.com/skills/code-simplifier): Code simplifier is an open-source agent skill for developer tools.
- [Clean code](https://ai-powered.com/skills/clean-code): Clean code is an open-source agent skill for developer tools.
- [Code simplification edho ferdian](https://ai-powered.com/skills/code-simplification-edho-ferdian): Code simplification edho ferdian is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/erase
