본문으로 건너뛰기
Skillpedia
일반 코딩8.1k · #12568

dead-code-cleanup

하는 일

이 스킬은 AI가 죽은 코드를 찾고 제거할 만한 것을 제안하도록 돕습니다. 어수선함, 번들 크기, 기술 부채를 줄이려는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓사용하지 않는 코드를 지우거나 프로젝트 크기를 줄이라고 요청할 때.
  • ✓도달할 수 없는 파일, 쓰지 않는 export, 남은 패키지를 찾고 싶을 때.
  • ✓신뢰도 순으로 정렬된 목록이 필요한 정리를 계획하는 경우.

스킬 링크

https://github.com/repowise-dev/repowise/blob/main/plugins/claude-code/skills/dead-code-cleanup/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/repowise-dev/repowise/blob/main/plugins/claude-code/skills/dead-code-cleanup/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 프로젝트에서 지워도 안전한 죽은 코드를 찾고, 각 항목이 쓰이지 않는 것으로 보이는 이유를 보여 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 스킬은 신뢰도 순으로 정렬된 죽은 코드 결과를 Repowise에 요청합니다. 안전으로 표시된 항목만 삭제를 제안하고, 신뢰도가 낮은 항목은 조사할 대상으로 보여 줍니다. 무엇이든 삭제하기 전에 사용자에게 확인을 요청합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Dead Code Cleanup with Repowise

Repowise detects dead code through graph analysis — no LLM needed, works even with a template-rendered wiki.

When the user asks about dead/unused code

Call get_dead_code() to get findings sorted by confidence tier. Useful parameters:

  • safe_only=true — only findings confirmed safe to delete (confidence >= 0.7)
  • kind="unreachable_file" — files with no importers
  • kind="unused_export" — public symbols nobody uses
  • kind="zombie_package" — monorepo packages with no consumers
  • directory="src/old/" — limit to a specific directory
  • tier="high" — only high-confidence findings (>= 0.8)
  • min_confidence=0.7 — raise the floor (default is 0.5) for a release-ready cleanup
  • group_by="directory" or group_by="owner" — roll up to see where the dead code concentrates and who owns the most of it

How to present findings

  • Only suggest deletion for findings with safe_to_delete: true
  • For lower-confidence findings, present them as "candidates to investigate" not "things to delete"
  • Dynamically-loaded code (plugins, handlers, adapters) may appear as dead code but isn't — Repowise filters common patterns but edge cases exist

Before deleting anything

  1. Confirm with the user. Present the file/symbol name, confidence score, and why Repowise thinks it's dead.
  2. Call get_risk(targets=["path/to/file"]) to double-check dependents.
  3. Recently-modified "dead" code is more likely a false positive — flag this if the finding has recent git activity.

Safe deletion order

  1. Unreachable files first (whole file removal, cleanest)
  2. Unused internal symbols next
  3. Unused exports last (highest false-positive risk due to potential dynamic imports)
자주 묻는 질문

스킬이 혼자서 코드를 지우나요?

아닙니다. 삭제하기 전에 각 항목을 사용자에게 확인받습니다.

플러그인이나 동적 코드에서 틀릴 수 있나요?

네. 동적으로 불러오는 코드는 쓰이지 않는 것처럼 보일 수 있어서, 예외 상황이 있다고 경고합니다.

삭제 전에 무엇을 확인하나요?

추천하기 전에 위험 검사를 사용해 그 파일에 대한 의존성을 먼저 확인합니다.

상세 정보

작성자의 원본 설명

Use when the user asks about cleanup, removing unused code, refactoring, reducing bundle size, or identifying dead code in a Repowise-indexed codebase (.repowise/ directory exists). Also activates when discussing technical debt, code hygiene, or repository maintenance.

repo: repowise-dev/repowise

인기도

GitHub 스타
8.1k
순위
#12568
라이선스
AGPL-3.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬