Python error handling

From HoangNguyen0403/agent-skills-standard · View interactive version

Python error handling is an AI agent skill from the GitHub repository HoangNguyen0403/agent-skills-standard. Design Python error paths with narrow exceptions, rollback, contextual logs, and preserved blocker truth. Use when handling retries, verifier outcomes, parser failures, or exception flow in Python services.

How to use this skill

Skill file

Python Error Handling

**Priority: P1 (HIGH)**

Rules

Recipe

  1. Handle expected failures close to the boundary.
  2. Re-raise unexpected failures after cleanup.
  3. Return structured blocker or verdict data when the caller needs workflow truth.
  4. Test timeout, malformed input, and missing-env paths.

Anti-Patterns

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.