Agent skill
debug
Usar al investigar un bug o error en la aplicación
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/debug-eduardo-lezama-intranet-dashboard
SKILL.md
Cuándo usar esta skill
- Cuando hay un error o comportamiento inesperado
- Al investigar logs de error
- Para diagnosticar problemas de integración con servicios externos
Contexto necesario antes de empezar
- Mensaje de error exacto (si existe)
- Pasos para reproducir el problema
- Logs relevantes de Flask
- Qué funcionaba antes (si aplica)
Pasos
1. Reproducir el problema
- Verificar que el error es reproducible
- Anotar condiciones exactas
2. Localizar el origen
- Revisar logs de Flask (
current_app.logger) - Identificar archivo y línea del error
- Verificar stack trace completo
3. Analizar el código
- Leer el código involucrado
- Verificar flujo de datos
- Comprobar configuración relacionada
4. Hipótesis y verificación
- Formular hipótesis del problema
- Añadir logging temporal si es necesario:
python
current_app.logger.debug(f"DEBUG: variable={variable}") - Verificar hipótesis
5. Implementar fix
- Aplicar corrección mínima
- Verificar que resuelve el problema
- Verificar que no rompe otra cosa
6. Limpiar
- Eliminar logging temporal de debug
- Ejecutar validaciones
ruff check .
python -c "from app import app"
<patrones_criticos> SIEMPRE:
- Reproducir antes de arreglar
- Entender la causa raíz
- Verificar el fix
- Documentar si el bug era sutil
NUNCA:
- Arreglar síntomas sin entender causa
- Dejar logging de debug en producción
- Asumir sin verificar
PREFERENTEMENTE:
- Añadir test que capture el bug
- Fix mínimo y enfocado
- Commit separado para el fix </patrones_criticos>
Herramientas de debug disponibles
Flask logging
current_app.logger.debug("mensaje debug")
current_app.logger.info("mensaje info")
current_app.logger.error(f"Error: {e}")
Endpoints de debug existentes
/api/mealie/debug- Debug de Mealie/api/settleup/debug-transactions- Debug de Settle Up
Variables de entorno
FLASK_DEBUG=True- Modo debug activo
Checklist de validación
- Bug reproducido y entendido
- Causa raíz identificada
- Fix implementado y verificado
- No hay logging de debug residual
-
ruff check .pasa - La app arranca correctamente
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?