Matrix Nuke
БесплатноБез исполняемых скриптовНе проверенThis skill should be used when the user asks to "nuke dead code", "find unused exports", "clean up imports", "find orphaned files", "detect circular deps"…
от ojowwalker77★ 110 звёзд на GitHubОб этом скилле
Matrix Nuke
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.
Architecture
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
Usage
Parse user arguments from the skill invocation (text after the trigger phrase).
Expected format: /nuke [mode] [path]
Modes
| 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%) |
Path Filtering
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
Examples
/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
Pipeline
Follow the orchestration detailed in references/nuke-pipeline.md:
- Pre-flight - Check index availability (
matrix_index_status), detect entry points from package.json, parse mode - Structural Analysis - Use
matrix_find_dead_codefor dead exports + orphaned files - Circular Dep Detection - Use
matrix_find_circular_depsfor import cycles - Dependency Analysis - Read package.json, cross-reference with actual imports via
Grep - Generative Analysis - AI inspection of files for comments, console.log, duplication, TODOs
- Triage - Apply safety rules, assign confidence scores, classify into tiers
- Report - Generate formatted output per
references/output-format.md
Early 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.
What Gets Detected (11 Categories)
Structural (deterministic, via MCP tools)
- Dead exports - exported symbols with zero callers across the codebase
- Orphaned files - files that nothing imports (excluding entry points)
- Circular dependencies - import cycles in the dependency graph
- Unused npm packages - in package.json but never imported
- Unused imports - imports brought in but never referenced in the file
Generative (AI judgment required)
- Unnecessary comments - obvious/redundant comments (
// increment i,// constructor) - Commented-out code - dead code hiding in comments (contains
{,=,function,return) - Console.log leftovers -
console.logandconsole.debugleft from debugging (NOTconsole.error) - Overengineered deps - libraries replaceable with native APIs (
lodash.get->?.,moment->Intl) - Copy-paste duplication - near-identical code blocks (5+ similar consecutive lines)
- Stale TODO/FIXME - ancient TODOs with no linked issues and old git blame dates
Safety Rules
See references/safety-rules.md for full details. Key rules:
- Never flag entry points - index.ts, main.ts, bin/*, package.json main/module/exports
- Never flag framework conventions - pages/, routes/, app/, .config., migrations/
- Never flag dynamically imported modules - import(), require() references
- Never flag public API surface - root barrel exports, @public JSDoc
- Respect .nukeignore - if present, honor it like .gitignore
Additional Resources
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
Установить Matrix Nuke в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
mcp__plugin_matrix_matrix__matrix_find_dead_codemcp__plugin_matrix_matrix__matrix_find_circular_depsmcp__plugin_matrix_matrix__matrix_find_callersmcp__plugin_matrix_matrix__matrix_find_definitionmcp__plugin_matrix_matrix__matrix_search_symbolsmcp__plugin_matrix_matrix__matrix_list_exportsmcp__plugin_matrix_matrix__matrix_get_importsmcp__plugin_matrix_matrix__matrix_index_statusmcp__plugin_matrix_matrix__matrix_recallmcp__plugin_matrix_matrix__matrix_storemcp__plugin_matrix_matrix__matrix_failuremcp__plugin_matrix_context7__resolve-library-idmcp__plugin_matrix_context7__query-docsReadGrepGlobBashВложенные файлы
FAQ
Что делает скилл Matrix Nuke?
This skill should be used when the user asks to "nuke dead code", "find unused exports", "clean up imports", "find orphaned files", "detect circular deps", "cleanup codebase", "find unused packages", "remove dead code", "nuke this", "nuke unused", or needs comprehensive codebase hygiene analysis.
Как установить скилл Matrix Nuke?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Matrix Nuke запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic