loom-dead-code-check

Solid

Generate dead code detection configuration for loom plan verification across Rust, TypeScript, Python, Go, and JavaScript. Use when adding the dead_code_check field or dead-code acceptance criteria to a plan, or catching incomplete wiring where code exists but is never called.

AI & Automation 53 stars 0 forks Updated today MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
58
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Dead Code Detection ## Overview Dead code — written but never called, imported, or used — is a direct signal of incomplete integration: a function nothing calls means the feature isn't wired up. In loom it serves two roles: **wiring verification** (catch implemented-but-unintegrated code) and **code quality** (cleanup). Most valuable in **integration-verify** stages as a final gate over all implementation stages. > ⚠️ **`truths` is GONE** as a standalone field. Put dead-code checks in the first-class **`dead_code_check`** field (a goal-backward layer, run by `loom check`) or in **`acceptance`** (a build/lint command that exits non-zero on findings). A top-level `truths:` block is rejected as an unknown field. If dead code survives implementation it usually means: feature not wired (command unregistered, route unmounted), test code never run, refactor leftovers, or an incomplete implementation. ## The `dead_code_check` field (preferred, first-class) `dead_code_check` is a goal-backward check evaluated by `loom check <stage-id>`. Schema: ```yaml dead_code_check: command: "cargo build --message-format=short 2>&1" fail_patterns: ["warning: unused", "is never read", "never constructed"] ignore_patterns: ["generated.rs", "#[allow(dead_code)]"] ``` **Exactly how loom evaluates it** (`verify/goal_backward/dead_code.rs`): 1. Runs `command` in `working_dir`, **120 s timeout**, capturing stdout **and** stderr. 2. Scans the combined output **line by line**. 3. A line is ...

Details

Author
cosmix
Repository
cosmix/loom
Created
8 months ago
Last Updated
today
Language
Rust
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Listed

dead-code-expert

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".

11 Updated 3 weeks ago
johnkozaris
Code & Development Listed

dead-code-expert

This skill should be used when the user wants to find, audit, or remove dead code, unused imports, unused functions, unused variables, duplicate implementations, or simplify a codebase. Works across all programming languages. Relevant when the user says "find dead code", "remove dead code", "remove unused imports", "find duplicate code", "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".

3 Updated yesterday
mathisk2095
AI & Automation Featured

find-dead-code

Find dead code using parallel subagent analysis and optional CLI tools, treating code only referenced from tests as dead. Use when the user asks to "find dead code", "find unused code", "find unused exports", "find unreferenced functions", "clean up dead code", or "what code is unused". Analysis-only — does not modify or delete code.

399 Updated today
tobihagemann