Cut clean. Leave nothing behind.
The best deletion is the one done completely and safely.
Makes your AI coding agent perform surgical removal of unnecessary features, integrations, and dead code.
Inspired by ponytail — but focused on complete, clean deletion instead of minimal addition.
Most AI agents suck at removing things. They leave commented-out code, miss references in configs/tests/docs/CI, and create more technical debt than they remove.
Scalpel turns the agent into a precise, slightly ruthless senior engineer who only removes code when it can be done cleanly and completely.
- Completely remove or don't touch it
- Understand the full blast radius before cutting
- Safety and verification are non-negotiable
- No commented-out corpses or "maybe later" dead code
- Prefer one clean atomic removal over many partial ones
Scalpel works in two main ways:
Copy the core rules into your project:
# Option A: Copy AGENTS.md into your project root
curl -o AGENTS.md https://raw.githubusercontent.com/itsApurba/scalpel/main/AGENTS.mdOr simply tell your AI:
"Follow the Scalpel rules from https://github.com/itsApurba/scalpel/blob/main/AGENTS.md"
This works great with:
- Claude Code / Claude Desktop
- Cursor
- Windsurf
- Cline
- GitHub Copilot
- Hermes Agent and other custom agents
- Gemini CLI / Antigravity
Because Scalpel includes proper commands/ and skills/ folders (modeled after ponytail), many hosts can load it as a plugin.
Claude Code:
/plugin marketplace add itsApurba/scalpel
/plugin install scalpel
Codex:
/plugins → Add from repository → itsApurba/scalpel
GitHub Copilot CLI:
copilot plugin marketplace add itsApurba/scalpel
copilot plugin install scalpel
After installing, you should get native slash commands like /scalpel-plan, /scalpel-execute, etc.
Note: Full marketplace/plugin support is still early. The portable
AGENTS.mdmethod above is currently the most reliable.
- Cursor: Add
AGENTS.mdcontent to.cursor/rules/scalpel.mdc - Windsurf / Cline: Use
.windsurf/rules/or.clinerules/ - Continue.dev: Load
AGENTS.mdas context
Load these files as persistent skills/context:
AGENTS.md(core rules)skills/scalpel/SKILL.mdskills/scalpel-plan/SKILL.md(and others as needed)
-
Plan first (especially for anything non-trivial)
/scalpel-plan remove the old Stripe integration completely -
Review the plan the agent produces.
-
Execute once you're happy
/scalpel-execute remove the old Stripe integration completely -
Let it verify (build + tests + final reference search).
| Command | Description |
|---|---|
/scalpel |
Enable core Scalpel removal mode |
/scalpel-plan |
Create a detailed, safe removal plan |
/scalpel-execute |
Perform the actual clean removal |
/scalpel-audit |
Scan codebase for dead/unused features |
/scalpel-review |
Review a removal diff or PR for completeness |
/scalpel-help |
Show command reference + philosophy |
After understanding the feature, the agent follows this structured ladder:
- Confirm it's truly unnecessary (evidence-based)
- Map the complete blast radius (every file, import, config, test, doc, env var, CI step...)
- Classify impact & risk
- Choose strategy (atomic vs staged)
- Execute cleanly (no commented code)
- Verify aggressively (build + tests + final grep)
- Document what was removed
Full details: docs/removal-protocol.md
See examples/remove-stripe-integration.md for a full before/after comparison of a typical messy removal vs a proper Scalpel removal.
- Core
AGENTS.md+ Removal Protocol -
commands/+skills/for native slash command support - Full plugin manifests + lifecycle hooks (Claude Code, Codex)
- Better static analysis integration for
/scalpel-audit - More stack-specific examples (Frappe, Flutter, FastAPI, etc.)
- Benchmarks on real removal tasks
PRs are very welcome! Especially:
- Better examples for different tech stacks
- Improved rules for specific frameworks
- Plugin adapter implementations
- More skills (debt tracking, etc.)
MIT (same as ponytail)
The best code is the code you delete cleanly.
Made with the same "lazy senior dev but for removal" energy as ponytail.