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

code-health

하는 일

이 스킬은 AI가 코드베이스가 얼마나 건강한지, 어떤 파일을 유지보수하기 가장 어려운지 판단하도록 돕습니다. 근거에 기반해 정리나 리팩터링을 계획하려는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓작업이 코드 품질, 복잡도 또는 기술 부채에 관한 것일 때.
  • ✓다음에 리팩터링해야 할 위험하거나 유지보수가 어려운 파일을 알고 싶을 때.
  • ✓리팩터링 전후의 건강도 비교가 필요한 경우.

스킬 링크

https://github.com/repowise-dev/repowise/blob/main/plugins/codex/skills/code-health/SKILL.md

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

사용 방법

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

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

Use this skill to help me: https://github.com/repowise-dev/repowise/blob/main/plugins/codex/skills/code-health/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분.

작동 방식

이 스킬은 측정 가능한 신호로 각 파일에 1~10점을 매기는 Repowise 건강 검사를 실행합니다. 먼저 고쳐야 할 순서의 목록이나 지정한 파일의 결과를 돌려줍니다.

기술 내용 (원본 SKILL.md)

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

Code Health with Repowise

Repowise scores every file 1–10 from deterministic markers — McCabe complexity, deep nesting, brain methods, class cohesion (LCOM4), god classes, clone detection, untested hotspots, function-level churn, ownership dispersion, and more. Zero LLM calls; pure local analysis. The weights are calibrated against a real defect corpus, so a low score means more likely to harbour bugs, not just bigger.

Pick the mode by what you pass

  • Dashboard: get_health() (no targets): fix_first, the ranked list of what to fix first, then repo-level KPIs and the lowest-scoring files. Start here for "how healthy is this codebase?" or "what should we clean up?".
  • Targeted — get_health(targets=["src/x.py", "src/y.py"]): per-file score and the specific marker findings driving it. Use before/after a refactor, or to explain why a file is flagged.

Useful include flags

get_health(targets=[...], include=[...]):

  • "biomarkers" — always return the findings list (what's wrong, where).
  • "refactoring" — deterministic, ranked refactoring suggestions (by impact/effort).
  • "coverage" — surface coverage data when it's been ingested.
  • "trend" — recent health snapshots + declining / predicted-decline signal.

include adds blocks; only=[...] subtracts them.

How to use the results

  1. For "what should I refactor?" → dashboard mode, lead with fix_first; open an item with get_health(fix_id=...) for its steps and the tests to run, and present the plan, not just the scores.
  2. Rank by weighted_deficit, not score — the score floors at 1.0.
  3. For a specific file → report the score, the top 2–3 marker findings, and what each one means in plain language. Avoid dumping the raw payload.
  4. Check unresolved before calling a file clean: a target listed there matched nothing, and not_indexed means run repowise update.
  5. Before editing a flagged file → cross-check get_risk(targets=[...]); a file that is both low-health and a churn hotspot deserves the most care.
  6. Untested-hotspot / coverage questions → tell the user coverage markers light up once they ingest a report: repowise coverage add cov.lcov (LCOV / Cobertura / Clover; a coverage.py .coverage also builds the per-test map), then repowise health --recompute to fold it into the scores.

CLI equivalents

  • repowise health — KPIs + lowest-scoring files
  • repowise health --refactoring-targets — ranked by impact / effort
  • repowise health --trend — snapshots + declining alerts
  • repowise coverage add <file> — ingest coverage, light up untested-hotspot

Error handling

If get_health reports no repository, suggest /prompts:repowise-init. Code health is computed even with a template-rendered wiki (no LLM needed), so it should be available whenever the repo is indexed.

자주 묻는 질문

낮은 점수는 큰 파일을 뜻하나요?

아닙니다. 낮은 점수는 파일이 버그를 숨기고 있을 가능성이 높다는 뜻이라고 스킬이 설명합니다.

커버리지 공백도 보여 주나요?

네. 프로젝트에 커버리지 데이터가 추가되어 있으면 보여 줄 수 있습니다.

점수에 AI 모델을 쓰나요?

아닙니다. 점수 매기기는 결정적이고 로컬에서 이루어집니다.

상세 정보

작성자의 원본 설명

Use when the user asks about code health, code quality, complexity, technical debt, risky or hard-to-maintain files, what to refactor next, untested hotspots, or coverage gaps in a Repowise-indexed codebase (.repowise/ directory exists). Also use for before/after health reads when planning or finishing a refactor.

repo: repowise-dev/repowise

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬