code-health
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.
How do I install this agent skill?
npx skills add https://github.com/repowise-dev/repowise --skill code-healthIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill provides instructions for the agent to analyze code health and technical debt using the Repowise tool. It uses local deterministic metrics and does not perform network operations or access sensitive credentials.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
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:
repowise health: 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 —
repowise health --file src/x.py: one file's score and the specific marker findings driving it, to explain why a file is flagged.repowise health --score src/x.py --score src/y.pyscores files as they are on disk now; add--against <rev>for a before/after read around a refactor.
Useful flags
--refactoring-targets— deterministic, ranked refactoring suggestions (by impact/effort).--plan <ID>— one stored refactoring plan: its preconditions, steps and checks.--trend— recent health snapshots + declining signal.--scope production— leave tests, tooling and generated files out.--format json— machine output.
How to use the results
- For "what should I refactor?" → dashboard mode, lead with what to fix first;
repowise health --refactoring-targetsranks the queue andrepowise health --plan <ID>prints one plan's steps. 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 a file was scored at all before calling it clean; one the index does
not have yet needs
repowise update. - Before editing a flagged file → cross-check
repowise risk --target <path>; 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.
Error handling
If repowise 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.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/repowise-dev/repowise/code-health">View code-health on skillZs</a>