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.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
β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
- 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 /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
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.
codebase-exploration
8.1kHelps your agent understand an unfamiliar project quickly by answering how code works, who calls what and where things are built.
dead-code-cleanup
8.1kHelps your agent find unused code, unreachable files and unused exports in a project, so you can clean them up safely.
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.