89jobrien avatar

Dead Code Removal

This does what it says: finds and removes unused imports, functions, and classes across Python, JavaScript, Java, Go, and Rust projects. It builds dependency graphs, checks for dynamic usage patterns like getattr() or reflection, and preserves framework-specific code (Django models, React components, Spring beans). The incremental removal process creates backups, validates syntax after each change, and runs tests before committing. Honestly most useful after big refactors or before production deploys when you want to shrink bundle size without breaking anything. The Python helper script uses AST parsing for accurate import detection, which is better than naive regex matching. Conservative by default, which is the right call.

skills.sh installs
203
GitHub stars
4
last updated
Aug 21, 2026

Install

$ npx -y skills add 89jobrien/steve --skill dead-code-removal --agent claude-code

Installs into .claude/skills of the current project.

Files

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

  1. Language Detection: Identifies project languages and structure
  2. Entry Point Mapping: Maps entry points and critical paths
  3. Dependency Analysis: Builds dependency graphs and usage patterns
  4. Safe Detection: Identifies unused elements with safety checks
  5. Incremental Removal: Removes code incrementally with validation
  6. 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.

Sponsors

Details

Repository
github.com/89jobrien/steve
Category
Code Review & Quality
First seen
Jun 3, 2026

More from 89jobrien/steve

All 2
1charleswiltgen avataraxiom-ios-accessibilitycharleswiltgen/axiomUse when fixing or auditing ANY accessibility issue - VoiceOver, Dynamic Type, color contrast, touch targets, WCAG compliance, App Store accessibility review.203skills.sh installs
2mikecann avatardeslopmikecann/agent-skillsRuns a second-pass cleanup over AI-written code using the repo's style guide in style.md. Prefers parallel subagents to simplify recently modified files without203skills.sh installs
3rohitg00 avatardesloprohitg00/pro-workflowRemove AI-generated code slop, unnecessary comments, and over-engineering from the current branch diff. Cleans up boilerplate, simplifies abstractions, and stri203skills.sh installs
4xy121718 avatarbaoyu-slide-deckxy121718/baoyu-skillsGenerates professional slide deck images from content. Creates outlines with style instructions, then generates individual slide images. Use when user asks to "203skills.sh installs
5borghei avatarsenior-securityborghei/claude-skillsSTRIDE threat modeling, DREAD risk scoring, secret detection, and secure architecture design. Use when conducting threat models, reviewing code for vulnerabilit202skills.sh installs
6pluginagentmarketplace avatargame-enginespluginagentmarketplace/custom-plugin-game-developerMaster game engines - Unity, Unreal Engine, Godot. Engine-specific workflows, systems architecture, and production best practices.202skills.sh installs