remove-proven-dead-code

Removes unused code, branches, exports, and dependencies only after evidence proves non-use.

1|Updated Aug 11, 2026
One-click install
npx skills add https://github.com/0xMuluh/package-development-skills --skill remove-proven-dead-code-0xmuluh
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: remove-proven-dead-code
Source: https://github.com/0xMuluh/package-development-skills/tree/main/remove-proven-dead-code
Command: npx skills add https://github.com/0xMuluh/package-development-skills --skill remove-proven-dead-code-0xmuluh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Deleting code that merely looks unused often breaks hidden consumers through dynamic dispatch, registration, or compatibility paths. This Skill enforces an evidence-based deletion workflow so dead-code removal stays safe, reviewable, and behavior-preserving. ## Core Features & Use Cases - Evidence-Based Removal: Requires a written removal statement proving non-use across callers, exports, tests, docs, and dynamic registration before deleting anything. - Scoped Deletion Units: Deletes one coherent target at a time (a helper, branch, compatibility path, or dependency) instead of broad cleanup sweeps. - Use Case: You find an internal helper with no callers in a legacy utility file. The Skill guides you to verify it is unexported, unregistered, and untested, then delete just that helper with its tied docs and imports while leaving neighboring code untouched. ## Quick Start Use the remove-proven-dead-code skill to verify and safely delete the unused helper function in utils.R.

Frequently Asked Questions about remove-proven-dead-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely remove unused code from a package?▼

Prove non-use first by searching callers in source, tests, docs, and examples, then check export status and dynamic registration. Delete one coherent unit at a time and run package tests to confirm supported behavior is unchanged.

How to tell if a function is dead code?▼

A function is dead when it is unreachable, uncalled, unexported with no internal use, or superseded by another implementation. No text references alone is only moderate evidence; check method registration, reflection, and dynamic lookup before concluding.

Can I delete an exported function with no internal callers?▼

No, an exported function with no internal callers is public API, not dead code. Removing it requires a deprecation or API-evolution process unless the export was accidental and never released.

Why does dead code deletion break tests unexpectedly?▼

Failures usually mean the code was not actually dead, a stale reference remains, or a generated artifact needs updating. Investigate the failure cause instead of patching around it or deleting the failing test.

When should I remove a dependency after deleting code?▼

Remove the dependency in the same PR only if it existed solely for the deleted code. If usage is broader or uncertain, audit and remove it in a separate follow-up PR for a clearer review boundary.