Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Reuse And Report Dead Code?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ganesh-dark-reuse-and-report-dead-code)
---
name: reuse-and-report-dead-code
description: Use before writing new functions, helpers, or refactors. Prevents duplicate code, bloated files, and forgotten dead code.
---
# Reuse and Report Dead Code
Agents are often afraid of breaking existing functions, so they append a brand-new duplicate helper at the bottom of the file. Over a few sessions, the codebase fills up with copies and dead code that nobody cleans up.
## Rules
- Search the repository before writing any new helper, validator, or constant. If one already exists, reuse it or extend it cleanly.
- Do not pile unrelated logic into one giant file. If a file is turning into a dumping ground, keep new logic modular and aligned with the project structure.
- Remove any imports, variables, or helper functions that your own edit made unused.
- Watch for pre-existing dead code while you work. If you spot unused functions, unreachable `if` branches, commented-out code blocks, or orphaned imports already in the file, report their exact file paths and line numbers to the user.
- Never silently delete unrelated dead code on your own. Tell the user what is unused and wait for explicit approval before removing it.
## Example
When editing `parser.py` to fix date formatting:
- You reuse the existing `parse_iso_date` helper in `date_utils.py` instead of writing `convert_date_v2` in `parser.py`.
- You notice an old `legacy_csv_import` function on lines 140 to 178 of `parser.py` that has zero callers in the repo. You leave it untouched and tell the user: "Note: `legacy_csv_import` in `parser.py` (lines 140 to 178) appears unused. Let me know if you want it removed."