plugins/patterns/skills/error-handling-patterns/SKILL.md
Master when to fail fast vs degrade gracefully. Production-tested error handling strategies for GitHub Actions, CI/CD pipelines, and platform automation.
npx skillsauth add adaptive-enforcement-lab/claude-skills error-handling-patternsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Error handling is about when and how your automation responds to problems.
| Pattern | When to Use | Strategy | | --------- | ------------- | ---------- | | Fail Fast | Invalid input, missing config | Stop immediately, report clearly | | Prerequisite Checks | Complex preconditions | Validate all upfront before work | | Graceful Degradation | Fallbacks exist | Degrade to safer state, continue |
See the full implementation guide in the source documentation.
Error handling is about when and how your automation responds to problems.
| Pattern | When to Use | Strategy | | --------- | ------------- | ---------- | | Fail Fast | Invalid input, missing config | Stop immediately, report clearly | | Prerequisite Checks | Complex preconditions | Validate all upfront before work | | Graceful Degradation | Fallbacks exist | Degrade to safer state, continue |
flowchart TD
A[Error Detected] --> B{Can recover?}
B -->|No| C[Fail Fast]
B -->|Yes| D{Before work started?}
D -->|Yes| E[Prerequisite Check]
D -->|No| F[Graceful Degradation]
%% Ghostty Hardcore Theme
style A fill:#f92572,color:#1b1d1e
style B fill:#fd971e,color:#1b1d1e
style C fill:#f92572,color:#1b1d1e
style D fill:#fd971e,color:#1b1d1e
style E fill:#65d9ef,color:#1b1d1e
style F fill:#a7e22e,color:#1b1d1e
| Scenario | Pattern | Reasoning | | ---------- | --------- | ----------- | | Missing required config | Fail Fast | Can't continue safely | | Invalid user input | Fail Fast | User error, report immediately | | Complex deployment requirements | Prerequisite Checks | Validate tools, access, state | | API timeout | Graceful Degradation | Retry or use backup | | Service unavailable | Graceful Degradation | Fall back to alternatives |
Fail fast when you can't recover. Degrade gracefully when you can.
documentation
Workload Identity Federation implementation guide. GKE setup, IAM bindings, ServiceAccount configuration, migration from service account keys, and troubleshooting patterns.
development
Secure GitHub Actions trigger patterns for pull requests, forks, and reusable workflows. Preventing privilege escalation and code injection through trigger misconfiguration.
development
Structured framework for evaluating GitHub Actions security before adoption. Trust tiers, risk assessment checklist, and decision tree for action evaluation.
testing
Securely store GitHub App credentials across different environments. GitHub Actions secrets, external CI, Kubernetes, and automated rotation patterns.