error-patterns

Standardize error handling and structured logging for Go, Python, and JavaScript services.

10|Updated Oct 18, 2025
One-click install
npx skills add https://github.com/CsHeng/dot-claude --skill error-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-patterns
Source: https://github.com/CsHeng/dot-claude/tree/main/skills/error-patterns
Command: npx skills add https://github.com/CsHeng/dot-claude --skill error-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Error handling patterns and logging standards. Use when error patterns guidance is required.

Core Features & Use Cases

  • Fail-Fast & Context Preservation: Validate inputs early; preserve state context in errors.
  • Structured Logging: Consistent JSON/key-value logs with correlation IDs.
  • Recovery & Monitoring: Retry strategies, circuit breakers, and alerting considerations.

Quick Start

Apply the error-patterns to new and existing components to standardize error handling and logging behavior.

Frequently Asked Questions about error-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize error handling across Go, Python, and JavaScript services?

Error handling standardization applies consistent patterns for input validation, error context propagation, and structured logging across Go, Python, and JavaScript services. This ensures fail-fast validation, preserves error state context, and enables consistent monitoring and alerting across system boundaries.

What's the best way to implement retry and circuit-breaker strategies?

Retry and circuit-breaker strategies are recovery mechanisms that handle transient failures and prevent cascading outages. They define backoff policies, failure thresholds, and recovery workflows to maintain service reliability and reduce alert noise across distributed deployments.

How do I set up structured logging with correlation IDs?

Structured logging formats logs as JSON or key-value pairs with correlation IDs to track requests across service boundaries. This enables consistent log aggregation, faster issue diagnosis, and better integration with monitoring and alerting systems.

Do I need separate error handling patterns for different deployment scenarios?

Error handling patterns apply consistently across deployment scenarios through language-specific implementations. The same principles—fail-fast validation, context preservation, structured logging, and recovery strategies—work whether services run monolithic, microservices, or serverless.

Can I apply error patterns to existing components, or only new ones?

Error patterns apply to both new and existing components. You standardize error handling and logging behavior incrementally by adopting consistent input validation, error context propagation, retry policies, and structured logging across your service portfolio.

What input validation and invariant checks should I implement first?

Input validation and invariant checks form the foundation of fail-fast error handling. Validate inputs at service boundaries early, check state invariants within components, and propagate error context to enable downstream recovery decisions and accurate logging.