Standardized error handling patterns for robust plugin development. Provides error classification, recovery strategies, and logging patterns. Triggers: error handling, error recovery, graceful degradation, resilience, exception handling, error classification, debugging patterns Use when: implementing error handling in plugins, designing recovery strategies, classifying and logging errors consistently DO NOT use when: simple scripts without error handling needs. Consult this skill when designing robust error handling for plugins.
/plugin marketplace add athola/claude-night-market/plugin install leyline@claude-night-marketThis skill inherits all available tools. When active, it can use any tool Claude has access to.
modules/classification.mdmodules/recovery-strategies.mdStandardized error handling patterns for consistent, robust behavior across plugins. Provides error classification, recovery strategies, and debugging workflows.
| Level | Action | Example |
|---|---|---|
| Critical | Halt, alert | Auth failure, service down |
| Error | Retry or fallback | Rate limit, timeout |
| Warning | Log, continue | Partial results, deprecation |
| Info | Log only | Non-blocking issues |
class ErrorCategory(Enum):
TRANSIENT = "transient" # Retry likely to succeed
PERMANENT = "permanent" # Retry won't help
CONFIGURATION = "config" # User action needed
RESOURCE = "resource" # Quota/limit issue
from leyline.error_patterns import handle_error, ErrorCategory
try:
result = service.execute(prompt)
except RateLimitError as e:
return handle_error(e, ErrorCategory.RESOURCE, {
"retry_after": e.retry_after,
"service": "gemini"
})
except AuthError as e:
return handle_error(e, ErrorCategory.CONFIGURATION, {
"action": "Run 'gemini auth login'"
})
@dataclass
class ErrorResult:
category: ErrorCategory
message: str
recoverable: bool
suggested_action: str
metadata: dict
# In your skill's frontmatter
dependencies: [leyline:error-patterns]
modules/classification.md for error taxonomymodules/recovery-strategies.md for handling patterns