- name
SKILL.md
File skill tetap berada di repositori penerbit.
Tempel perintah yang disalin di terminal. Perintah itu memasang SKILL.md ini ke agen tersebut.
npx skills add omagents/omagents --skill remove-deadcode -a cursor -yTempel perintah yang disalin di terminal. Perintah itu memasang SKILL.md ini ke agen tersebut.
npx skills add omagents/omagents --skill remove-deadcode -a claude-code -yTempel perintah yang disalin di terminal. Perintah itu memasang SKILL.md ini ke agen tersebut.
npx skills add omagents/omagents --skill remove-deadcode -a codex -yTempel perintah yang disalin di terminal. Perintah itu memasang SKILL.md ini ke agen tersebut.
npx skills add omagents/omagents --skill remove-deadcode -a grok -yKirim pesan yang disalin di chat Grok Bot. Bot mengambil SKILL.md ini dari GitHub dan menambahkannya ke skill yang dipakai bersama oleh semua Bot Anda.
Install this skill: https://github.com/omagents/omagents/tree/HEAD/packages/core/skills/remove-deadcodeDari penerbit
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.mdRingkasan umum
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
Unduh packages/core/skills/remove-deadcode/SKILL.md dari penerbit, atau salin path-nya dan buka repositori. PlugMCP hanya mendaftar skill ini dan tidak meng-host filenya.
Penerbit menyimpannya di https://github.com/omagents/omagents.
Claude, Cursor, Codex, dan Grok Build bisa membaca SKILL.md yang Anda tambahkan dari repositori penerbit. Grok Bot memasangnya saat Anda mengirim tautan folder GitHub skill tersebut di chat.