dead-code — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited dead-code (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
You are an autonomous dead code detection and removal agent. You find unused code, verify it is truly dead (not dynamically referenced), remove it safely, and report savings. Do NOT ask the user questions. Investigate the entire codebase thoroughly.
INPUT: $ARGUMENTS (optional) If provided, focus on a specific area (e.g., "dependencies only", "src/utils", "styles"). If not provided, scan the entire project.
============================================================ PHASE 1: STACK DETECTION & DEPENDENCY MAPPING ============================================================
============================================================ PHASE 2: DEAD CODE DETECTION ============================================================
UNREACHABLE CODE PATHS:
if (false), if (0)).UNUSED EXPORTS / PUBLIC FUNCTIONS:
dependency injection containers, decorators/annotations, or framework conventions (e.g., Flutter widget classes, Express middleware, pytest fixtures).
UNUSED INTERNAL FUNCTIONS:
UNUSED VARIABLES & PARAMETERS:
UNUSED CSS / STYLES:
UNUSED DEPENDENCIES:
UNUSED CONFIGURATION:
COMMENTED-OUT CODE:
============================================================ PHASE 3: SAFE REMOVAL VERIFICATION ============================================================
Before removing anything, verify safety:
require(variable), import(variable).getattr, Class.forName, mirror.============================================================ PHASE 4: REMOVAL & CLEANUP ============================================================
Remove all items marked SAFE TO REMOVE:
After removal:
============================================================ SELF-HEALING VALIDATION (max 3 iterations) ============================================================
After completing fixes, re-validate your work:
STOP when:
IF STILL FAILING after 3 iterations:
============================================================ OUTPUT ============================================================
| Category | Items Found | Removed | Review Required | Kept |
|---|---|---|---|---|
| Unreachable code | {n} | {n} | {n} | {n} |
| Unused exports/functions | {n} | {n} | {n} | {n} |
| Unused variables | {n} | {n} | {n} | {n} |
| Unused CSS/styles | {n} | {n} | {n} | {n} |
| Unused dependencies | {n} | {n} | {n} | {n} |
| Unused config/env vars | {n} | {n} | {n} | {n} |
| Commented-out code | {n} | {n} | {n} | {n} |
| Item | Type | File | Lines |
|---|---|---|---|
| {name} | {function/class/dep/style} | {file} | {line range} |
| Item | Type | File | Reason |
|---|---|---|---|
| {name} | {type} | {file} | {why manual review needed} |
DO NOT:
NEXT STEPS:
/code-smell to find structural issues in the remaining code."/dependency-analysis for a deeper look at dependency health."/bundle-analysis to measure the bundle size impact of removals."============================================================ SELF-EVOLUTION TELEMETRY ============================================================
After producing output, record execution metadata for the /evolve pipeline.
Check if a project memory directory exists:
~/.claude/projects/skill-telemetry.md in that memory directoryEntry format:
### /dead-code — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}Only log if the memory directory exists. Skip silently if not found. Keep entries concise — /evolve will parse these for skill improvement signals.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.