Find and remove dead code and stale documentation. Covers unused functions, orphaned files, dead links, and outdated references. Use for maintenance, pre-release cleanup, or codebase hygiene. Triggers: clean, dead code, unused, orphan, stale, cruft, maintenance.
Expert guidance for finding and removing cruft in addon codebases.
| Task | MCP Tool |
|------|----------|
| Find Dead Code | addon.deadcode(addon="MyAddon") |
| Find Stale Docs | docs.stale(addon="MyAddon") |
| Filter by Confidence | addon.deadcode(addon="MyAddon", include_suspicious=false) |
addon.deadcode)| Category | Description |
|----------|-------------|
| unused_function | Functions defined but never called |
| orphaned_file | Lua files not in TOC |
| dead_export | Exported values never used |
| unused_library | Libraries in Libs/ never used |
| stale_event | Event handlers for unregistered events |
| commented_code | Large blocks of commented-out code |
docs.stale)| Category | Description |
|----------|-------------|
| dead_link | Internal links to non-existent files |
| dead_reference | Mentions of functions/files that don't exist |
| version_drift | Old version numbers in documentation |
| relative_staleness | Docs not updated in many commits |
addon.deadcode with include_suspicious=false for high-confidence issues onlydocs.stale to find documentation issuesaddon.deadcode with all confidence levelsdocs.stale with all techniques| Level | Meaning | Action | |-------|---------|--------| | Definite | 100% certain (e.g., file not in TOC) | Safe to remove | | Likely | 90%+ certain (e.g., function never called) | Review briefly, usually safe | | Suspicious | 70%+ certain (e.g., dynamic code patterns) | Manual verification required |
_G, rawget, loadstring may hide usage-- KEEP: comment if neededdocs.stale after refactoringSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer