Saltar al contenido
Skillpedia
Programación general48 mil · #5438

phase-gated-debugging

Qué hace

Este asistente de IA te ayuda a corregir errores en tu código de forma ordenada. Se asegura de encontrar el problema real antes de hacer cambios, siguiendo un proceso de 5 pasos para evitar arreglos apresurados.

Cuándo usarla

  • ✓Cuando un error parece corregido pero vuelve a aparecer.
  • ✓Cuando necesitas un proceso paso a paso para encontrar la causa de un fallo.
  • ✓Cuando el error aparece de vez en cuando y es difícil de rastrear.

Link de la skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/phase-gated-debugging/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/phase-gated-debugging/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Aparece un error en mi código y no encuentro la causa. ¿Me ayudas a investigarlo con un proceso ordenado?”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

Primero, la IA intenta reproducir el error. Después, añade notas para entender dónde se produce el problema, analiza la causa raíz y, solo entonces, aplica una corrección. Por último, comprueba que el error esté realmente resuelto.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de 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.
Preguntas frecuentes

¿Por qué no puedo editar el código de inmediato?

Modificar el código sin entender la causa raíz puede empeorar el problema o crear errores nuevos. Este proceso asegura que la corrección vaya al origen del fallo.

¿Cuáles son las 5 fases?

Son: 1. Reproducir el error, 2. Aislar el problema con notas, 3. Identificar la causa raíz, 4. Aplicar la corrección y 5. Verificar que el error está resuelto.

¿Qué pasa si la corrección no funciona?

Si el error no se resuelve durante la verificación, la IA vuelve a la fase de aislamiento para investigar de nuevo.

Detalles

Descripción original del autor

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

Popularidad

Estrellas en GitHub
48 mil
Posición en el ranking
#5438
Licencia
MIT
Actualizada
15/10/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas