$ skilldirectory
— zsh — registry.skilldirectory.dev
skill library blog

home / Coding / Python Error Handling Skill by @wshobson

Python Error Handling Skill by @wshobson

FREE
github stars★ 42,243updatedMay 2026repo@wshobson
$git clone https://github.com/wshobson/agents

The skill is the plugins/python-development/skills/python-error-handling folder inside that repository. Copy it into the folder your agent loads skills from; check your agent's documentation for where that is.

Read the opening of the original SKILL.md
# Python Error Handling

Build robust Python applications with proper input validation, meaningful exceptions, and graceful failure handling. Good error handling makes debugging easier and systems more reliable.

## When to Use This Skill

- Validating user input and API parameters
- Designing exception hierarchies for applications
- Handling partial failures in batch operations
- Converting external data to domain types
- Building user-friendly error messages
- Implementing fail-fast validation patterns

## Core Concepts

### 1. Fail Fast

Validate inputs early, before expensive operations. Report all validation errors at once when possible.

### 2. Meaningful Exceptions

Use appropriate exception types with context. Messages should explain what failed, why, and how to fix it.

### 3. Partial Failures

In batch operations, don't let one failure abort everything. Track successes and failures separately.

### 4. Preserve Context
…

Excerpt only, quoted from the author's repository. Open the repository for the complete file.