Detects and safely removes unused code (imports, functions, classes) across multiple languages. Use after refactoring, when removing features, or before production deployment. Includes safety checks and validation.
SkillScore86Maintained
Automatic
◆Coding pack
Last verified 8/21/2026
What it changes
Passed 17 of 20 test cases with the skill, and 15 of 20 without it.
Without skill73%
With skill86%
Checks it passed that the model alone missed
Writes unit test functions using pytest syntax.
Does not perform dead code removal on src/auth.py.
Specifies creating a backup directory or repository copy before editing code.
and 1 more in the full report
3 fixed16 passed either way3 still failing0 broke
Pass-rate lift
+14 pp
Tokens
+98%
Agent turns
0%
Response time
-19%
Model gemini-3.6-flashMeasured 8/21/2026v119 of 22 cases passed with skill · 20 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 3
Prompt
We are ready to execute automated dead code removal on a multi-file Python repository (`src/`). What initial step must be completed before applying any file modifications or deleting unused code?
What was checked, without and with the skill
Checked
Without skill
With skill
Specifies creating a backup directory or repository copy before editing code.
Missed
Passed
case-10 · gemini-3.6-flash · 8/21/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md312 lines2 filesincludes scripts
Dead Code Removal
This skill safely identifies and removes unused code across multiple programming languages. It includes comprehensive safety checks to prevent removing code that's actually needed.
When to Use This Skill
After refactoring code and removing features
Before production deployment to reduce bundle size
When cleaning up legacy code
When removing deprecated functionality
When optimizing codebase size
When maintaining code quality standards
What This Skill Does
Language Detection: Identifies project languages and structure
Entry Point Mapping: Maps entry points and critical paths
Dependency Analysis: Builds dependency graphs and usage patterns
Safe Detection: Identifies unused elements with safety checks
Incremental Removal: Removes code incrementally with validation
Backup Creation: Creates backups before making changes
Helper Scripts
This skill includes Python helper scripts in scripts/:
find_unused_imports.py: Uses AST parsing to accurately detect unused imports in Python files. Outputs JSON with unused imports and line numbers.