Langsung ke konten
Skillpedia
Pemrograman umum8.1k ยท #12569

pre-modification-check

Fungsinya

Skill ini membuat AI Anda menilai risiko sebuah berkas sebelum mengubahnya. Skill ini untuk pengembang di proyek yang diindeks Repowise yang ingin menghindari kerusakan pada kode bersama atau yang rapuh.

Kapan dipakai

  • โœ“Saat AI Anda akan mengedit utilitas bersama atau modul inti.
  • โœ“Saat sebuah berkas yang tidak Anda sebutkan akan berubah sebagai efek samping.
  • โœ“Saat Anda berencana mengubah atau menghapus beberapa berkas sekaligus dan ingin tahu dampaknya lebih dulu.

Link skill

https://github.com/repowise-dev/repowise/blob/main/plugins/claude-code/skills/pre-modification/SKILL.md

Salin 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

Gunakan skill ini untuk membantu saya: https://github.com/repowise-dev/repowise/blob/main/plugins/claude-code/skills/pre-modification/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œSebelum Anda mengubah helper pembayaran, periksa apa saja yang bergantung padanya dan apakah ia sering rusak.โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill menjalankan pemeriksaan risiko pada berkas, yang melaporkan riwayat perbaikan bug, berkas yang bergantung padanya, berkas yang biasanya berubah bersamanya, pemiliknya, celah tes, dan sinyal keamanan. AI membaca hasil ini sebelum melakukan suntingan.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Pre-Modification Check with Repowise

Before modifying files in a Repowise-indexed codebase, assess the impact.

Before editing a file

Call get_risk(targets=["path/to/file.py"]). Per file it returns hotspot_score, trend, risk_type, impact_surface (top 3), dependents_count, co_change_partners, primary_owner, test_gap, and security_signals. Read it for:

  • Bug-fix history (defect_profile) โ€” present only on files with counted fixes: fix_count over the trailing 6 months, last_fix_days_ago, a bug_magnet flag for sustained recent fix pressure, and top_symbols (the per-symbol counts are approximate โ€” read them as "mostly here"). A file that keeps getting fixed is the strongest single signal that the next edit breaks something; lead with it.
  • Hotspot status (hotspot_score, trend) โ€” high-churn ร— complex? Extra care needed.
  • Dependents (dependents_count, impact_surface) โ€” how wide is the blast radius?
  • Co-change partners โ€” files that change together with this one (often without an import link); you may need to update them too.
  • Ownership / bus factor โ€” who owns it, and whether a single author maintains it.
  • Test gap & security signals โ€” flag untested or security-sensitive files before touching them.

When modifying multiple files

Batch all targets into one call: get_risk(targets=["file1.py", "file2.py", "module/"]).

When to warn the user

If get_risk shows:

  • A defect_profile with bug_magnet set โ€” say so plainly: this file has been fixed repeatedly and recently
  • Hotspot score above 90th percentile โ€” mention this is a frequently-changed, high-risk file
  • More than 10 dependents โ€” list the top dependents; API changes here will break consumers
  • Bus factor of 1 โ€” note that a single person maintains this code
  • Risk type is "bug-prone" or "high-coupling" โ€” flag explicitly before making changes

Before refactoring or moving code

Call get_context(targets=["file.py"]) first to understand the full context: what uses this file, what decisions govern it, and why it's structured this way. This prevents accidentally violating architectural decisions.

For a heavy refactor, also call get_health(targets=["file.py"]) โ€” the marker findings (complexity, deep nesting, low cohesion, duplication) tell you what to improve while you're in there, and give you a before/after score.

Error handling

If get_risk returns a tool error, the MCP server may not be running. Proceed with the modification but note that risk assessment was unavailable.

Pertanyaan umum

Apa yang diberitahukan oleh pemeriksaan ini?

Ia menunjukkan riwayat perbaikan bug, jumlah berkas yang bergantung padanya, berkas yang sering berubah bersamaan, pemilik utamanya, dan apakah tes tidak ada.

Bisakah ia memeriksa beberapa berkas sekaligus?

Bisa. Skill menyarankan agar semua berkas target dikelompokkan dalam satu pemeriksaan.

Apakah ini menghentikan suntingan?

Ia memberi informasi pada perubahan, bukan memblokirnya, sehingga AI dapat merencanakan kehati-hatian ekstra atau memperbarui berkas terkait.

Detail

Deskripsi asli dari pembuat

Use before modifying, refactoring, or deleting files in a codebase that has Repowise indexed (indicated by a .repowise/ directory). Activates when Claude is about to edit code, especially shared utilities, core modules, or files the user didn't explicitly mention. Helps assess impact and avoid breaking things.

repo: repowise-dev/repowise

Popularitas

Bintang GitHub
8.1k
Peringkat
#12569
Lisensi
AGPL-3.0
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa