/skillengine:chaos-engineeringfrom skillengine
Guides systematic fault injection and resilience testing for high availability and disaster recovery.
Ships in skillengine. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Chaos engineering is the discipline of experimenting on a system to build confidence in its capability to withstand turbulent conditions. Instead of hoping nothing breaks, you intentionally break things in controlled ways to discover weaknesses before they discover you in production.
The core insight: Systems fail in ways you didn't anticipate. You can't test for every failure mode, but you can systematically surface unknown dependencies, hidden single points of failure, and misconfigured timeouts. Chaos engineering turns "it probably works" into "we've proven it works under these failure conditions."
NOT for:
Before you break anything, define what "working" looks like:
STEADY STATE HYPOTHESIS:
- Metric: [quantifiable metric, e.g. p99 latency < 200ms]
- Baseline: [current observed value, e.g. 145ms]
- Threshold: [failure threshold, e.g. > 300ms]
- Duration: [how long the system must maintain this, e.g. 5 minutes]
Good steady state metrics:
Bad steady state metrics:
Every chaos experiment has five components:
1. SCOPE: What are we testing?
└── Single service? Whole region? Database cluster?
2. FAULT: What are we injecting?
└── Network latency? Packet loss? Service crash? Disk fill?
3. BLAST RADIUS: What's the maximum damage?
└── One pod? One AZ? Can we abort instantly?
4. ABORT CONDITIONS: When do we stop?
└── Error rate > 1%? Latency > 500ms? Customer complaints?
5. ROLLBACK: How do we undo?
└── Kill switch? Feature flag? Automatic after duration?
Blast radius progression (never skip steps):
Development environment → Single instance → Single AZ → Production canary → Full production
Execute with a clear observer and an abort button:
# Example: Network latency injection with tc (Linux)
# Add 100ms latency to eth0 for 60 seconds
tc qdisc add dev eth0 root netem delay 100ms 20ms distribution normal
echo "Injecting latency... Press Ctrl+C to abort"
sleep 60
tc qdisc del dev eth0 root netem # Cleanup
During the experiment:
Compare results to your steady state hypothesis:
## Experiment Results: [Name]
### Hypothesis
During [fault], [metric] will remain within [threshold] because [reasoning].
### Actual Results
| Metric | Baseline | During Fault | Delta | Hypothesis |
|--------|----------|--------------|-------|------------|
| p99 latency | 145ms | 890ms | +745ms | ❌ FAILED |
| Error rate | 0.01% | 12.3% | +12.29% | ❌ FAILED |
| Checkout rate | 450/min | 48/min | -402/min | ❌ FAILED |
### What We Learned
- The caching layer timeout (30s) is too long — downstream failures cascade
- The fallback to stale cache data isn't being triggered (bug in fallback logic)
- Database connection pool (size 10) exhausted under retry storm
### Action Items
1. Reduce cache timeout to 2s with stale-while-revalidate
2. Fix fallback logic: should serve stale cache on cache miss + dependency down
3. Increase connection pool to 50 with circuit breaker
Every failed experiment must result in fixes and a re-run:
Fix identified weakness → Deploy fix → Re-run same experiment → Verify hypothesis passes
A chaos experiment that fails and isn't re-run is worse than no experiment — it proves you know about a weakness and haven't fixed it.
# CPU stress
stress-ng --cpu 8 --timeout 60s
# Memory exhaustion
stress-ng --vm 4 --vm-bytes 1G --timeout 60s
# Disk I/O saturation
fio --name=randwrite --ioengine=libaio --iodepth=32 --rw=randwrite \
--bs=4k --direct=1 --size=4G --numjobs=4 --runtime=60
# Network partition (block specific host)
iptables -A OUTPUT -d 10.0.1.5 -j DROP
# ... experiment ...
iptables -D OUTPUT -d 10.0.1.5 -j DROP # Cleanup
# Kill a random pod (Kubernetes)
kubectl delete pod -l app=api-gateway --grace-period=0 --force
# Simulate dependency timeout
# Configure HTTP client timeout to 1ms temporarily
# Database connection failure
# iptables block to database port
iptables -A OUTPUT -p tcp --dport 5432 -j DROP
// Programmatic fault injection with a chaos proxy
import { ChaosProxy } from './chaos-proxy';
const proxy = new ChaosProxy({
target: 'https://payments-api.internal',
faults: [
{ type: 'latency', duration: '100ms', probability: 0.1 },
{ type: 'error', statusCode: 503, probability: 0.05 },
{ type: 'timeout', delay: '5s', probability: 0.02 },
],
});
Level 1 — Ad-hoc → Run experiments manually, reactively after incidents
Level 2 — Planned → Schedule experiments, define hypotheses, measure results
Level 3 — Automated → CI pipeline runs experiments automatically, gates deploys
Level 4 — Continuous → Production runs small experiments continuously (1% of traffic)
Level 5 — Game Days → Regular cross-team disaster simulations with business stakeholders
| Layer | Tools | What They Test |
|---|---|---|
| Infrastructure | Chaos Monkey, Gremlin, AWS Fault Injection Simulator | EC2/VM failures, AZ outages, network partitions |
| Kubernetes | PowerfulSeal, Litmus, Chaos Mesh | Pod kills, network policies, resource limits |
| Application | Toxiproxy, Wiremock (fault mode), custom proxies | Dependency latency, timeouts, error responses |
| Database | Jepsen, pgbench with fault injection | Transaction consistency, replication lag, failover |
| Network | tc, Pumba, Blockade | Latency, packet loss, bandwidth limits, partitions |
A game day is a scheduled, cross-team chaos event that simulates a major outage:
Week Before:
├── Define scenario (e.g., "Primary database fails during peak traffic")
├── Identify observers from each team
├── Prepare runbook for the scenario
├── Schedule war room (video call + shared doc)
└── Notify stakeholders (don't surprise customer-facing teams)
Day Of:
├── 0:00 — Inject fault (controlled, with observer ready)
├── 0:01-0:05 — Detect: How long until monitoring shows the issue?
├── 0:05-0:15 — Triage: What's the blast radius? Which users are affected?
├── 0:15-0:30 — Respond: Execute runbook, apply mitigations
├── 0:30-0:45 — Recover: Verify steady state restored
├── 0:45-1:00 — Document: Record timeline, decisions, and gaps
└── 1:00+ — Retro: What worked, what didn't, what needs fixing
| Rationalization | Reality |
|---|---|
| "We can't test in production" | That's what staging is for. Run experiments there first. But eventually you must test production — staging is never identical. |
| "Our system is too simple for chaos engineering" | Simple systems have simple failure modes. A single dependency failure might be catastrophic. Test it. |
| "We'll just add retries and circuit breakers" | Retries without backoff create retry storms. Circuit breakers without tuning trip too early or too late. Chaos engineering validates these configurations empirically. |
| "This is too risky" | Running without resilience validation is riskier. You just don't know your risk exposure. |
| "We can test this with unit tests" | Unit tests validate code. Chaos engineering validates system behavior under real-world failure conditions. Both are necessary. |
references/reliability-checklist.mdreferences/security-checklist.mdreferences/performance-checklist.mdBefore declaring a system chaos-ready:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub borhen68/skillengine --plugin skillengine28 skills in this plugin
/ai-opsGuides operational excellence for AI/ML systems in production. Use when deploying models, managing inference infrastructure, monitoring model drift, or maintaining AI-powered features. Use when you need reliable, observable, and governable machine learning systems./api-and-interface-designGuides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend./browser-testing-with-devtoolsTests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.Other plugins' skills for the same job