- name
SKILL.md
El archivo de la skill permanece en el repositorio del publicador.
Pega el comando copiado en una terminal. Instala este SKILL.md en ese agente.
npx skills add omagents/omagents --skill remove-deadcode -a cursor -yPega el comando copiado en una terminal. Instala este SKILL.md en ese agente.
npx skills add omagents/omagents --skill remove-deadcode -a claude-code -yPega el comando copiado en una terminal. Instala este SKILL.md en ese agente.
npx skills add omagents/omagents --skill remove-deadcode -a codex -yPega el comando copiado en una terminal. Instala este SKILL.md en ese agente.
npx skills add omagents/omagents --skill remove-deadcode -a grok -yEnvía el mensaje copiado en un chat de Grok Bot. El Bot obtiene este SKILL.md de GitHub y lo añade a las skills que comparten todos tus Bots.
Install this skill: https://github.com/omagents/omagents/tree/HEAD/packages/core/skills/remove-deadcodeDel publicador
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.mdResumen general
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'.
Preguntas frecuentes
Descarga packages/core/skills/remove-deadcode/SKILL.md desde el publicador, o copia la ruta y abre el repositorio. PlugMCP lista la skill y no aloja el archivo.
El publicador lo mantiene en https://github.com/omagents/omagents.
Claude, Cursor, Codex y Grok Build pueden leer un SKILL.md que añadas desde el repositorio del publicador. Grok Bot lo instala cuando envías en un chat el enlace a la carpeta de la skill en GitHub.