chaos-monkey

chaos-monkey is an agent for Claude Code from softspark/ai-toolkit. It costs 29 tokens per session (432 once invoked), scanned A, original, Apache-2.0.

A resilience-testing agent that deliberately introduces failures such as network delays, stopped services, full disks, or malformed requests. Resilience testing checks whether a system continues operating or recovers when parts fail.

In plain words
What is it for?
Use it to test latency handling, dependency failures, disk-full behavior, malformed input handling, cleanup, service restarts, and recovery reporting.
Why use it?
It reveals weak error handling, timeout behavior, fallbacks, and recovery procedures before those problems occur in real use. It also requires checking that tests are not run in production and restoring the test environment afterward.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./scripts/agent-tools/chaos.sh latency.

Part of the ai-toolkit plugin — 115 skills, 44 agents, 14 hooks shipped together

Good fit Use it to test latency handling, dependency failures, disk-full behavior, malformed input handling, cleanup, service restarts, and recovery reporting.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/softspark/ai-toolkit
agentmods
npx agentmods add agents/softspark/ai-toolkit/chaos-monkey

Made for: Claude Code.

Or install ai-toolkit, the plugin that ships this one along with the rest of its 115 skills, 44 agents, 14 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for chaos-monkey

README.md
[![agentmods](https://agentmods.dev/badge/agents/softspark/ai-toolkit/chaos-monkey/github.svg)](https://agentmods.dev/agents/softspark/ai-toolkit/chaos-monkey)
Your own site
<a href="https://agentmods.dev/agents/softspark/ai-toolkit/chaos-monkey"><img src="https://agentmods.dev/badge/agents/softspark/ai-toolkit/chaos-monkey/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for chaos-monkey

Your own site · 80×15
<a href="https://agentmods.dev/agents/softspark/ai-toolkit/chaos-monkey"><img src="https://agentmods.dev/badge/agents/softspark/ai-toolkit/chaos-monkey.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 432 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.00432
Opus 5.5 $0.00012 $0.00173
Sonnet 5.5 $0.00006 $0.00086
Haiku 4.5 $0.00003 $0.00043

Measured 3mo ago against content hash 789b2c182148, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

chaos-monkey scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

app/agents/chaos-monkey.md · 68 lines

What it actually says

Chaos Monkey Agent

You are the Chaos Monkey. You break things to make them stronger.

🔴 SAFETY INTERLOCK (CRITICAL)

You MUST verify the environment before acting.

if env == "production":
    ABORT("NEVER RUN IN PRODUCTION without explicit override!")

Resilience Experiments

1. The "Network Lag" Attack

Inject latency into service calls.

./scripts/agent-tools/chaos.sh latency

Test: Does the app handle it gracefully? (Loaders shown? Timeouts handled?)

2. The "Service Down" Attack

Kill a dependency container.

docker stop redis-cache

Test: Does the app fallback to DB? Or crash?

3. The "Disk Full" Attack

Fill the disk with temporary files.

fallocate -l 10G /tmp/garbage.file

Test: How does the logging system behave?

4. The "Data Corruption" Attack

Send malformed JSON to API endpoints. Test: Does the backend return 500 (crash) or 400 (validation error)?

Reporting Protocol

After every experiment:

  1. Restore state (cleanup, restart containers).
  2. Report findings.

Output Format (Chaos Report)

## 🐒 Chaos Experiment Report

### Experiment: [Redis Failure]
- **Action**: Stopped `redis` container.
- **Expected**: Backend switches to SQL, slightly slower.
- **Actual**: Backend crashed with `ConnectionRefusedError`.

### Verdict
[🔴 FAILED - Critical Vulnerability]

### Recommendation
wrap `redis.get()` in try/catch block.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 68 lines · 29 tokens per session scan A 789b2c182148

Subscribe to this mod's changes

chaos-monkey is an agent published in the GitHub repository softspark/ai-toolkit (180 stars, last pushed 14d ago), licensed Apache-2.0. It adds 29 tokens to every session and 432 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

chaos-monkey compared with agents from other repositories

chaos-monkey next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
chaos-monkeysoftspark/ai-toolkitAgent18014d agoApache-2.0A29Claude Code
go-security-reviewerjohnqtcg/awesome-skillsAgent311mo agoMITA89Claude Code
playwright-test-generatormicrosoft/playwrightAgent102ktodayApache-2.0A151Claude Code
AVM Owner Triagegithub/awesome-copilotAgent42ktodayMITA61Claude Code
Pimcore Expertgithub/awesome-copilotAgent42ktodayMITA26Claude Code
Ultimate Transparent Thinking Beast Modegithub/awesome-copilotAgent42ktodayMITA11Claude Code
WinForms Expertgithub/awesome-copilotAgent42ktodayMITA19Claude Code