| name | chaos-engineer |
| description | Designs chaos experiments, creates failure injection frameworks, and facilitates game day exercises for distributed systems — producing runbooks, experiment manifests, rollback procedures, and post-mortem templates. Use when designing chaos experiments, implementing failure injection frameworks, or conducting game day exercises. Invoke for chaos experiments, resilience testing, blast radius control, game days, antifragile systems, fault injection, Chaos Monkey, Litmus Chaos. |
| license | MIT |
| metadata | {"author":"https://github.com/Jeffallan","version":"1.1.0","domain":"devops","triggers":"chaos engineering, resilience testing, failure injection, game day, blast radius, chaos experiment, fault injection, Chaos Monkey, Litmus Chaos, antifragile","role":"specialist","scope":"implementation","output-format":"code","related-skills":"sre-engineer, devops-engineer, kubernetes-specialist"} |
Chaos Engineer
When to Use This Skill
- Designing and executing chaos experiments
- Implementing failure injection frameworks (Chaos Monkey, Litmus, etc.)
- Planning and conducting game day exercises
- Building blast radius controls and safety mechanisms
- Setting up continuous chaos testing in CI/CD
- Improving system resilience based on experiment findings
Core Workflow
- System Analysis - Map architecture, dependencies, critical paths, and failure modes
- Experiment Design - Define hypothesis, steady state, blast radius, and safety controls
- Execute Chaos - Run controlled experiments with monitoring and quick rollback
- Learn & Improve - Document findings, implement fixes, enhance monitoring
- Automate - Integrate chaos testing into CI/CD for continuous resilience
Reference Guide
Load detailed guidance based on context:
| Topic | Reference | Load When |
|---|
| Experiments | references/experiment-design.md | Designing hypothesis, blast radius, rollback |
| Infrastructure | references/infrastructure-chaos.md | Server, network, zone, region failures |
| Kubernetes | references/kubernetes-chaos.md | Pod, node, Litmus, chaos mesh experiments |
| Tools & Automation | references/chaos-tools.md | Chaos Monkey, Gremlin, Pumba, CI/CD integration |
| Game Days | references/game-days.md | Planning, executing, learning from game days |
Safety Checklist
Non-obvious constraints that must be enforced on every experiment:
- Steady state first — define and verify baseline metrics before injecting any failure
- Blast radius cap — start with the smallest possible impact scope; expand only after validation
- Automated rollback ≤ 30 seconds — abort path must be scripted and tested before the experiment begins
- Single variable — change only one failure condition at a time until behaviour is well understood
- No production without safety nets — customer-facing environments require circuit breakers, feature flags, or canary isolation
- Close the loop — every experiment must produce a written learning summary and at least one tracked improvement
Output Templates
When implementing chaos engineering, provide:
- Experiment design document (hypothesis, metrics, blast radius)
- Implementation code (failure injection scripts/manifests)
- Monitoring setup and alert configuration
- Rollback procedures and safety controls
- Learning summary and improvement recommendations
Concrete Example: Pod Failure Experiment (Litmus Chaos)
The following shows a complete experiment — from hypothesis to rollback — using Litmus Chaos on Kubernetes.
Step 1 — Define steady state and apply the experiment
kubectl get deploy my-service -n production
kubectl top pods -n production -l app=my-service
Step 2 — Create and apply a Litmus ChaosEngine manifest
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: my-service-pod-delete
namespace: production
spec:
appinfo:
appns: production
applabel: "app=my-service"
appkind: deployment
engineState: active
chaosServiceAccount: litmus-admin
experiments:
- name: pod-delete
spec:
components:
env:
- name: TOTAL_CHAOS_DURATION
value: "60"
- name: CHAOS_INTERVAL
value: "20"
- name: FORCE
value: "false"
- name: PODS_AFFECTED_PERC
value: "33"
kubectl apply -f chaos-pod-delete.yaml
kubectl describe chaosengine my-service-pod-delete -n production
kubectl get chaosresult my-service-pod-delete-pod-delete -n production -w
Step 3 — Monitor during the experiment
kubectl logs -l app=my-service -n production --since=2m -f
kubectl get chaosresult my-service-pod-delete-pod-delete \
-n production -o jsonpath='{.status.experimentStatus.verdict}'
Step 4 — Rollback / abort if steady state is violated
kubectl patch chaosengine my-service-pod-delete \
-n production --type merge -p '{"spec":{"engineState":"stop"}}'
kubectl rollout status deployment/my-service -n production
Concrete Example: Network Latency with toxiproxy
brew install toxiproxy
toxiproxy-server &
toxiproxy-cli create -l 0.0.0.0:22222 -u downstream-db:5432 db-proxy
toxiproxy-cli toxic add db-proxy -t latency -a latency=300 -a jitter=30
toxiproxy-cli toxic remove db-proxy -n latency_downstream
Concrete Example: Chaos Monkey (Spinnaker / standalone)
deployment:
enabled: true
regionIndependence: false
chaos:
enabled: true
meanTimeBetweenKillsInWorkDays: 2
minTimeBetweenKillsInWorkDays: 1
grouping: APP
exceptions:
- account: production
region: us-east-1
detail: "*-canary"
chaos-monkey --app my-service --account staging --dry-run false
Documentation