dead-code-expert

Solid

This skill should be used when the user wants to find, audit, or remove dead code, unused imports, unused functions, unused variables, duplicate implementations, parallel/split-brain implementations across architectural boundaries, dead assets/configuration/infrastructure, or simplify a codebase. Works across all programming languages and stacks (SwiftUI, Rust, TypeScript/React, .NET, Python, C++, Go, Java). Relevant when the user says "find dead code", "remove dead code", "remove unused imports", "find duplicate code", "split brain", "parallel implementations", "client server validation drift", "dead config", "orphan assets", "unused environment variables", "simplify this codebase", "find unused functions", "find unused code", "remove commented out code", "what code is unused", "find orphaned files", "detect duplicate implementations", "find unreachable code", "clean up this codebase", or "audit for unused code".

Code & Development 11 stars 0 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 79/100

Stars 20%
36
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Dead Code Expert Find and eliminate dead code, duplicate implementations, parallel split-brain logic across architectural boundaries, dead deployment artifacts (env vars, configs, manifests, schemas, routes, assets), and unnecessary complexity across any programming language and stack. Every finding explains WHY the code is dead and the concrete cost of keeping it (cognitive overhead, build time, misleading developers, masking bugs, drift bugs). ## How to Think About Dead Code Before flagging anything, identify which category it belongs to: - **Layer 1 -- Certainly Dead:** Unreachable code after return/break/throw, unused private functions, unused local variables, imports with zero references. Safe to remove immediately. - **Layer 2 -- Probably Dead:** Exported functions with no callers in the project, commented-out code blocks, `#[allow(dead_code)]` / `// eslint-disable unused` suppressions, permanently-off feature flags. Verify before removing. - **Layer 3 -- Suspiciously Alive:** Code that LOOKS dead but may be used via reflection, serialization, framework magic, dynamic dispatch, DI container resolution, or public API surface. Investigate before touching. - **Layer 4 -- Hidden by Spaghetti:** Dead code locked inside large structural smells (god classes, cyclic imports, divergent change). The structural smell makes the dead code invisible. Surface the smell first, then the dead code inside. → _Consult [false-positives reference](references/false-positives.md) for t...

Details

Author
johnkozaris
Repository
johnkozaris/jko-claude-plugins
Created
4 months ago
Last Updated
yesterday
Language
Rust
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category