cc-error-handling

Standardize Python error handling with exception hierarchies, retries, and circuit breakers.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/z23cc/cc-code --skill cc-error-handling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cc-error-handling
Source: https://github.com/z23cc/cc-code/tree/main/skills/cc-error-handling
Command: npx skills add https://github.com/z23cc/cc-code --skill cc-error-handling

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Centralizing and standardizing error handling in Python applications to improve reliability, debuggability, and resilience.

Core Features & Use Cases

  • Custom Exception Hierarchy for rich error context
  • Retry with Backoff to handle transient failures
  • Circuit Breaker to prevent cascading failures
  • Graceful Degradation to maintain service quality under partial failures
  • Exception Context and notes for enhanced diagnostics
  • Clear guidelines on when to catch vs. propagate and how to translate errors

Quick Start

Create a simple domain error hierarchy and wrap a function call with a retry decorator to handle transient failures.

Frequently Asked Questions about cc-error-handling

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

FAQPage Schema
How do I implement a circuit breaker in Python to prevent cascading failures?

A circuit breaker in Python prevents cascading failures by tripping after repeated external call errors, stopping traffic to failing services. This Skill implements the pattern alongside retry logic and graceful degradation to maintain service quality during partial outages.

What is the best way to structure a custom exception hierarchy in Python applications?

The best way to structure a custom exception hierarchy in Python is by defining domain-specific errors with explicit context and categorization. This approach standardizes error handling across service boundaries, translating errors at API layers to improve debuggability.

How do I add retry with backoff to handle transient failures in Python?

Retry with backoff handles transient failures in Python by automatically re-executing failed operations after incremental delays. You can wrap function calls with a retry decorator to manage transient external service issues without manual intervention.

When should I catch versus propagate exceptions across API layers in Python?

You should catch exceptions in Python when you can handle the failure gracefully, and propagate them across API layers when translating errors to domain-specific categories. Clear guidelines dictate catching for retry logic while propagating structural failures for centralized diagnostics.

Can I use graceful degradation to maintain API quality during partial system failures?

Graceful degradation maintains API quality during partial system failures by returning fallback responses instead of hard errors. This Skill applies graceful degradation across input validation and external calls to ensure your application remains partially functional.