rlpatrao/claude_harness_forge/resilience
Claude Code and agent skill by rlpatrao/claude_harness_forge
- community
Checking that the SKILL.md file is still in the repository.
Add resilience patterns to existing code — retry with backoff, circuit breakers, timeouts, fallbacks, and graceful degradation.
Install
npx vskill@latest install rlpatrao/claude_harness_forge/resilienceSKILL.md
The same SKILL.md was published earlier as rlpatrao/claude_harness_forge/resilience.
Resilience Skill
Add resilience patterns to existing service code that makes external API calls or depends on unreliable resources.
Usage
Also called by the generator during implementation of external integrations.
Prerequisites
- Application code exists with at least one external API call or database dependency.
project-manifest.jsonexists withstacksection populated.
Step 1 — Scan Codebase for External Calls
Identify all locations in the codebase that make:
- HTTP/REST API calls
- gRPC calls
- Database queries (especially cross-service)
- Message queue publish/consume
- Third-party SDK calls (payment, email, SMS, etc.)
Step 2 — Add Retry with Exponential Backoff
For each external call:
- Wrap with retry logic (max attempts, base delay, multiplier, max delay)
- Add jitter to prevent thundering herd
- Configure retryable vs non-retryable error types (retry 503, don't retry 400)
- Log each retry attempt with attempt number and delay
Step 3 — Add Circuit Breakers
For flaky or high-latency endpoints:
- Implement circuit breaker (closed/open/half-open states)
- Configure failure threshold to trip (e.g., 5 failures in 60 seconds)
- Configure recovery timeout for half-open probe
- Emit metrics on state transitions
Step 4 — Add Timeout Management
For all external calls:
- Set connection timeout (fail fast on unreachable hosts)
- Set read timeout (fail on slow responses)
- Set overall request timeout (cap total duration including retries)
- Cancel in-flight requests on timeout
Step 5 — Add Fallback Responses
For non-critical dependencies:
- Define fallback response for each degraded dependency
- Cache last-known-good responses where appropriate
- Return partial results instead of full failure
- Flag responses as degraded in API output
Step 6 — Add Graceful Degradation Paths
For the application as a whole:
- Identify critical vs non-critical features
- Non-critical features degrade silently (log warning, return default)
- Critical features fail loudly with clear error messages
- Health endpoint reflects degraded state
Step 7 — Update Tests
Generate or update tests to verify:
- Retry succeeds after transient failure
- Retry stops after max attempts
- Circuit breaker trips after threshold failures
- Circuit breaker recovers in half-open state
- Timeout fires for slow responses
- Fallback returns expected default
Outputs
| File | Description | |
|---|---|---|
src/lib/resilience.py (or circuit-breaker.ts) | Retry, circuit breaker, timeout utilities | |
| Modified service files | Existing calls wrapped with resilience decorators | |
| Resilience tests | New tests verifying retry, circuit breaker, timeout behavior |
References
.claude/skills/resilience-patterns/SKILL.md— patterns and configuration guidance
Gate Behavior
- Tests verify retry succeeds after transient failure
- Circuit breaker trips after configured number of failures
- Timeout stops hanging calls within configured duration
- Fallback returns valid response when dependency is down
Gotchas
- Don't retry non-idempotent operations. POST requests that create resources need idempotency keys before retrying.
- Circuit breakers need per-endpoint state. A single global circuit breaker is almost never correct.
- Timeouts compound with retries. 3 retries x 30s timeout = 90s total. Set overall request budgets.
- Fallbacks can mask real outages. Always log when serving fallback responses so monitoring can detect degradation.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/resilience/SKILL.md
Popularity
- Repository stars
- 4
- Repository forks
- 2
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/rlpatrao/claude_harness_forge/resilience)