chaos-experiment-author
Build-an-X workflow for a chaos experiment per the Principles of Chaos Engineering - defines steady-state hypothesis, picks the variables (real-world events: network latency, node failure, region outage), sets the blast radius (which percentage / namespace / user cohort), automates execution, and emits the verdict (steady-state held / didn't hold). Use to scope a chaos experiment before running it via Litmus / Chaos Mesh / Gremlin / Toxiproxy.
Install with skills.sh (any agent)
npx skills add testland/qa --skill chaos-experiment-authorchaos-experiment-author
Overview
Per chaos-principles (opens in new window), chaos engineering is "the discipline of experimenting on a system in order to build confidence in the system's capability to withstand turbulent conditions in production." This skill walks the team through authoring an experiment that honors the five principles - steady-state hypothesis, real-world events, running in production, continuous automation, and minimized blast radius - each applied in the step below that uses it.
When to use
Step 1 - Define the steady-state hypothesis
Per chaos-principles (opens in new window) principle 1: focus on measurable output. The hypothesis must be a number, not a feeling:
# experiments/checkout-network-latency.yaml
hypothesis:
steady_state:
metric: checkout_completion_rate
threshold: ">= 95%"
measured_over: "5 minutes"
source: "datadog dashboard 'checkout-success'"Bad hypotheses:
Good hypotheses:
Step 2 - Pick a real-world event to inject
Per chaos-principles (opens in new window) principle 2: vary real-world events. Don't inject "anything"; inject what could plausibly happen - events the team has already seen in real incidents or realistically expects. The catalog of event classes (network, compute, storage, time, region/zone, dependency, configuration) with concrete examples is in references/experiment-authoring.md.
Step 3 - Set the blast radius
Per chaos-principles (opens in new window) principle 5: minimize blast radius.
blast_radius:
scope: "1% of pods in the staging namespace"
duration: "5 minutes"
abort_conditions:
- "Sentry error rate exceeds 2%"
- "PagerDuty incident raised"
- "Manual abort signal"Start small; expand as confidence grows.
Step 4 - Pick the chaos tool
Default: chaos-mesh for Kubernetes stacks - CNCF-graduated, broadest fault catalog (network / pod / IO / time / stress), declarative CRDs that compose with the experiment YAML in Step 1. Use litmus-chaos when the team already runs Litmus workflows; gremlin-chaos for commercial multi-platform support outside Kubernetes; toxiproxy-chaos when the failure surface is purely TCP-level.
The tool's syntax (CRD, attack config, etc.) goes alongside the experiment YAML.
Step 5 - Automate
Per chaos-principles (opens in new window) principle 4: automate continuously.
# .github/workflows/chaos-monthly.yml
on:
schedule:
- cron: '0 4 1 * *' # 1st of every month, 4am UTC
jobs:
chaos:
runs-on: ubuntu-latest
steps:
- run: |
kubectl apply -f experiments/checkout-network-latency.yaml
# Wait for completion
kubectl wait --for=condition=Complete chaosengine/checkout-network-latency --timeout=10m
# Check verdict
kubectl get chaosengine/checkout-network-latency -o jsonpath='{.status.experimentStatus.verdict}'Schedule per the team's appetite - monthly for new experiments, weekly for established ones, on-demand for incident reproduction.
Step 6 - Run in production?
Per chaos-principles (opens in new window) principle 3: experiments in production are the gold standard. But:
| Stage | Use |
|---|---|
| Pre-prod (staging) | Initial experiment runs; confidence-building. |
| Canary (5% traffic) | Once steady-state holds in staging. |
| Production (full) | Mature experiments; team has playbook for abort. |
Most teams should start in staging. Move to production after the team has confidence and abort procedures.
Step 7 - Verdict + report
Emit a per-experiment verdict: the steady-state hypothesis, a pre / during / post metric table, observations, action items, and the next iteration. The full report template is in references/experiment-authoring.md.
Anti-patterns
The seven authoring anti-patterns, each with why it fails and the fixing step, are in references/experiment-authoring.md: hypothesis-as-feeling, inject-anything, production-first, no abort conditions, manual-only runs, one-off-then-forget, and skipping the verdict report.
Limitations
References
Chaos experiment authoring reference
View source (opens in new window)Chaos experiment authoring reference
Supporting detail for chaos-experiment-author. Step 2 uses the event catalog, Step 7 uses the verdict report template, and the anti-patterns table lists the mistakes each step guards against.
Real-world event catalog (Step 2)
Per principlesofchaos.org (opens in new window) principle 2, vary real-world events: inject what could plausibly happen, not "anything". Pick events the team has already seen in real incidents or realistically expects.
| Event class | Examples |
|---|---|
| Network | Latency 500ms, packet loss 5%, DNS failure, connection reset |
| Compute | Pod kill, CPU throttle, OOM kill, node drain |
| Storage | Disk full, slow disk, read failure |
| Time | Clock skew, leap second |
| Region / zone | Single AZ outage, multi-AZ outage |
| Dependency | Third-party API 500s, rate limit, timeout |
| Configuration | Bad config push, secret rotation failure |
Verdict report template (Step 7)
## Chaos experiment verdict - `checkout-network-latency`
**Date:** YYYY-MM-DD **Duration:** 5 minutes
**Steady-state hypothesis:** checkout_completion_rate >= 95%
**Verdict:** HELD
| Metric | Pre-experiment | During experiment | Post |
|--------------------------|----------------|-------------------|------|
| checkout_completion_rate | 97.2% | 96.8% | 97.5% |
| p95 latency | 245ms | 380ms | 240ms |
### Observations
- Latency increased as expected (300ms injected).
- Retry logic worked: ~200 retries observed; no user-visible failures.
### Action items
- (none - system behaved as expected)
### Next iteration
- Increase blast radius from 1% to 5% in next month's run.
- Add a longer-duration variant (15 min) to test fatigue.Anti-patterns
| Anti-pattern | Why it fails | Fix |
|---|---|---|
| Hypothesis as feeling ("system feels stable") | Unmeasurable; can't tell if held. | Numeric metric (Step 1). |
| Inject anything; see what breaks | Wastes effort; misses real failure modes. | Pick real-world events (Step 2). |
| Production-first experiment without staging | Risks user-visible incident on first run. | Staging -> canary -> production (Step 6). |
| No abort conditions | Experiment runs past safety threshold; real incident. | Define abort + manual abort signal (Step 3). |
| Manual experiment runs only | Per principlesofchaos.org (opens in new window): "labor-intensive and ultimately unsustainable." | Automate (Step 5). |
| One-off experiment then forget | Confidence decays; same incident recurs. | Schedule + repeat (Step 5 cron). |
| Skipping the verdict report | Lessons not captured; next iteration arbitrary. | Step 7 report. |
Related skills
chaos-drill-protocol
Run protocol for a chaos experiment that has already been designed: the four pre-flight gates (non-production target, measured healthy baseline, live observability, a rollback that has actually been exercised), how to pick a conservative blast-radius bound, the sampling cadence and abort criteria fixed in writing before injection, and the recovery-validation step with its tolerance and timeout. Owns execution safety only, not experiment design: the steady-state hypothesis, the fault to inject, and the experiment file come from elsewhere. Use when an experiment definition exists and a fault is about to be injected into a running system, and the go/no-go gates, abort thresholds, and recovery check still need to be agreed and written down before the fault starts.
chaos-mesh
Configures Chaos Mesh for Kubernetes-native chaos engineering - picks fault types (PodChaos, NetworkChaos, StressChaos, IOChaos, TimeChaos, DNSChaos, KernelChaos, HTTPChaos), targets via label selectors, controls blast radius via namespace whitelists + selector filters, schedules via CronJobs, observes via dashboard. Distinct from Litmus by architecture (Chaos Mesh has its own dashboard + workflow orchestration; Litmus uses ChaosCenter UI). Use when the target system runs on Kubernetes and fault experiments should be declared as CRDs in the cluster alongside the workloads they target.
chaos-results-reporter
Aggregates chaos drill verdicts over time into a resilience trend report - per-experiment hypothesis-held / blast-radius / time-to-detect / time-to-recover, degradation trends across runs, action items, and a stakeholder summary. Use when a team has completed one or more chaos drills and needs a structured trend report showing whether resilience is improving, degrading, or stable across iterations.
failure-injection-test-author
Orchestrates WireMock fault stubs (HTTP-level fault: 500s, malformed JSON, slow responses) with Toxiproxy (TCP-level: latency, packet loss, reset) into a single resilience test scenario - the test starts both, applies fault per scenario, runs the SUT against the impaired endpoints, verifies the SUT's resilience patterns. Use when one test must reproduce a combined network + HTTP failure - a cross-layer failure mode from an incident postmortem that neither pure HTTP fault stubs nor pure TCP chaos can cover alone, because most real failures span both layers.
gremlin-chaos
Configures Gremlin (commercial) for cross-platform chaos engineering (fault injection, resilience testing) - installs the Gremlin agent on Linux / Windows / Kubernetes, picks attack types (resource, network, state, request), chains attacks into Scenarios (chaos experiments), integrates with the Reliability Score for forward-looking metrics. Use when the platform spans multiple environments (bare metal + cloud + serverless) and the team needs a commercial-supported solution per Gremlin's multi-platform support.
litmus-chaos
Configures LitmusChaos for Kubernetes-native chaos engineering - installs via Helm, picks ChaosExperiments from the ChaosHub (`pod-delete`, `network-latency`, `node-cpu-hog`, etc.), authors a ChaosEngine CR scoping the experiment + steady-state probes, runs as part of the cluster, exports Prometheus metrics for the verdict. Use when the platform is Kubernetes (CNCF-hosted; cloud-native). Prefer over chaos-mesh when the team wants a ChaosCenter web UI for workflow scheduling and ChaosHub catalog browsing; use chaos-mesh for fine-grained network-fault policies via its own CRD family.
steady-state-hypothesis-validator
Validates a chaos experiment's steady-state hypothesis before execution: checks that each probe metric is measurable and observable, that a recent baseline exists, that tolerances are numerically meaningful and SLI-backed, that the measurement window is defined, and that the chosen metrics would actually move under the target failure mode. Use when a chaos experiment has been authored (via chaos-experiment-author) and the team needs a pre-flight verdict before running the drill in any environment.
toxiproxy-chaos
Configures Toxiproxy for TCP-level fault injection - runs as a sidecar / proxy between client and upstream, applies toxics (latency, bandwidth, slow_close, timeout, slicer, limit_data, reset_peer) via control API. Focused on the proxy itself rather than an API-level chaos runner, including non-test usage (chaos in dev environments, integration tests, pre-prod simulation). Use when the team needs TCP-precise fault injection in development / integration environments without K8s or commercial tooling.