- name
SKILL.md
Файл навыка остаётся в репозитории издателя.
Вставьте скопированную команду в терминал. Она установит этот SKILL.md в выбранного агента.
npx skills add omagents/omagents --skill remove-deadcode -a cursor -yВставьте скопированную команду в терминал. Она установит этот SKILL.md в выбранного агента.
npx skills add omagents/omagents --skill remove-deadcode -a claude-code -yВставьте скопированную команду в терминал. Она установит этот SKILL.md в выбранного агента.
npx skills add omagents/omagents --skill remove-deadcode -a codex -yВставьте скопированную команду в терминал. Она установит этот SKILL.md в выбранного агента.
npx skills add omagents/omagents --skill remove-deadcode -a grok -yОтправьте скопированное сообщение в чат Grok Bot. Бот загрузит этот SKILL.md с GitHub и добавит его к навыкам, общим для всех ваших ботов.
Install this skill: https://github.com/omagents/omagents/tree/HEAD/packages/core/skills/remove-deadcodeОт издателя
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.mdОбзор
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
Скачайте packages/core/skills/remove-deadcode/SKILL.md у издателя или скопируйте путь и откройте репозиторий. PlugMCP только показывает навык в каталоге и не хранит файл.
Издатель хранит его в https://github.com/omagents/omagents.
Claude, Cursor, Codex и Grok Build могут читать SKILL.md, который вы добавляете из репозитория издателя. Grok Bot устанавливает его, когда вы отправляете в чат ссылку на папку навыка на GitHub.