Skip to content
Skillpedia
General coding8.1k Β· #12566

code-health

What it does

This skill helps your AI judge how healthy a codebase is and which files are hardest to maintain. It is for developers who want to plan cleanup or refactoring work based on evidence.

When to use it

  • βœ“When you ask how healthy the codebase is or what should be cleaned up next.
  • βœ“When you plan or finish a refactor and want a before and after comparison.
  • βœ“When you want to know why a specific file is flagged as risky or hard to maintain.

Skill link

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

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/repowise-dev/repowise/blob/main/plugins/claude-code/skills/code-health/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œShow me the riskiest files in this project and what I should refactor first.”

5 new skills a week. 1 minute to read.

How it works

The skill runs Repowise health checks that score each file from 1 to 10 using measurable signals such as complexity and untested hotspots. It returns a ranked list of what to fix first, or details for specific files.

Technical content (original SKILL.md)

Original text by the author, straight from 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 /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.

FAQ

What does a low score mean?

The skill says a low score means a file is more likely to hide bugs, not just that it is large.

Can I check only a few files?

Yes. You can name specific files to get their scores and the findings behind them.

Does it use an AI model to judge the code?

No. The skill describes the analysis as deterministic and local, with no model calls.

Details

Original description by the author

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

repo: repowise-dev/repowise

Popularity

GitHub stars
8.1k
Ranking position
#12566
License
AGPL-3.0
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills