Error Recovery Patterns Skill
Design gh-aw error handling, retry, recovery, and debugging flows.
MCP get_skill({ skillId: "error-recovery-patterns-skill-ced6b92a" })Use this skill with your agent
Create a free account and connect via MCP
# Error Recovery Patterns Skill Use this skill for error handling, recovery strategies, and debugging in gh-aw. ## Purpose Implement robust recovery patterns to: - Reduce retry loops in agent sessions (target: <10% vs current 23%) - Implement circuit breakers to prevent infinite retry loops - Add proactive recovery for installation, dependency, and API failures - Improve debug logging for recovery attempts ## When to Use This Skill Use this skill when: - Implementing retry logic for network operations, installations, or API calls - Debugging retry loop issues in workflows or agent sessions - Adding error recovery patterns to new or existing code - Understanding transient vs non-transient error classification - Implementing circuit breakers or exponential backoff - Adding debug logging for recovery attempts ## Key Concepts Covered ### 1. Circuit Breaker Pattern - Maximum retry limits (standard: 3 attempts) - Exponential backoff strategies - Fail-fast on non-transient errors - Implementation in JavaScript, Shell, and Go ### 2. Installation Failure Recovery - NPM installation with cache clearing and registry fallbacks - Python pip installation with mirror alternatives - Docker image pull with retry and rate limit handling - Copilot CLI installation with network retry ### 3. API Timeout and Rate Limit Handling - GitHub API rate limit detection and backoff - Transient error detection patterns - Custom retry configuration for different APIs - Rate limit-specific retry strategies ### 4. Debug Logging for Recovery - Logger package usage for retry attempts - Category naming conventions (pkg:filename) - DEBUG environment variable patterns - Zero-overhead logging when disabled ### 5. Error Categorization - Transient vs non-transient errors - Network errors, timeout patterns - HTTP error codes (502, 503, 504) - GitHub-specific errors (rate limits, abuse detection) ## Anti-Patterns to Avoid This skill explicitly covers anti-patterns to avoid: - ❌ Infinite retry loops without maximum limits - ❌ Retrying validation errors that won't self-correct - ❌ No backoff delay between attempts - ❌ Silent retries without logging - ❌ Retrying non-transient errors ## Code Examples Provided The skill includes production-ready examples for: - JavaScript retry with `withRetry()` function - Shell script retry loops with exponential backoff - Go retry patterns with context and timeouts - NPM/pip/docker installation recovery - GitHub API rate limit handling - Debug logging for all recovery attempts ## Related Skills - **error-messages** - Error message formatting and style guide - **error-pattern-safety** - Safety guidelines for error pattern regex - **developer** - General development guidelines and conventions ## Full Documentation Complete documentation available at: `../../scratchpad/error-recovery-patterns.md` This skill references the comprehensive error recovery patterns document which includes: - Console formatting requirements - Error wrapping patterns - Common error scenarios with step-by-step resolution - Error message templates - Debugging runbook - Error categorization decision trees - Metrics and monitoring strategies
Related Skills
More skills in Software Engineering
Accessibility Standards
Comprehensive web accessibility standards based on WCAG 2.2 AA, with 38+ anti-patterns, legal enforcement context (EAA, ADA Title II), WAI-ARIA patterns, and framework-specific fixes for modern web frameworks and libraries.
Accord
Authoring unified specification packages across Business/Development/Design teams via staged elaboration (L0 Vision → L1 Requirements → L2 Team Detail → L3 Acceptance Criteria). No code. Use when authoring cross-team specs, building L0-L3 packages, or aligning Biz/Dev/Design on a single source of truth.
Acquire Codebase Knowledge
Use this skill when the user explicitly asks to map, document, or onboard into an existing codebase. Trigger for prompts like "map this codebase", "document this architecture", "onboard me to this repo", or "create codebase docs". Do not trigger for routine feature implementation, bug fixes, or narrow code edits unless the user asks for repository-level discovery.
Acreadiness Assess
Run the AgentRC readiness assessment on the current repository and produce a static HTML dashboard at reports/index.html. Wraps `npx github:microsoft/agentrc readiness` and hands off rendering to the @ai-readiness-reporter custom agent. Supports policies (--policy) for org-specific scoring. Use when asked to assess, audit, or score the AI readiness of a repo.
Acreadiness Generate Instructions
Generate tailored AI agent instruction files via AgentRC instructions command. Produces .github/copilot-instructions.md (default, recommended for Copilot in VS Code) plus optional per-area .instructions.md files with applyTo globs for monorepos. Use after running /acreadiness-assess to close gaps in the AI Tooling pillar.
Acreadiness Policy
Help the user pick, write, or apply an AgentRC policy. Policies customise readiness scoring by disabling irrelevant checks, overriding impact/level, setting pass-rate thresholds, or chaining org baselines with team overrides. Use when the user asks about strict mode, AI-only scoring, custom weights, CI gating, or wants org-wide standardisation.
Explore Other Categories
Skills from other categories with shared topics
Add New Safe Output Type
Adding a New Safe Output Type to GitHub Agentic Workflows
Agentic Workflows
Route gh-aw workflow design/create/debug/upgrade requests to the right prompts.
CI Cleaner Agent
Tidies up the repository CI state by formatting sources, running linters, fixing issues, running tests, and recompiling workflows