architectural-decision…
Why code is built this way, before changing a pattern.
Code health, tech debt, what to refactor next.
Claude Code
$ npx -y skills add repowise-dev/repowise --skill code-health --agent claude-code
Codex
$ npx skills add repowise-dev/repowise --skill code-health -a codex -y
Cursor
$ npx skills add repowise-dev/repowise --skill code-health -a cursor -y
Gemini CLI
$ npx skills add repowise-dev/repowise --skill code-health -a gemini-cli -y
GitHub Copilot
$ npx skills add repowise-dev/repowise --skill code-health -a github-copilot -y
OpenCode
$ npx skills add repowise-dev/repowise --skill code-health -a opencode -y
Windsurf
$ npx skills add repowise-dev/repowise --skill code-health -a windsurf -y
name: code-health description: Code health, tech debt, what to refactor next. user-invocable: false
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*.
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?".
and the specific marker findings driving it. Use before/after a refactor, or to explain *why* a file is flagged.
`get_health(targets=[...], include=[...])`:
`include` adds blocks; `only=[...]` subtracts them.
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.
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.
Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
Why code is built this way, before changing a pattern.
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.