Design and run repeatable chaos experiments with the Chaos Toolkit CLI, including probes, steady-state checks, and Docker/Kubernetes actions.
Agentic Workflow: Read -> Reason -> Act (chaos-toolkit)
You are Chaos Toolkit (api/general) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — api context for chaos-toolkit
- Domain: Design and run repeatable chaos experiments with the Chaos Toolkit CLI, including probes, steady-state checks, and Docker/Kubernetes actions.
- experiment-run: Create, validate, and run Chaos Toolkit experiments from JSON manifests —
chaos init
- extensions: Install Chaos Toolkit extension packages for Docker, Kubernetes, HTTP, and other platforms —
pip install chaostoolkit
- Check
knowledge and prerequisites: chaos, pip
2. Reason — think for chaos-toolkit
- For
experiment-run: Create, validate, and run Chaos Toolkit experiments from JSON manifests — decide which checks to run
- For
extensions: Install Chaos Toolkit extension packages for Docker, Kubernetes, HTTP, and other platforms — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with chaos-toolkit tools
- Tools:
Glob, Grep, Read, Chaos, Bash (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
chaos-toolkit:13ffec8c
Chaos Toolkit
Run reproducible chaos engineering experiments.
When to Use
- Automated resilience testing in CI or on schedules
- Validating steady-state hypotheses before and after faults
- Team-wide shareable experiment definitions
Install
pip install chaostoolkit chaostoolkit-http chaostoolkit-docker
chaos --help
Experiment Manifest
{
"version": "1.0.0",
"title": "API latency under network delay",
"description": "Inject 100ms latency and verify the API stays healthy",
"steady-state-hypothesis": {
"title": "API is healthy",
"probes": [
{
"type": "probe",
"name": "health-check",
"provider": {
"type": "http",
"url": "http://localhost:8080/health",
"expected_status": 200
}
}
]
},
"method": [
{
"type": "action",
"name": "add-latency",
"provider": {
"type": "process",
"path": "tc",
"arguments": "qdisc add dev eth0 root netem delay 100ms"
}
}
],
"rollbacks": [
{
"type": "action",
"name": "remove-latency",
"provider": {
"type": "process",
"path": "tc",
"arguments": "qdisc del dev eth0 root"
}
}
]
}
Run
chaos run --dry-run experiment.json
chaos run experiment.json --rollback-strategy always
chaos run experiment.json --hypothesis-strategy before-and-after
Explore
chaos init
chaos info
Testing
# Force a probe failure to validate the hypothesis logic
chaos run --hypothesis-strategy after experiment.json
Best Practices
- Always define a steady-state hypothesis
- Always define rollbacks and set --rollback-strategy always
- Run experiments in staging first
- Keep experiments in git with versioned manifests
- Report results from chaos report into CI dashboards
- Start with small blast radius: one pod, one service
Capabilities
experiment-run
Create, validate, and run Chaos Toolkit experiments from JSON manifests
Parameters:
experiment_path (string): Path to the experiment JSON file
hypothesis_strategy (string): before, after, or before-and-after
Commands:
chaos init
chaos run experiment.json
chaos run --dry-run experiment.json
chaos --help
Examples:
- chaos init && chaos run --dry-run experiment.json
- chaos run experiments/network-delay.json --rollback-strategy always
- chaos run experiment.json --hypothesis-strategy before-and-after
extensions
Install Chaos Toolkit extension packages for Docker, Kubernetes, HTTP, and other platforms
Parameters:
package (string): Extension package name such as chaostoolkit-kubernetes
Commands:
pip install chaostoolkit
pip install chaostoolkit-kubernetes
pip install chaostoolkit-docker
pip install chaostoolkit-http
Examples:
- pip install chaostoolkit chaostoolkit-kubernetes
- pip install chaostoolkit-docker chaostoolkit-http
- chaos info
References
1---2name: "chaos-toolkit"3description: "Design and run repeatable chaos experiments with the Chaos Toolkit CLI, including probes, steady-state checks, and Docker/Kubernetes actions. Use when working with experiment run, extensions, api or when the user mentions experiment run, extensions, api."4license: "MIT"5compatibility: "Requires chaos, pip."6metadata:7 source: https://skillmd.com/skills/opknock/chaos-toolkit8 author: Kdesk9 version: 2.0.010 category: api11allowed-tools: "Glob Grep Read Bash(chaos:*) Bash(pip:*)"12---1314Design and run repeatable chaos experiments with the Chaos Toolkit CLI, including probes, steady-state checks, and Docker/Kubernetes actions.1516## Agentic Workflow: Read -> Reason -> Act (chaos-toolkit)1718You are **Chaos Toolkit** (api/general) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — api context for `chaos-toolkit`21- Domain: Design and run repeatable chaos experiments with the Chaos Toolkit CLI, including probes, steady-state checks, and Docker/Kubernetes actions.22- **experiment-run**: Create, validate, and run Chaos Toolkit experiments from JSON manifests — `chaos init`23- **extensions**: Install Chaos Toolkit extension packages for Docker, Kubernetes, HTTP, and other platforms — `pip install chaostoolkit`24- Check `knowledge` and `prerequisites: chaos, pip`2526### 2. Reason — think for `chaos-toolkit`27- For `experiment-run`: Create, validate, and run Chaos Toolkit experiments from JSON manifests — decide which checks to run28- For `extensions`: Install Chaos Toolkit extension packages for Docker, Kubernetes, HTTP, and other platforms — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `chaos-toolkit` tools32- Tools: `Glob`, `Grep`, `Read`, `Chaos`, `Bash` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `chaos-toolkit:13ffec8c`3536# Chaos Toolkit3738Run reproducible chaos engineering experiments.3940## When to Use4142- Automated resilience testing in CI or on schedules43- Validating steady-state hypotheses before and after faults44- Team-wide shareable experiment definitions4546## Install4748```bash49pip install chaostoolkit chaostoolkit-http chaostoolkit-docker50chaos --help51```5253## Experiment Manifest5455```json56{57 "version": "1.0.0",58 "title": "API latency under network delay",59 "description": "Inject 100ms latency and verify the API stays healthy",60 "steady-state-hypothesis": {61 "title": "API is healthy",62 "probes": [63 {64 "type": "probe",65 "name": "health-check",66 "provider": {67 "type": "http",68 "url": "http://localhost:8080/health",69 "expected_status": 20070 }71 }72 ]73 },74 "method": [75 {76 "type": "action",77 "name": "add-latency",78 "provider": {79 "type": "process",80 "path": "tc",81 "arguments": "qdisc add dev eth0 root netem delay 100ms"82 }83 }84 ],85 "rollbacks": [86 {87 "type": "action",88 "name": "remove-latency",89 "provider": {90 "type": "process",91 "path": "tc",92 "arguments": "qdisc del dev eth0 root"93 }94 }95 ]96}97```9899## Run100101```bash102chaos run --dry-run experiment.json103chaos run experiment.json --rollback-strategy always104chaos run experiment.json --hypothesis-strategy before-and-after105```106107## Explore108109```bash110chaos init111chaos info112```113114## Testing115116```bash117# Force a probe failure to validate the hypothesis logic118chaos run --hypothesis-strategy after experiment.json119```120121## Best Practices122123- Always define a steady-state hypothesis124- Always define rollbacks and set --rollback-strategy always125- Run experiments in staging first126- Keep experiments in git with versioned manifests127- Report results from chaos report into CI dashboards128- Start with small blast radius: one pod, one service129130## Capabilities131132### experiment-run133Create, validate, and run Chaos Toolkit experiments from JSON manifests134135**Parameters:**136- `experiment_path` (string): Path to the experiment JSON file137- `hypothesis_strategy` (string): before, after, or before-and-after138139**Commands:**140- `chaos init`141- `chaos run experiment.json`142- `chaos run --dry-run experiment.json`143- `chaos --help`144145**Examples:**146- chaos init && chaos run --dry-run experiment.json147- chaos run experiments/network-delay.json --rollback-strategy always148- chaos run experiment.json --hypothesis-strategy before-and-after149150### extensions151Install Chaos Toolkit extension packages for Docker, Kubernetes, HTTP, and other platforms152153**Parameters:**154- `package` (string): Extension package name such as chaostoolkit-kubernetes155156**Commands:**157- `pip install chaostoolkit`158- `pip install chaostoolkit-kubernetes`159- `pip install chaostoolkit-docker`160- `pip install chaostoolkit-http`161162**Examples:**163- pip install chaostoolkit chaostoolkit-kubernetes164- pip install chaostoolkit-docker chaostoolkit-http165- chaos info166167## References168- [Chaos Toolkit Docs](https://docs.chaostoolkit.org/)169- [Chaos Toolkit Extensions](https://docs.chaostoolkit.org/reference/extensions/)