Skip to main content

error-handling

Use when: design error handling so failures are explicit, recoverable, and never silently swallowed.

Datos de origen

Repositorio
kimtth/agent-skill-100-lines-or-less
Última actividad en el origen
26 de junio de 2026 a las 02:15
Idioma detectado de SKILL.md
inglés
Estrellas
2
Forks
0

Opciones de instalación

De forma predeterminada está seleccionado el prompt que primero revisa el origen. Puedes cambiar a un comando directo o descargar una copia local.

Revisa los archivos de origen

Lee SKILL.md y los archivos complementarios que muestra SkillsMP antes de decidir si quieres instalarlo.

Mostrando SKILL.md

SKILL.md
Instrucciones de origen · Vista previa de solo lectura
name
error-handling
description
Use when: design error handling so failures are explicit, recoverable, and never silently swallowed.
Goal: failures that are visible, contextual, and handled deliberately. Use for: - deciding how functions signal and propagate failure - reviewing try/catch, error types, and recovery - fixing swallowed errors and vague messages Workflow: 1. Distinguish expected failures from programmer bugs. 2. Model expected errors explicitly (results or typed exceptions). 3. Handle errors where you can act; otherwise propagate with context. 4. Add context as errors cross boundaries, without losing the cause. 5. Fail fast on invariant violations; do not limp on. 6. Surface actionable messages; log details once, near the source. Patterns: - typed errors or result types over generic throws - wrap-and-rethrow to add context, preserving the cause - retry with backoff for transient failures only - a single place that maps errors to user-facing responses Rules: - never swallow an error silently - do not catch broadly just to continue; handle or rethrow - include context, never the bare message - distinguish retryable failures from permanent ones
Ver en GitHub