# Deadcode

> Detect and optionally remove dead code in the Go codebase. Usage: /deadcode [fix] [<path>]

- Skill: `future-architect/deadcode` (Agent Skill)
- Install (CLI): `npx skillmds@latest add future-architect/deadcode`
- Raw SKILL.md: https://api.skillmd.com/api/skills/future-architect/deadcode/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: future-architect (https://skillmd.com/u/future-architect)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/future-architect/deadcode

---


# /deadcode — Dead Code Detection & Removal

> **Full specification**: See `.github/prompts/deadcode.prompt.md` for the complete
> detection procedure, classification rules, output format, and safety rules.

## Quick Reference

- **Audit mode** (default): `/deadcode` — detect and report only
- **Fix mode**: `/deadcode fix` — detect, remove SAFE items, confirm CAREFUL items
- **Scoped**: `/deadcode internal/infrastructure/` — limit to a package path
- Detection: `go vet`, `go build`, `deadcode ./...`, `go mod tidy -v`, manual grep
- Classify: SAFE / CAREFUL / RISKY
- After each removal batch: `go build ./... && go test ./... && go vet ./...`
- Never auto-remove `pkg/uzomuzo/` public API or reflect/generate/linkname targets

