Dead code
Apply the BaseCode Dead Code practice — remove commented-out code, unused code, unreachable code, and abandoned feature branches to reduce noise and improve readability.From its SKILL.md
npx -y skills add jasonmccreary/basecode-skills --skill dead-codeAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.2 KB, as published. Nobody here has run it
BaseCode: Dead Code
Apply the BaseCode Dead Code practice to improve the readability of the code under review. The goal is not shorter code or personal style — it is readability: making the code easier for the next human to read.
Remove all code that is not executed or no longer serves a purpose. Dead code creates noise, signals neglect, and misleads readers.
Commented-out code — delete it. It exists in version control; if it's needed again, revert.
Unused code — remove parameters, variables, methods, and imports that are never referenced. Use static analysis to find them.
Unreachable code — remove code that can never execute:
breakafterreturninside aswitch/case- Code below a top-level
returnin a function - Conditions that always evaluate to
false - Loops that never run
Abandoned code — identify conditional paths gated on config values, feature flags, or preferences that are permanently off or no longer exist, and remove the entire dead branch.