inspect

Audits named code components for duplication, dead code, and logic bugs, producing severity-labelled findings and a plan document.

Updated Aug 10, 2026
One-click install
npx skills add https://github.com/ledtorch/coding-agent-workflow --skill inspect-ledtorch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: inspect
Source: https://github.com/ledtorch/coding-agent-workflow/tree/main/skills/inspect
Command: npx skills add https://github.com/ledtorch/coding-agent-workflow --skill inspect-ledtorch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate duplication, dead code, wrong-sized abstractions, and logic bugs that surface only after they cause damage. This Skill performs a rigorous, read-only audit of named files or components and turns what it finds into a prioritized, evidence-backed plan you approve before any code changes. ## Core Features & Use Cases - Six structured detections: duplicated logic and values, dead code, wrong-sized abstractions, logic bugs, and cost/boundary issues, each requiring file:line evidence and a concrete failure scenario. - Neighbourhood mapping: traces importers, shared constants, contracts, and sibling components beyond the named targets, since duplicates by definition live in files you were not given. - Severity-labelled plan output: findings are ranked Critical through FYI, each with a proposed remedy and consumer count, then written into a refact plan doc that is red-teamed before you see it. - Use Case: Point it at two overlapping modules before building on them; it proves which copy should survive, flags an unenforced schema cap, and delivers a sequenced fix plan without editing a single line of code. ## Quick Start Ask the agent to run /inspect on the specific files or components you want audited, for example: run /inspect on src/stores/session.ts and src/api/auth.ts.

Frequently Asked Questions about inspect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit specific files for duplication and dead code with an AI agent?

Run /inspect with the target file paths named explicitly. The skill reads each target in full, maps neighbouring files that share symbols, values, or contracts, then reports findings with file:line evidence and severity labels without modifying any code.

What is the difference between /inspect and a code review of a diff?

Code review examines a proposed diff before merge, while /inspect audits existing code that is already in the tree. Use /inspect when components overlap, a file has grown unmaintainable, or logic needs verification before building on it.

Does /inspect modify or fix the code it audits?

No. /inspect is strictly read-only except for writing its plan document and deleting a superseded build plan. All fixes wait for user approval and are executed separately through /build.

How does /inspect prove that code is actually dead?

It greps the symbol repo-wide, including lazy route imports, star-imports, re-exports, and dynamic attribute access. It also distinguishes imports from actual calls, since deleting a symbol referenced only by an unused import can still break startup.

When should I not use /inspect?

Skip /inspect for reviewing a pending diff (use /code-review), shrinking prose in one file (use /trim), or breaking an understood spec into tasks (go straight to /plan). Security verdicts are handed to /security-review.