chaos-engineering
Skill0 starsChanged 33 days agoMITView on GitHub
Running controlled chaos experiments to find resilience weaknesses before production does: defines a steady-state hypothesis, injects realistic faults (latency, pod kill, disk fill, dependency failure) with Toxiproxy, tc/netem, Litmus, and stress-ng, limits blast radius, observes system behaviour against the hypothesis, runs a GameDay, and turns findings into hardening tasks. Use when you want to run a chaos experiment, test resilience, simulate a database outage, inject latency, do a GameDay, test circuit breakers, verify retry logic works, or find hidden failure modes.
- Installs packages
13 other projects use a version of this.
Adopted by
Most recently taken up by
- darkweb19/skillstheir own version, first seen Nov 8, 2026
- jason0971/skillstheir own version, first seen Nov 8, 2026
- Cure-Consulting-Group/ProductEngineeringSkillstheir own version, first seen Nov 4, 2026
- petrkindlmann/qa-skillstheir own version, first seen Oct 25, 2026
- nimadorostkar/Claude-Skills-collectiontheir own version, first seen Oct 13, 2026
- Hassaan146/claude-skillstheir own version, first seen Jul 25, 2026
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- petrkindlmann/qa-skills★ 209same name
- samsantosb/ship-it★ 37same name
- nimadorostkar/Claude-Skills-collection★ 33same name
- Hassaan146/claude-skills★ 18same name
- an8079/take-skills★ 4same name
- Cure-Consulting-Group/ProductEngineeringSkills★ 3same name
- csiddhant796-blip/claude-skills-collection★ 2same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- Hussain-Elfalah/Agentic-Skills★ 2same name
- jason0971/skills★ 1same name
3 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository68 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- accessibilitySkill
- api-designSkill
- api-versioningSkill
- authSkill
- background-jobsSkill
- cachingSkill
- capacity-planningSkill
- changelogSkill
- ci-cdSkill
- circuit-breakerSkill
- claude-best-practicesSkill
- code-commentsSkill
- code-hygieneSkill
- code-reviewSkill
- code-structureSkill
- commit-styleSkill
- concurrency-and-lockingSkill
- database-transactionsSkill
- data-consistencySkill
- debug-infra-startupSkill
- debug-sessionSkill
- demo-video-creatorSkill
- demo-video-script-creatorSkill
- dependency-injectionSkill
- dependency-updateSkill
- disk-cleanupSkill
- distributed-tracingSkill
- dockerSkill
- env-configSkill
- env-setupSkill
- error-handlingSkill
- event-driven-architectureSkill
- feature-flagsSkill
- file-storageSkill
- graceful-shutdownSkill
- idempotencySkill
- input-validationSkill
- jars-engineering-blogsmithSkill
- jars-workshop-builderSkill
- licensingSkill
- loggingSkill
- memory-and-allocationsSkill
- migrate-dbSkill
- monitoringSkill
- multi-tenancySkill
- notificationsSkill
- openapiSkill
- paginationSkill
- perf-profileSkill
- pr-descriptionSkill
- query-optimizationSkill
- rate-limitingSkill
- refactorSkill
- releaseSkill
- runbook-writerSkill
- searchSkill
- secrets-auditSkill
- simplifySkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 9 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
9
Distinctive
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 22
Write it down before touching anything:
- Distinctive: line 43
Never run a chaos experiment without limiting the blast radius.
- Distinctive: line 55
If the abort metric is breached, stop the fault injection immediately and let the system recover before investigating.
- Distinctive: line 196
Run the experiment and watch these simultaneously:
- Distinctive: line 251
Every experiment that reveals a gap produces a ticket:
- Distinctive: line 265
Start in staging. Graduate to production only after multiple successful staging runs.
- Distinctive: line 268
Always have a kill switch ready — a single command that removes all fault injection immediately.
- Distinctive: line 270
Never experiment on payment flows, PII pipelines, or data that cannot be rolled back without explicit sign-off from the team.
- Distinctive: line 272
Document every run: hypothesis, what actually happened, recovery time, action items.
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
chaos-engineering
Break things on purpose, in a controlled way, to find weaknesses before they find you.
1. The experiment structure — never skip this
A chaos run without a hypothesis is just vandalism. Every experiment has five parts:
1. Steady state — what does "healthy" look like right now? (metric + threshold)
2. Hypothesis — "if we inject X, the system will continue to Y"
3. Blast radius — scope the experiment so failures stay contained
4. Inject fault — introduce the failure
5. Observe — did the system behave as hypothesised? if not, why?Write it down before touching anything:
## Experiment: DB primary failover
**Steady state:** order API p99 < 300 ms, error rate < 0.1 % over the last 5 min
**Hypothesis:** if the primary database node fails, the app reconnects to the
replica within 10 s and resumes serving requests with < 1 % errors
**Blast radius:** staging environment only; 10 % of synthetic traffic
**Fault:** kill the primary PostgreSQL container
**Abort condition:** error rate > 5 % for > 60 s → stop the experiment immediately2. Blast radius control — non-negotiable
Never run a chaos experiment without limiting the blast radius. Start as small as possible and expand only when confidence is high.
| Dimension | How to limit |
| Environment | Start in staging; never start in production |
| Traffic | Route a percentage of traffic to the experiment cohort (feature flag, header) |
| Time | Set a hard end time; use a kill switch to stop injection immediately |
| Scope | Target one service, one region, one AZ — not the whole fleet |
| Data | Use synthetic or shadow traffic; never experiment on live user payment flows |
Abort conditions must be defined before the experiment starts, not decided in the moment. If the abort metric is breached, stop the fault injection immediately and let the system recover before investigating.
3. Tools
| Tool | Best for |
| Chaos Monkey | Random EC2/instance termination |
| Litmus | Kubernetes-native fault injection (pod kill, node drain, network chaos) |
| chaos-mesh | Kubernetes: network partition, latency, pod failure, I/O fault |
| Toxiproxy | TCP-level latency, jitter, bandwidth, disconnect — great for local/CI |
| tc + netem | Linux kernel network emulation — no extra install |
| stress-ng | CPU, memory, and I/O saturation |
| kill / SIGSTOP | Process pause/kill — no tools needed |
4. Fault recipes
Latency injection — Toxiproxy (local / CI)
# Install
brew install toxiproxy # or download binary from releases
# Start proxy
toxiproxy-server &
# Create a proxy in front of your PostgreSQL
toxiproxy-cli create postgres_proxy --listen 0.0.0.0:5433 --upstream localhost:5432
# Add 300 ms latency with 50 ms jitter (simulates a flaky network)
toxiproxy-cli toxic add postgres_proxy --type latency --attribute latency=300 --attribute jitter=50
# Point your app at port 5433 instead of 5432
DATABASE_URL=postgresql://user:pass@localhost:5433/mydb
# Observe — does your connection pool handle it? do queries time out gracefully?
# Remove the toxic
toxiproxy-cli toxic remove postgres_proxy --toxicName latency_downstream
# Nuclear option — cut the connection entirely (timeout simulation)
toxiproxy-cli toxic add postgres_proxy --type timeout --attribute timeout=0Network latency — Linux tc/netem (no extra install)
# Add 200 ms delay to all outbound traffic on eth0
tc qdisc add dev eth0 root netem delay 200ms
# Add 200 ms delay with 20 ms jitter and 10 % packet loss
tc qdisc add dev eth0 root netem delay 200ms 20ms loss 10%
# Remove
tc qdisc del dev eth0 root
# Scope to a specific destination IP only (e.g., your DB server)
tc qdisc add dev eth0 root handle 1: prio
tc qdisc add dev eth0 parent 1:3 handle 30: netem delay 200ms
tc filter add dev eth0 protocol ip parent 1:0 prio 3 u32 \
match ip dst <DB_IP>/32 flowid 1:3Pod kill — Kubernetes / Litmus
# litmus-pod-delete.yaml
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: order-service-pod-delete
namespace: staging
spec:
appinfo:
appns: staging
applabel: "app=order-service"
appkind: deployment
chaosServiceAccount: litmus-admin
experiments:
- name: pod-delete
spec:
components:
env:
- name: TOTAL_CHAOS_DURATION
value: "60" # inject for 60 s
- name: CHAOS_INTERVAL
value: "10" # kill a pod every 10 s
- name: FORCE
value: "false" # graceful kill firstkubectl apply -f litmus-pod-delete.yaml
# Watch your monitoring dashboard — does the deployment recover?
# Does the load balancer stop routing to the killed pod fast enough?
kubectl delete -f litmus-pod-delete.yaml # stop the experimentCPU saturation — stress-ng
# Saturate 2 CPU cores for 60 seconds
stress-ng --cpu 2 --timeout 60s --metrics-brief
# Does your service degrade gracefully? Does it shed load or just get slower?
# Watch: request queue depth, p99 latency, error rateDisk fill — simulate storage pressure
# Fill disk to 90 % capacity temporarily
fallocate -l $(df / | awk 'NR==2 {printf "%.0f", $4 * 0.8}')K /tmp/chaos_fill
# Observe: does the app handle ENOSPC errors? do logs rotate? does the DB crash?
# Clean up
rm /tmp/chaos_fillDependency kill — simulate a downstream service going down
# Block all traffic to an external dependency IP/port with iptables
iptables -A OUTPUT -p tcp --dport 443 -d api.stripe.com -j DROP
# Does your circuit breaker trip? Does the error surface cleanly to the user?
# Does the retry logic back off or hammer the blocked endpoint?
# Remove the rule
iptables -D OUTPUT -p tcp --dport 443 -d api.stripe.com -j DROP5. What to observe during an experiment
Run the experiment and watch these simultaneously:
✓ Error rate — is it within the abort threshold?
✓ p99 latency — is it degrading or holding?
✓ Retry counters — are retries firing? are they backing off?
✓ Circuit breaker — did it open? did it half-open and recover?
✓ Queue depth — is work piling up?
✓ Downstream errors — is the fault spreading to other services?
✓ Recovery time — how long from fault injection to steady state restored?Record the actual numbers, not just "it worked" or "it failed."
6. GameDay — structured team exercise
A GameDay is a scheduled, team-wide chaos experiment run like a fire drill.
## GameDay runbook template
**Date:** YYYY-MM-DD **Duration:** 2 hours **Environment:** staging
### Scenario
Primary database AZ goes down. Replica promoted. S3 returns 503 for 5 min.
### Roles
- Experiment lead: runs the fault injection, watches abort conditions
- Observability: monitors dashboards, calls abort if threshold breached
- On-call engineer: responds as if this were a real incident
- Scribe: records timeline, findings, and action items
### Timeline
| Time | Action |
|-------|--------|
| T+0 | Baseline captured, steady state confirmed |
| T+5 | Kill primary DB container |
| T+15 | Restore primary DB |
| T+20 | Inject S3 503 responses via Toxiproxy |
| T+30 | Remove S3 fault |
| T+35 | Debrief begins |
### Findings → action items
| Finding | Severity | Owner | Due |
|---------|----------|-------|-----|
| Replica failover took 45 s, SLA is 10 s | High | DB team | 2 weeks |
| S3 errors surfaced as 500 to users, not 503 | Medium | API team | 1 month |7. Turn findings into hardening
Every experiment that reveals a gap produces a ticket:
| Finding | Hardening action |
| Circuit breaker never opened | Add circuit breaker; tune failure threshold |
| Retry logic hammered the broken dependency | Add exponential back-off + jitter |
| Failover took 45 s | Tune health check interval + DB connection timeout |
| Error from dependency leaked as 500 | Map external errors to appropriate status codes |
| Service crashed on disk full | Add ENOSPC error handling; set up log rotation |
| Downstream failure spread to callers | Add bulkhead / timeout on the outbound call |
Rules
- Define the hypothesis and abort conditions before starting. Never improvise mid-experiment.
- Start in staging. Graduate to production only after multiple successful staging runs.
- One fault at a time. Injecting multiple faults simultaneously makes root cause impossible to determine.
- Always have a kill switch ready — a single command that removes all fault injection immediately. Test the kill switch before running the experiment.
- Never experiment on payment flows, PII pipelines, or data that cannot be rolled back without explicit sign-off from the team.
- Document every run: hypothesis, what actually happened, recovery time, action items. An undocumented chaos run teaches the team nothing.
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.

