chaos-resilience
Skill1 starsChanged 2 months agoMITView on GitHub
Test how the system behaves when its dependencies fail — timeouts, 500s, slow networks, partial outages, retries and idempotency. Use when asked about resilience, failure modes, error handling, or "what happens if the payment provider is down".
In this repository34 other files it gives its agents.
- a11y-auditSkill
- api-contract-testingSkill
- autonomous-explorationSkill
- bug-reproSkill
- ci-wiringSkill
- contract-testing-pactSkill
- coverage-ratchetSkill
- database-testingSkill
- e2e-authoringSkill
- environment-paritySkill
- exploratory-chartersSkill
- false-positive-hunterSkill
- flake-forensicsSkill
- i18n-l10n-testingSkill
- load-and-stressSkill
- mutation-proofSkill
- never-break-prodSkill
- payment-testingSkill
- perf-budgetSkill
- qa-triageSkill
- regression-curationSkill
- release-gateSkill
- responsive-mobile-testingSkill
- risk-mapSkill
- root-cause-protocolSkill
- security-regressionSkill
- smoke-and-sanitySkill
- state-machine-testingSkill
- test-data-managementSkill
- test-strategySkill
- tracking-testingSkill
- transactional-email-testingSkill
- unit-test-authoringSkill
- visual-regressionSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Every dependency will fail.
- Distinctive: line 12
Start in tests, not in production.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Chaos & Resilience
Every dependency will fail. The only question is whether your product degrades or corrupts.
Failure injection at the boundary
Start in tests, not in production. Playwright and MSW can break any dependency deterministically:
await page.route('**/api/payments/**', route => route.fulfill({ status: 503, body: '{"error":"unavailable"}' }))
await page.route('**/api/products', route => route.abort('failed')) // network dead
await page.route('**/api/search', async route => { await new Promise(r => setTimeout(r, 12000)); route.continue() }) // slowThe failure matrix
For each external dependency (payment, email, storage, auth provider, search, queue, third-party API):
| Failure | Expected behavior | Never acceptable |
| Timeout | bounded wait, user told, retry offered | infinite spinner |
| 500 | actionable error, state preserved | white screen, lost form data |
| 429 | backoff with jitter, queued | hammering the provider |
| Partial success | idempotent retry converges to one effect | double charge, duplicate email |
| Slow (10s+) | loading state, cancel option | frozen UI, main thread blocked |
| Dead entirely | degraded mode or clear outage message | cascading failure of unrelated features |
Non-negotiable properties
- Timeouts everywhere. A request without a timeout is an outage waiting for a slow dependency.
- Idempotency keys on every write that can be retried. Test the retry explicitly.
- Backoff with jitter. Synchronized retries are a self-inflicted DDoS.
- Circuit breaker on repeated failures, with a tested half-open recovery.
- No data corruption on partial failure: either the whole transaction or none of it.
- The user always learns something true. "Something went wrong" with no state is a defect.
Beyond the test suite
Game days on staging with real infrastructure faults (kill a pod, sever the database, fill the disk) belong to SRE, in a rehearsed window, with a rollback path and an owner watching. Never inject faults into production traffic on your own initiative — that is an operational decision with blast radius far beyond QA.
Output
DEPENDENCY payments
timeout 12s -> spinner never resolves, no error shown FAIL checkout.tsx:120
503 -> error shown, cart preserved, retry works PASS
retry after 500 -> second charge created FAIL charges.ts:88 (no idempotency key)Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

