skills/resilience/SKILL.md
System resilience -- circuit breakers, retries, bulkheads, graceful degradation, health checks.
npx skillsauth add arbazkhan971/godmode resilienceInstall 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.
/godmode:resilience, "circuit breaker", "retry"grep -r "circuitBreaker\|CircuitBreaker\|opossum\|gobreaker" \
--include="*.ts" --include="*.js" --include="*.go" \
-l 2>/dev/null
grep -r "retry\|backoff\|Retry" \
--include="*.ts" --include="*.go" -l 2>/dev/null
Evaluate: circuit breakers, retries, timeouts, bulkheads, rate limits, fallbacks, health checks.
States: CLOSED -> OPEN (on threshold) -> HALF-OPEN (after cooldown) -> test one request -> CLOSED/OPEN.
Config per dependency:
Failure threshold: 5 failures in 30s
Half-open timeout: 30s
Success threshold: 3 (to close from half-open)
Monitored exceptions: 5xx, timeout, connection error
Fallback: cached data | default | error
IF no circuit breaker on external call: add one. IF circuit opens too often: tune threshold up.
Formula: min(base_ms * 2^attempt + jitter, max_ms)
Retryable: network timeout, 5xx, DB connection, 429
Non-retryable: 4xx validation, auth, deserialization
Max attempts: 3 (default), 5 (critical operations)
NEVER retry non-idempotent operations without idempotency key. ALWAYS add jitter to prevent thundering herd.
Isolate failure domains. Separate connection pools or semaphores per dependency. One slow dependency must not exhaust all resources.
Config: max concurrent per dependency
Payment API: 20 concurrent, queue 10
Email service: 10 concurrent, queue 5
Search: 30 concurrent, queue 20
Token bucket for burst tolerance. Sliding window
counter for steady limits. See /godmode:ratelimit
for full implementation.
Define fallback per dependency:
Recommendation engine down -> show popular items
Search down -> show cached results + apology
Payment down -> queue order, process later
Analytics down -> skip tracking silently
Levels: NORMAL -> DEGRADED -> MINIMAL -> MAINTENANCE.
livenessProbe:
httpGet: { path: /health/live, port: 8080 }
periodSeconds: 10
failureThreshold: 3
readinessProbe:
httpGet: { path: /health/ready, port: 8080 }
periodSeconds: 5
failureThreshold: 2
Client request: 30s total
-> API gateway: 25s
-> Service call: 5s (connect 1s + read 4s)
-> DB query: 3s
-> External API: 10s
Each layer timeout < parent timeout. Use timeout budget: pass remaining time downstream.
[ ] Circuit breaker on all external deps
[ ] Retry with exponential backoff + jitter
[ ] Bulkhead isolation between deps
[ ] Fallback for every circuit breaker
[ ] Health checks (liveness + readiness)
[ ] Timeouts on all calls (connect + read)
[ ] Rate limiting at API boundary
<!-- tier-3 -->
Append .godmode/resilience-results.tsv:
timestamp pattern target dependency config test_result status
KEEP if: dependency failure triggers graceful
degradation AND circuit opens AND fallback works.
DISCARD if: failure cascades OR no fallback
OR timeout not configured.
STOP when ALL of:
- All critical deps have circuit breakers
- All retries use backoff + jitter
- All calls have timeouts
- All circuit breakers have fallbacks
- Verification checklist passes
On failure: git reset --hard HEAD~1. Never pause.
| Failure | Action | |--|--| | Circuit never opens | Check threshold, include timeouts | | Retry storm | Add backoff+jitter, circuit breaker first | | Stale fallback data | Set max staleness, alert on primary | | Bulkhead rejects too many | Tune pool size, check downstream |
development
Web performance optimization. Lighthouse, bundle analysis, code splitting, image optimization, critical CSS, fonts, service workers, CDN.
development
Webhook design, delivery, retry, HMAC verification, event subscriptions, dead letter queues.
development
Vue.js mastery. Composition API, Pinia, Vue Router, Nuxt SSR/SSG, Vite optimization, testing.
development
Evidence gate. Run command, read full output, confirm or deny claim. No trust, only proof.