dead-code-removal
/dead-code-removal
Identyfikuje nieużywane funkcje, klasy, eksporty i pliki, a następnie bezpiecznie je usuwa z kodu.
- Autor
- yeaight7 ↗
- Repozytorium
- agent-powerups ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 27.09.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 27.09.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
Co robi i kiedy
Identyfikuje nieużywane funkcje, klasy, eksporty i pliki, a następnie bezpiecznie je usuwa z kodu.
Oryginalny opis (EN)
Use when unused functions, classes, exports, or files need to be identified and safely deleted.
Jak działa
- Purpose
- When to Use
- Inputs
- Workflow
- Output
- Verification
- Failure Modes
Podgląd SKILL.md
--- name: dead-code-removal description: Use when unused functions, classes, exports, or files need to be identified and safely deleted. --- ## Purpose Dead code increases maintenance overhead and confuses developers. Verify a symbol is truly unused across the entire repository, then delete it outright — never comment it out. ## When to Use - A symbol, file, or export looks unused - A feature removal or migration left orphaned helpers behind - A coverage or lint report flags unreachable code ## Inputs - The candidate symbols/files to remove - The repo's test and type-check commands ## Workflow 1. **Verify unused — search the entire repository.** Do not assume code is dead just because the current file doesn't use it: ```bash grep -rn "symbolName" . --include="*.ts" --include="*.tsx" # all references grep -rn "from ['\"].*module-name" src/ # import sites git log -3 --oneline -- path/to/suspect-file # recent touches ``` Ecosystem tools can shortcut the inventory when available (e.g., knip or ts-prune for TypeScript exports, vulture for Python). 2. **Check for dynamic invocation.** Be wary of dynamically invoked code — reflection, dependency injection by string name, ORM mappers, route tables, config-driven dispatch: ```bash grep -rn "\"symbolName\"\|'symbolName'" . # string-keyed references ``` If there is any doubt, leave it alone or ask the user. 3. **Delete aggressively.** Once confirmed unused, delete the code. Do not comment it out. 4. **Prune dependencies.** If you delete the only code that was using an imported module, remove the import statement as well. 5. **Run tests.** Always run tests and/or type checkers (e.g., `tsc --noEmit`) after removal to ensure you didn't accidentally break a hidden dependency. ## Output - The deletion diff plus, per removed symbol, the search evidence that it was unused ## Verification - [ ] Whole-repo search performed per symbol — including string-keyed/dynamic references - [ ] No commented-out code left behind - [ ] Orphaned imports pruned along with the dead code - [ ] Tests and type checker green after removal ## Failure Modes - **Current-file blindness** — "this file doesn't use it" is not "the repo doesn't use it". - **Dynamic-invocation casualties** — reflection/DI/ORM references don't appear as imports; search string keys too. - **Commenting instead of deleting** — commented-out code is still dead code; git history already preserves it.
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · yeaight7/agent-powerups | 100 | Apache-2.0 |
| Amey-Thakur/AI-SKILLS | 90 | MIT |
Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.
Migawka bazy z 28.10.2026 · wersja paczki 324d2d83562a (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 84analyze-dead-code
Znajduje w repozytorium nieużywane eksporty, nieosiągalne moduły i martwe pliki, a następnie usuwa je z kodu. - 100fai-dead-code-removal
Znajduje i usuwa martwy kod w Pythonie i TypeScripcie: nieużywane eksporty, nieosiągalne gałęzie i osierocone pliki, z weryfikacją narzędziami. - 100find-dead-code
Znajduje nieużywane funkcje, klasy, importy i nieosiągalne ścieżki kodu, aby zmniejszyć rozmiar bazy kodu. - 100dead-code-finder
Wyszukuje martwy kod oraz nieużywane pliki, projekty, klasy i usługi w CC Director, które można bezpiecznie usunąć, żeby uprościć bazę kodu. - 100find-dead-code
Znajduje martwy kod: nieużywane funkcje, klasy, zmienne, importy, stałe i typy, z uwzględnieniem frameworków wstrzykiwania zależności, by uniknąć fałszywych alarmów. - 100knip-dead-code
Wykrywa martwy kod w JS i TS za pomocą Knip: nieużywane pliki, zależności, eksporty i typy, przy porządkowaniu kodu i kontroli zależności w CI.