code-health
できること
このスキルは、コードベースがどれほど健全か、どのファイルが最も保守しにくいかを、AIが判断する手助けをします。証拠に基づいて、整理やリファクタリングの作業を計画したい開発者向けです。
使う場面
- ✓タスクが、コードの品質、複雑さ、または技術的負債について尋ねるとき。
- ✓次にリファクタリングすべき、リスクがある、または保守しにくいファイルを知りたいとき。
- ✓リファクタリングの前後の健全性の比較が必要なとき。
スキルのリンク
https://github.com/repowise-dev/repowise/blob/main/plugins/codex/skills/code-health/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このプロジェクトのうち、最初にリファクタリングすべき、テストされていないホットスポットのファイルはどれですか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
スキルは、測定可能な指標を使って、各ファイルを1から10で採点するRepowiseの健全性チェックを実行します。何を最初に直すかの順位付きの一覧、または指定したファイルの指摘を返します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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.
よくある質問
低いスコアは大きいファイルを意味しますか?
いいえ。スキルによると、低いスコアは、ファイルがバグを隠している可能性が高いことを意味します。
カバレッジの不足を示せますか?
はい。プロジェクトにカバレッジのデータが追加されている場合に限ります。
スコアにAIモデルを使いますか?
いいえ。採点は決定的でローカルです。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 8.1k
- ランキング
- #12571
- ライセンス
- AGPL-3.0
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
architectural-decisions
8.1kアーキテクチャを変更する前に、記録された決定と履歴を使って、コードがなぜそのように作られているかを、エージェントが調べるよう支援します。
change-review
8.1kマージの前にプルリクエストや一連の変更を見直し、リスク、影響を受けるファイル、ほかに変えるべきものを示すよう、エージェントを支援します。
code-health
8.1kRepowiseの分析を使って、ファイルごとにコードの健全性を採点し、最もリスクの高いファイルを見つけ、次にリファクタリングするものを選ぶよう、エージェントを支援します。
codebase-exploration
8.1kコードがどう動くか、誰が何を呼ぶか、何がどこに作られているかに答えることで、なじみのないプロジェクトを素早く理解するよう、エージェントを支援します。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。