From matrix
Detects dead code, unused exports, orphaned files, circular dependencies, unused packages, stale TODOs, and hygiene issues across 11 categories. Use scan, safe, aggressive modes on full codebase or paths.
npx claudepluginhub ojowwalker77/claude-matrix --plugin matrixThis skill is limited to using the following tools:
Comprehensive codebase hygiene analysis. Detects dead code, unused imports, orphaned files, circular dependencies, stale TODOs, unnecessary comments, overengineered dependencies, and more across 11 categories.
Analyzes entropy to find and safely remove unused exports, dead files, pattern violations, orphaned dependencies, and stale constraints after refactoring or for periodic hygiene.
Analyzes JavaScript/TypeScript codebases for unused code (files/exports/types/deps), duplication, circular dependencies, complexity hotspots, architecture violations, and feature flags via static (free) and optional runtime layers.
Identifies unused imports, variables, functions, unreachable code, dependencies, and CSS for safe removal. Generates reports categorizing safe-to-remove, potentially unused, and review-required items.
Share bugs, ideas, or general feedback.
Comprehensive codebase hygiene analysis. Detects dead code, unused imports, orphaned files, circular dependencies, stale TODOs, unnecessary comments, overengineered dependencies, and more across 11 categories.
Tip: This skill runs in a forked context for unbiased analysis - clean slate, no conversation history bias.
ORCHESTRATOR (parse mode, dispatch agents, aggregate report)
|
+-- STRUCTURAL AGENT --> dead exports, orphaned files, unused imports
+-- CIRCULAR DEP AGENT --> import cycle detection
+-- DEPENDENCY AGENT --> unused npm packages, overengineered deps
+-- GENERATIVE AGENT --> comments, console.log, copy-paste, TODOs
+-- TRIAGE AGENT --> confidence scoring, safety filtering, tiering
Parse user arguments from the skill invocation (text after the trigger phrase).
Expected format: /nuke [mode] [path]
| Mode | Command | Behavior |
|---|---|---|
| Scan | /nuke or /nuke scan | Report only - touch nothing (default) |
| This | /nuke this <file> | Single file analysis |
| Safe | /nuke safe | Report HIGH confidence only (>90%) |
| Aggressive | /nuke aggressive | Report MEDIUM+ confidence (>70%) |
Append a path to any mode to limit scope:
/nuke scan src/api/ - only scan src/api//nuke this src/utils/auth.ts - single file/nuke # Full scan, report only
/nuke scan # Same as above
/nuke this src/utils/auth.ts # Single file analysis
/nuke scan src/api/ # Scan specific directory
/nuke safe # High-confidence findings only
/nuke aggressive # Medium+ confidence findings
Follow the orchestration detailed in references/nuke-pipeline.md:
matrix_index_status), detect entry points from package.json, parse modematrix_find_dead_code for dead exports + orphaned filesmatrix_find_circular_deps for import cyclesGrepreferences/output-format.mdEarly exit for /nuke this: Only run Structural + Generative agents on that single file. Skip dependency and circular dep analysis.
Graceful degradation: If index is unavailable, fall back to Grep-based analysis. Report reduced accuracy.
// increment i, // constructor){, =, function, return)console.log and console.debug left from debugging (NOT console.error)lodash.get -> ?., moment -> Intl)See references/safety-rules.md for full details. Key rules:
references/nuke-pipeline.md - Full orchestrator pipelinereferences/agents/structural-agent.md - Dead code detection via MCP toolsreferences/agents/generative-agent.md - AI-judged detection patternsreferences/agents/dependency-agent.md - Package analysis and native alternativesreferences/agents/triage-agent.md - Confidence scoring and safety filteringreferences/safety-rules.md - Entry point detection, what NOT to flagreferences/output-format.md - Report template