Langsung ke konten
Skillpedia
Pemrograman umum48k ยท #5438

phase-gated-debugging

Fungsinya

Asisten AI ini membantu memperbaiki bug pada kode Anda secara terstruktur. Asisten memastikan masalah yang sebenarnya ditemukan sebelum perubahan apa pun dilakukan, dengan mengikuti proses 5 langkah untuk mencegah perbaikan yang terburu-buru.

Kapan dipakai

  • โœ“Ketika bug terlihat sudah diperbaiki tetapi terus muncul kembali.
  • โœ“Ketika Anda membutuhkan proses langkah demi langkah untuk menemukan penyebab error.
  • โœ“Ketika error muncul sesekali dan sulit dilacak.

Link skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/phase-gated-debugging/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/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/phase-gated-debugging/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

โ€œAda bug yang muncul di kode saya dan saya tidak tahu penyebabnya. Bisakah Anda membantu menyelidikinya dengan proses yang terorganisir?โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

AI pertama-tama mencoba mereproduksi error, lalu menambahkan catatan untuk memahami di mana masalah terjadi, menganalisis akar penyebabnya, dan baru kemudian menerapkan perbaikan. Terakhir, AI memeriksa apakah error benar-benar teratasi.

Konten teknis (SKILL.md asli)

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

Phase-Gated Debugging

Overview

AI coding agents see an error and immediately edit code. They guess at fixes, get it wrong, and spiral. This skill enforces a strict 5-phase protocol where you CANNOT edit source code until the root cause is identified and confirmed.

Based on claude-debug (full plugin with PreToolUse hook enforcement).

When to Use

Use this skill when:

  • a bug keeps getting "fixed" without resolving the underlying issue
  • you need to slow an agent down and force disciplined debugging before code edits
  • the failure is intermittent, a regression, performance-related, or otherwise hard to isolate
  • you want an explicit user confirmation checkpoint before any fix is applied

The Protocol

Phase 1: REPRODUCE

Run the failing command/test. Capture the exact error. Run 2-3 times for consistency.

  • Do NOT read source code
  • Do NOT hypothesize
  • Do NOT edit any files

Phase 2: ISOLATE

Read code. Add diagnostic logging marked // DEBUG. Re-run with diagnostics. Binary search to narrow down.

  • Only // DEBUG marked logging is allowed
  • Do NOT fix the bug even if you see it

Phase 3: ROOT CAUSE

Analyze WHY at the isolated location. Use "5 Whys" technique. Remove debug logging.

State: "This is my root cause analysis: [explanation]. Do you agree, or should I investigate further?"

WAIT for user confirmation. Do NOT proceed without it.

Phase 4: FIX

Remove all // DEBUG lines. Apply minimal change addressing confirmed root cause.

  • Only edit files related to root cause
  • Do NOT refactor unrelated code

Phase 5: VERIFY

Run original failing test โ€” must pass. Run related tests. For intermittent bugs, run 5+ times. If verification fails: root cause was wrong, go back to Phase 2.

Bug-Type Strategies

Type Technique
Crash/Panic Stack trace backward โ€” trace the bad value to its source
Wrong Output Binary search โ€” log midpoint, halve search space each iteration
Intermittent Compare passing vs failing run logs โ€” find ordering divergence
Regression git bisect โ€” find the offending commit
Performance Timing at stage boundaries โ€” find the bottleneck

Key Rules

  1. NEVER edit source code in phases 1-3 (except // DEBUG in phase 2)
  2. NEVER proceed past phase 3 without user confirmation
  3. ALWAYS reproduce before investigating
  4. ALWAYS verify after fixing

Example

User request:

a bug keeps getting "fixed" without resolving the underlying issue; diagnose it and return the concrete next action.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Pertanyaan umum

Mengapa saya tidak bisa langsung mengedit kode?

Mengedit kode tanpa memahami akar penyebabnya dapat memperparah masalah atau menimbulkan bug baru. Proses ini memastikan perbaikan menyasar sumber masalah.

Apa saja 5 fasenya?

Fasenya adalah: 1. Mereproduksi error, 2. Mengisolasi masalah dengan catatan, 3. Mengidentifikasi akar penyebab, 4. Menerapkan perbaikan, dan 5. Memverifikasi bahwa error sudah teratasi.

Apa yang terjadi jika perbaikannya tidak berhasil?

Jika error belum teratasi pada fase verifikasi, AI kembali ke fase isolasi untuk menyelidikinya lagi.

Detail

Deskripsi asli dari pembuat

Use when debugging any bug. Enforces a 5-phase protocol where code edits are blocked until root cause is confirmed. Prevents premature fix attempts.

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#5438
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa