code-health
Fungsinya
Skill ini membantu AI Anda menilai seberapa sehat sebuah basis kode dan berkas mana yang paling sulit dirawat. Skill ini untuk pengembang yang ingin merencanakan pembersihan atau refaktor berdasarkan bukti.
Kapan dipakai
- βSaat Anda bertanya seberapa sehat basis kode atau apa yang sebaiknya dibersihkan berikutnya.
- βSaat Anda merencanakan atau menyelesaikan refaktor dan ingin perbandingan sebelum dan sesudah.
- βSaat Anda ingin tahu mengapa berkas tertentu ditandai sebagai berisiko atau sulit dirawat.
Link skill
https://github.com/repowise-dev/repowise/blob/main/plugins/claude-code/skills/code-health/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βTampilkan berkas paling berisiko di proyek ini dan apa yang sebaiknya saya refaktor lebih dulu.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill menjalankan pemeriksaan kesehatan Repowise yang memberi skor pada setiap berkas dari 1 sampai 10 memakai sinyal yang bisa diukur, seperti kompleksitas dan titik panas tanpa tes. Skill mengembalikan daftar peringkat apa yang harus diperbaiki lebih dulu, atau rincian untuk berkas tertentu.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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.
Pertanyaan umum
Apa arti skor rendah?
Skill menyatakan bahwa skor rendah berarti berkas tersebut lebih mungkin menyembunyikan bug, bukan sekadar karena ukurannya besar.
Bisakah saya memeriksa hanya beberapa berkas?
Bisa. Anda dapat menyebutkan berkas tertentu untuk mendapatkan skornya dan temuan di baliknya.
Apakah ia memakai model AI untuk menilai kode?
Tidak. Skill menyatakan analisisnya deterministik dan lokal, tanpa panggilan model.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 8.1k
- Peringkat
- #12566
- Lisensi
- AGPL-3.0
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
architectural-decisions
8.1kMembantu agent Anda mencari tahu mengapa kode dibangun dengan cara tertentu, menggunakan keputusan dan riwayat yang tercatat sebelum mengubah arsitektur.
change-review
8.1kMembantu agent Anda meninjau pull request atau sekumpulan perubahan sebelum digabung, dengan menampilkan risiko, berkas yang terdampak, dan hal lain yang perlu ikut diubah.
codebase-exploration
8.1kMembantu agent Anda memahami proyek yang belum dikenal dengan cepat, dengan menjawab cara kerja kode, siapa yang memanggil apa, dan di mana sesuatu dibangun.
dead-code-cleanup
8.1kMembantu agent Anda menemukan kode yang tidak terpakai, berkas yang tidak bisa dijangkau, dan ekspor yang tidak dipakai dalam proyek, agar Anda bisa membersihkannya dengan aman.
Skill serupa
diffs
394kMemungkinkan agent Anda menghasilkan diff perubahan yang nyata dan dapat dibagikan sebagai tautan viewer atau file gambar, bukan ringkasan yang ditulis manual.
coding-agent
394kMembantu agent Anda menyerahkan pekerjaan pemrograman besar ke Codex, Claude Code, atau OpenCode di latar belakang, lalu memeriksa kemajuannya.
gh-issues
394kMembantu agent Anda menemukan issue GitHub, memilih yang dikerjakan, dan membuka pull request perbaikan, termasuk tindak lanjut komentar tinjauan.