This skill helps you clean WoW addon code by finding dead code and stale docs, guiding safe removal and hygiene improvements.
npx playbooks add skill falkicon/mechanic --skill s-clean
Guidance for finding and removing cruft safely. Both analyzers are read-only; removing things is your job and must be verified.
| Task | MCP Tool |
|------|----------|
| Dead code | addon.deadcode(addon="MyAddon") |
| High-confidence only | addon.deadcode(addon="MyAddon", include_suspicious=false) |
| Stale docs | docs.stale(addon="MyAddon") |
Inputs: addon, path, include_suspicious, limit (default 200, max 2000), plus categories for deadcode and commits_threshold (default 10) for docs.stale. Check truncated, total_issues and read_errors in every result: a capped or partly unreadable result is not a complete cleanup list.
addon.deadcode| Category | Description |
|---|---|
| orphaned_file | Lua file not listed in the TOC (or loaded by XML) |
| unused_function | Function defined but never referenced |
| unused_local | Local assigned but never read |
| unused_library | Library under Libs/ nothing uses |
| stale_event | Event registered while the OnEvent handler is empty |
| dead_export | Exported value referenced only inside its own file |
| unused_locale | Locale key never used |
| unreachable_code | Statements after return/break in the same block |
| commented_code | Large commented-out blocks |
docs.stale| Category | Description |
|---|---|
| dead_link | Link to a file that does not exist |
| dead_reference | Mention of a function or file that does not exist |
| version_drift | Old version numbers (code blocks and CHANGELOG/HISTORY files are ignored) |
| relative_staleness | Doc not updated while many code commits landed |
addon.deadcode with include_suspicious=false; fix definite and likely items first._G[...], string-built names, XML scripts, TOC, hooksecurefunc targets, MechanicLib capabilities, SavedVariables migrations).addon.lint and the tests after each group.docs.stale; fix dead links and drifted versions, then re-run both analyzers to confirm.| Level | Meaning | Action |
|---|---|---|
| definite | Provable (for example a file not in any TOC) | Safe after a quick look |
| likely | Strong static evidence | Review briefly |
| suspicious | Possible dynamic use | Verify manually |
The analyzers do not honour suppression comments; record intentional dead code in the review notes instead. Rerun docs.stale after refactors.
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.