Chaos engineering

From borghei/Claude-Skills · View interactive version

Chaos engineering is an AI agent skill from the GitHub repository borghei/Claude-Skills. Designs hypothesis-driven fault-injection experiments, sizes their blast radius and plans gamedays. Use when designing a chaos experiment, planning a gameday, choosing what to inject, or building a chaos maturity model.

How to use this skill

Skill file

Chaos Engineering

End-to-end chaos engineering: experiment design, fault injection catalog, gameday execution, and the maturity model that turns one-off "let's break stuff" exercises into a reliable discipline. Provider-agnostic — works whether you use Litmus, Chaos Mesh, AWS FIS, Gremlin, ChaosToolkit, or hand-rolled scripts.

This skill answers four questions: what to inject, where to inject it, how to size the blast, and how to extract durable learning from each run.

Core Capabilities

When to Use

| Situation | Skill applies |

|-----------|---------------|

| Spinning up a chaos program from scratch | Yes — start with maturity model + first 5 experiments |

| Designing a single experiment for a known concern | Yes — use the experiment design loop |

| Planning a gameday for a team or service | Yes — use scripts/gameday_planner.py |

| Validating a kill switch or fallback path actually works | Yes — chaos is the way to test these in prod-like conditions |

| Post-incident verification: "did the fix really fix it?" | Yes — re-inject the original fault, confirm the new behavior |

| Compliance evidence (SOC 2 A1 / DORA Art. 25) | Yes — chaos runs produce auditable resilience-testing evidence |

| Improving SLOs / error budgets | Pair with engineering/observability-designer — chaos surfaces SLO violations |

Clarify First

Before designing the experiment, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.

Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.

Workflow

The scripts write plans and documents only; they never touch a system.

# 1. Scaffold the experiment doc (hypothesis, steady state, abort criteria, checklist)
python scripts/chaos_experiment_designer.py --target payments-svc --fault dependency-timeout --duration 5m
python scripts/chaos_experiment_designer.py --list-faults          # the nine fault types

# 2. Size the blast: worst-case affected users, recommended caps, abort timing
python scripts/blast_radius_calculator.py --users 100000 --percent-targeted 1 --duration 60

# 3. Plan a gameday from scenario ids
python scripts/gameday_planner.py --service search-api --duration full --scenarios dep-timeout,partition,az-degraded
python scripts/gameday_planner.py --list-scenarios                 # pod-kill, rolling-restart, latency, partition,
                                                                   # dep-error, dep-timeout, cpu-stress, memory-pressure,
                                                                   # disk-fill, cache-flush, traffic-spike, az-degraded

All three take --format markdown|json (human|json for the calculator) and --output FILE.

Exit codes: 0 document written; 2 bad arguments (unknown fault or scenario id, out-of-range percent).

Go / no-go before any run. Do not inject until every item is true, because a run without them produces risk and no learning:

  1. The steady-state metric and its normal range are written down and visible on a dashboard.
  2. The hypothesis names the expected behaviour under the fault ("p99 stays under 800 ms, fallback serves cached prices").
  3. Abort criteria are numeric, agreed, and someone owns the abort command.
  4. The blast radius is within the calculator's recommended cap for the current maturity level.
  5. On-call knows the window, and production runs have a rollback that was tested in staging.

Done when: the run's result is recorded against the hypothesis, any weakness found has a ticket with an owner, and the experiment is either promoted to a recurring run or retired with a reason.

Anti-Patterns

Breaking things without a hypothesis

Mistake: Killing pods "to see what happens", with no steady-state metric or expected outcome.

Why it happens: Injection tools make faults easy; writing a hypothesis feels like paperwork.

Instead: Write the hypothesis and steady state first. Without them you cannot tell a pass from a fail, so nothing is learned.

Starting at full blast

Mistake: The first experiment on a service hits 50% of production traffic for 30 minutes.

Why it happens: Small experiments feel too small to prove anything.

Instead: Start at one pod, 1% or one minute and grow only after a pass. blast_radius_calculator.py shows the worst case before you commit.

Findings with no follow-up

Mistake: The gameday surfaces three weaknesses, the debrief notes them, and nothing is ticketed.

Why it happens: The exercise ends when the faults stop, and the action items have no owner.

Instead: End every run with owned tickets and re-run the same fault after the fix lands to confirm it.

Files

Scope & Limitations

In Scope:

Out of Scope:

Important Caveats:

References

Load the reference that matches the task — keep this file lean and pull detail on demand:

Related skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.