chaos-engineer — Claude Code skill: chaos experiments and game days
Plans chaos experiments, sets up failure injection and runs game day exercises. Useful when you need to see how a distributed system survives a killed pod or a slow network link.
npx skills add Jeffallan/claude-skills --skill chaos-engineer -a claude-codeWhat chaos-engineer does
The skill walks a fixed path: map the architecture and dependencies, write a hypothesis and a steady state, cap the blast radius, run the experiment with monitoring and a fast abort, then record what you learned and track one improvement. Reference files cover experiment design, infrastructure failures, Kubernetes, tooling and game days, and the skill pulls the right one for the context at hand.
Deliverables include an experiment document with metrics, injection manifests and scripts, alert configuration, a rollback procedure and a post-mortem template. The examples cover a Litmus ChaosEngine that deletes pods, toxiproxy latency against a downstream database, and a Chaos Monkey config scoped to one ASG.
Safety rules are strict. Baseline first, failure second. Smallest scope at the start. Scripted rollback within 30 seconds. One variable at a time. On customer-facing systems the skill blocks the experiment unless circuit breakers, feature flags or canary isolation are in place. On Linux, toxiproxy comes from the binary release rather than brew.
What it helps with
- design a chaos experiment with a hypothesis and metrics
- cap the blast radius of a fault injection
- write a Litmus ChaosEngine manifest for pod deletion
- add latency to traffic hitting a downstream dependency with toxiproxy
- prepare a rollback procedure and a post-mortem template
Example prompts for the agent
- Design a chaos experiment for
my-servicein theproductionnamespace: hypothesis, steady state, blast radius and rollback - Write a Litmus manifest that deletes pods but touches no more than 33% of replicas
- Lay out a game day plan for the team: scenarios, monitoring and a debrief
How to install chaos-engineer
1Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill chaos-engineer -a claude-code2Manually: put the files in place
~/.claude/skills/chaos-engineer/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/chaos-engineer/
1Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill chaos-engineer -a codex2Manually: put the files in place
.agents/skills/chaos-engineer/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill chaos-engineer -a cursor2Manually: put the files in place
.cursor/skills/chaos-engineer/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Jeffallan/claude-skills chaos-engineer2Manually: put the files in place
.github/skills/chaos-engineer/SKILL.md1Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill chaos-engineer -a gemini-cli2Platform CLI
gemini skills install https://github.com/Jeffallan/claude-skills --path skills/chaos-engineerManually: put the files in place
.devin/skills/chaos-engineer/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill chaos-engineer -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about chaos-engineer
How do I install chaos-engineer in Claude Code?
Run npx skills add Jeffallan/claude-skills --skill chaos-engineer -a claude-code. The skill file lands at ~/.claude/skills/chaos-engineer/SKILL.md.
What does chaos-engineer do?
It designs chaos experiments, helps build a failure injection framework and facilitates game days. Output includes the experiment document, injection code and manifests, monitoring setup, a rollback procedure and a post-mortem template.
What safety limits does it enforce?
Verify the steady state before injecting anything, start with the smallest scope, keep automated rollback within 30 seconds, and change one variable at a time. In production the skill requires circuit breakers, feature flags or canary isolation before an experiment runs.
Source text
SKILL.md · MIT
---
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
company: https://synergetic.solutions
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
1. **System Analysis** - Map architecture, dependencies, critical paths, and failure modes
2. **Experiment Design** - Define hypothesis, steady state, blast radius, and safety controls
3. **Execute Chaos** - Run controlled experiments with monitoring and quick rollback
4. **Learn & Improve** - Document findings, implement fixes, enhance monitoring
5. **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:
1. Experiment design document (hypothesis, metrics, blast radius)
2. Implementation code (failure injection scripts/manifests)
3. Monitoring setup and alert configuration
4. Rollback procedures and safety controls
5. 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
```bash
# Verify baseline: p99 latency < 200ms, error rate < 0.1%
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
```yaml
# chaos-pod-delete.yaml
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: my-service-pod-delete
namespace: production
spec:
appinfo:
appns: production
applabel: "app=my-service"
appkind: deployment
# Limit blast radius: only 1 replica at a time
engineState: active
chaosServiceAccount: litmus-admin
experiments:
- name: pod-delete
spec:
components:
env:
- name: TOTAL_CHAOS_DURATION
value: "60" # seconds
- name: CHAOS_INTERVAL
value: "20" # delete one pod every 20s
- name: FORCE
value: "false"
- name: PODS_AFFECTED_PERC
value: "33" # max 33% of replicas affected
```
```bash
# Apply the experiment
kubectl apply -f chaos-pod-delete.yaml
# Watch experiment status
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
```bash
# Tail application logs for errors
kubectl logs -l app=my-service -n production --since=2m -f
# Check ChaosResult verdict when complete
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
```bash
# Immediately stop the experiment
kubectl patch chaosengine my-service-pod-delete \
-n production --type merge -p '{"spec":{"engineState":"stop"}}'
# Confirm all pods are healthy
kubectl rollout status deployment/my-service -n production
```
## Concrete Example: Network Latency with toxiproxy
```bash
# Install toxiproxy CLI
brew install toxiproxy # macOS; use the binary release on Linux
# Start toxiproxy server (runs alongside your service)
toxiproxy-server &
# Create a proxy for your downstream dependency
toxiproxy-cli create -l 0.0.0.0:22222 -u downstream-db:5432 db-proxy
# Inject 300ms latency with 10% jitter — blast radius: this proxy only
toxiproxy-cli toxic add db-proxy -t latency -a latency=300 -a jitter=30
# Run your load test / observe metrics here ...
# Remove the toxic to restore normal behaviour
toxiproxy-cli toxic remove db-proxy -n latency_downstream
```
## Concrete Example: Chaos Monkey (Spinnaker / standalone)
```bash
# chaos-monkey-config.yml — restrict to a single ASG
deployment:
enabled: true
regionIndependence: false
chaos:
enabled: true
meanTimeBetweenKillsInWorkDays: 2
minTimeBetweenKillsInWorkDays: 1
grouping: APP # kill one instance per app, not per cluster
exceptions:
- account: production
region: us-east-1
detail: "*-canary" # never kill canary instances
# Apply and trigger a manual kill for testing
chaos-monkey --app my-service --account staging --dry-run false
```
Maintained by [@jeffallan](https://github.com/jeffallan), Principal Consultant at [Synergetic Solutions](https://synergetic.solutions)
[Documentation](https://jeffallan.github.io/claude-skills/skills/devops/chaos-engineer/)
© https://github.com/Jeffallan · MIT · Jeffallan/claude-skills