chaos-engineering

Generates k6 and Toxiproxy chaos tests that verify circuit breakers and graceful degradation against resilience NFRs.

Updated May 21, 2026
One-click install
npx skills add https://github.com/CagesThrottleUs/private-ai-harness --skill chaos-engineering-cagesthrottleus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: chaos-engineering
Source: https://github.com/CagesThrottleUs/private-ai-harness/tree/main/skills/chaos-engineering
Command: npx skills add https://github.com/CagesThrottleUs/private-ai-harness --skill chaos-engineering-cagesthrottleus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Load tests only prove a service handles expected traffic; they never prove it fails gracefully when dependencies break. This Skill closes that gap by generating controlled fault-injection experiments that verify circuit breakers, retries, and graceful degradation actually behave as the HLD claims. ## Core Features & Use Cases - Scientific chaos method: Defines steady state from SLOs, formulates a falsifiable hypothesis per failure scenario, injects faults with abort criteria, and verifies recovery behavior. - Ready-to-run fault injection: Provides k6 scripts for HTTP error rate, timeout, and latency-spike injection, plus Toxiproxy commands for network-level faults like DB connection drops. - CI integration and review gate: Adds a chaos job that runs post-staging-deploy in GitHub Actions, documents each experiment with blast radius and abort criteria, and dispatches a chaos-reviewer agent before committing. - Use Case: A service with a documented circuit breaker and 99.9% availability SLO needs proof it degrades gracefully. The Skill generates a k6 chaos test injecting 10% 503s from a dependency, verifies the breaker opens and recovery completes within 30 seconds, and wires the test into the staging pipeline. ## Quick Start Ask the AI to generate chaos engineering tests for the service's resilience NFRs using k6 fault injection and add a post-staging-deploy chaos job to the CI pipeline.

Frequently Asked Questions about chaos-engineering

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test circuit breaker behavior with k6?

Use k6 fault injection to make a percentage of dependency calls return 503 errors, then assert the circuit breaker opens and the system returns graceful 503 responses with Retry-After headers instead of 500s. Thresholds like http_req_failed rate under 15% verify the breaker absorbs excess failures.

What is the difference between chaos engineering and load testing?

Load testing verifies steady-state performance under expected traffic, while chaos engineering injects failures like dependency errors, timeouts, and latency spikes to verify the system degrades gracefully and recovers. Both are complementary: load tests check NFR targets, chaos tests check behavior when those targets are breached.

When should I use Toxiproxy instead of k6 fault injection?

Use Toxiproxy for network-level faults that k6 cannot simulate at the HTTP layer, such as TCP connection resets to a database or sustained latency on all connections. k6 handles HTTP error rates and request-level latency; Toxiproxy proxies real connections and adds toxics like latency or connection drops.

Should chaos tests run on every pull request?

No. Chaos tests require a real deployed environment and a controlled blast radius, so they run post-staging-deploy rather than on PRs. The CI job triggers after the staging deployment is healthy and typically only on the main branch.

When is chaos engineering not worth the overhead?

Skip it for services without explicit resilience NFRs, simple CRUD services with no external dependencies, or systems without high availability SLOs. Without circuit breakers, retries, or degradation requirements in the design, chaos tests add pipeline cost without verifying anything meaningful.

Chaos engineering vs deterministic simulation testing, which should I use?

Chaos engineering injects faults into a live staging deployment and observes one outcome, suiting graceful-degradation verification. Deterministic simulation testing runs real code in-process behind a seeded random source, so failures replay exactly; use it for concurrent or distributed bugs needing a precise multi-fault interleaving.