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

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 a task asks about code quality, complexity or technical debt.
  • βœ“When you want to know which risky or hard-to-maintain files to refactor next.
  • βœ“When you need a before and after health comparison for a refactor.

Skill link

https://github.com/repowise-dev/repowise/blob/main/plugins/codex/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/codex/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

β€œWhich files in this project are untested hotspots that 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. It returns a ranked list of what to fix first, or the findings for files you name.

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 /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.

FAQ

Does a low score mean a big file?

No. The skill says a low score means the file is more likely to hide bugs.

Can it show coverage gaps?

Yes, when coverage data has been added to the project.

Does it use an AI model for the scores?

No. The scoring is deterministic and local.

Details

Original description by the author

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

Popularity

GitHub stars
8.1k
Ranking position
#12571
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