# Chaos

> Injects controlled faults for resilience testing on non-prod. Triggers: chaos, fault injection, latency injection, dependency kill, resilience test.

- **Type:** Skill
- **Install:** `agentstack add skill-softspark-ai-toolkit-chaos`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [softspark](https://agentstack.voostack.com/s/softspark)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [softspark](https://github.com/softspark)
- **Source:** https://github.com/softspark/ai-toolkit/tree/main/app/skills/chaos
- **Website:** https://softspark.eu

## Install

```sh
agentstack add skill-softspark-ai-toolkit-chaos
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Chaos Command

$ARGUMENTS

Triggers a controlled resilience experiment.

## Usage

```bash
/chaos  [target]
# Example: /chaos latency backend-api
# Example: /chaos kill redis
```

## Protocol
1. **Safety Check**: Verify env != PROD.
2. **Baseline**: Check system health is green.
3. **Inject**: Run the fault injection.
4. **Observe**: Monitor logs/metrics for 60s.
5. **Recover**: Restore system health.
6. **Report**: Did we survive?

## Rules

- **MUST** verify target environment is non-production before injecting
- **NEVER** run against a system without a healthy baseline
- **CRITICAL**: abort immediately if recovery does not complete within the observation window
- **MANDATORY**: log every injected fault with timestamp and scope

## Gotchas

- `NODE_ENV=production` on a developer's machine is common — checking that env var alone is not enough proof of non-prod. Combine with kubeconfig context, cloud account ID, or a project-specific env file check before injecting.
- `docker stats` reports cached values; the first sample immediately after injection is often pre-fault. Wait at least 5 seconds before reading metrics.
- Kubernetes liveness probes may self-heal the faulted pod inside the 60s observation window — the report shows green while the workload is still flapping. Check pod restart counters, not just health endpoints.
- Latency injected with `tc` (Linux traffic control) persists across container restarts on the host and across SIGTERM. Always pair the inject step with an explicit `tc qdisc del dev  root` cleanup in the recover step — the `fork` context will not undo it for you.

## When NOT to Use

- In production without an explicit, written runbook — use `/workflow incident-response` for real incidents
- When the system has no observability (no metrics, no logs) — fix observability first
- For load testing — use dedicated load-test tooling, not chaos injection
- During an active incident — stabilize first with `/panic`, then investigate

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [softspark](https://github.com/softspark)
- **Source:** [softspark/ai-toolkit](https://github.com/softspark/ai-toolkit)
- **License:** MIT
- **Homepage:** https://softspark.eu

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-softspark-ai-toolkit-chaos
- Seller: https://agentstack.voostack.com/s/softspark
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
