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.mdCopy 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
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
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
- For "what should I refactor?" β dashboard mode, lead with
fix_first; open an item withget_health(fix_id=...)for its steps and the tests to run, and present the plan, not just the scores. - Rank by
weighted_deficit, notscoreβ the score floors at 1.0. - 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.
- Check
unresolvedbefore calling a file clean: a target listed there matched nothing, andnot_indexedmeans runrepowise update. - 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. - 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.coveragealso builds the per-test map), thenrepowise health --recomputeto fold it into the scores.
CLI equivalents
repowise healthβ KPIs + lowest-scoring filesrepowise health --refactoring-targetsβ ranked by impact / effortrepowise health --trendβ snapshots + declining alertsrepowise 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
Comments
- β¦
More skills from this repository
architectural-decisions
8.1kHelps your agent find out why code is built a certain way, using recorded decisions and history before it changes an architecture.
change-review
8.1kHelps your agent review a pull request or set of changes before merging, showing the risk, the files affected and what else should change.
code-health
8.1kHelps your agent score code health file by file, find the riskiest files and pick what to refactor next, using Repowise analysis.
codebase-exploration
8.1kHelps your agent understand an unfamiliar project quickly by answering how code works, who calls what and where things are built.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.