- name
SKILL.md
The skill file stays in the publisher's repository.
Paste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add omagents/omagents --skill remove-deadcode -a cursor -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add omagents/omagents --skill remove-deadcode -a claude-code -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add omagents/omagents --skill remove-deadcode -a codex -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add omagents/omagents --skill remove-deadcode -a grok -ySend the copied message in a Grok Bot chat. The Bot fetches this SKILL.md from GitHub and adds it to the skills all your Bots share.
Install this skill: https://github.com/omagents/omagents/tree/HEAD/packages/core/skills/remove-deadcodeFrom the publisher
Systematically find and remove dead code using a durable task queue. Each candidate is verified as truly dead, removed, tested, and recorded before moving to the next.
Scan the codebase for dead code candidates:
# Find unused imports
grep -rn "^import\|^from" --include="*.py" --include="*.ts" --include="*.js"
# Find potentially unreferenced functions (use codegraph)
codegraph_codegraph_explore query="all function names"
# Find commented-out code
grep -rn "^\s*#.*=\|^\s*//.*=" --include="*.py" --include="*.ts" --include="*.js"
For each candidate, verify it's not an exception before adding to queue.
Initialize the loop:
loop_engine.py init remove-deadcode '[
{"file": "src/utils.py", "line": 12, "type": "unused-import", "name": "os", "description": "Remove unused import os from utils.py"},
{"file": "src/old_api.py", "line": 1, "type": "unreferenced-file", "name": "old_api.py", "description": "Remove unreferenced old_api.py"},
{"file": "src/helpers.ts", "line": 45, "type": "unreferenced-function", "name": "oldHelper()", "description": "Remove unreferenced oldHelper() from helpers.ts"}
]'
Repeat until next returns null:
Step 1: Get next task
loop_engine.py next remove-deadcode
If output is null, go to Phase 3.
Step 2: Verify the candidate is truly dead
Double-check using grep:
grep -rn "<name>" --include="*.py" --include="*.ts" --include="*.js"
Check for dynamic references:
grep -rn "import(\|__import__\|require(" --include="*.py" --include="*.ts"
If references are found, mark complete with "not dead - referenced in X":
loop_engine.py complete remove-deadcode <id> "not dead - referenced in src/main.py:23"
Step 3: Remove the dead code
Edit the file to remove the import, function, or file.
Step 4: Verify
# Run tests
npm test 2>/dev/null || pytest tests/ 2>/dev/null || true
# Run linter
ruff check <file> 2>/dev/null || npx eslint <file> 2>/dev/null || true
Step 5: Record result
If verification passes:
loop_engine.py complete remove-deadcode <id> "Removed unused import os"
If tests fail:
loop_engine.py fail remove-deadcode <id> "test_utils.py failed after removal"
loop_engine.py summary remove-deadcode
Present the summary. For blocked tasks, show what failed and suggest the user review manually.
Find and remove unreferenced code using a durable loop workflow. Each candidate is verified, removed, tested, and marked complete before moving to the next. Trigger when the user says 'remove dead cod
---name: remove-deadcodedescription: Find and remove unreferenced code using a durable loop workflow. Each candidate is verified, removed, tested…---# packages/core/skills/remove-deadcode/SKILL.mdOverview
Find and remove unreferenced code using a durable loop workflow. Each candidate is verified, removed, tested, and marked complete before moving to the next. Trigger when the user says 'remove dead code', 'clean unused code', 'find unused'.
FAQ
Download packages/core/skills/remove-deadcode/SKILL.md from the publisher, or copy the path and open the repository. PlugMCP lists the skill and does not host the file.
The publisher keeps it at https://github.com/omagents/omagents.
Claude, Cursor, Codex, and Grok Build can read a SKILL.md you add from the publisher's repository. Grok Bot installs it when you send the skill's GitHub folder link in a chat.