RU

running-chaos-tests

Test system fault tolerance by injecting controlled failures like network latency and service crashes.

Install

mkdir -p .claude/skills/running-chaos-tests && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5390" && unzip -o skill.zip -d .claude/skills/running-chaos-tests && rm skill.zip

Installs to .claude/skills/running-chaos-tests

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Execute chaos engineering experiments to test system resilience.
64 charsno explicit “when” trigger
Advanced

Key capabilities

  • Inject network latency and packet loss
  • Simulate service process crashes
  • Verify system recovery and auto-scaling
  • Test circuit breaker and fallback mechanisms
  • Execute controlled failure experiments

How it works

The skill guides the execution of controlled experiments by injecting failures like network latency or process termination to observe how systems degrade and recover.

Inputs & outputs

You give it
Steady-state hypothesis and failure parameters
You get back
Resilience report and system recovery timeline

When to use running-chaos-tests

  • Injecting network latency for resilience testing
  • Simulating service crashes
  • Verifying system graceful degradation
  • Testing recovery capabilities

About this skill

Chaos Engineering Toolkit

Overview

Execute controlled chaos engineering experiments to test system resilience, fault tolerance, and recovery capabilities. Injects failures including network latency, service crashes, resource exhaustion, and dependency outages to verify that systems degrade gracefully and recover automatically.

Prerequisites

  • Distributed system or microservice architecture deployed in a staging/test environment
  • Monitoring and alerting configured (Grafana, Datadog, CloudWatch, or Prometheus)
  • Rollback capability for the target environment (manual or automated)
  • Chaos engineering tool installed (toxiproxy, Pumba, Litmus, or Chaos Mesh)
  • Explicit approval from the team to run chaos experiments
  • Steady-state hypothesis defined (what "healthy" looks like in metrics)

Instructions

  1. Define the steady-state hypothesis:
    • Identify measurable indicators of normal system behavior (e.g., p99 latency < 500ms, error rate < 0.1%, all health checks pass).
    • Record baseline metrics before injecting any failures.
    • Define the blast radius -- which services and users are affected by the experiment.
  2. Design chaos experiments by category:
    • Network: Inject latency (200-2000ms), packet loss (5-50%), DNS failure, connection timeout.
    • Process: Kill a service instance, exhaust CPU or memory, fill disk.
    • Dependency: Block access to database, cache, or external API.
    • State: Corrupt data, introduce clock skew, simulate split-brain scenarios.
  3. Start with minimal impact and increase gradually:
    • Begin with read-only experiments (network latency on non-critical path).
    • Progress to service-level failures (kill one instance of a multi-instance service).
    • Only move to data-level chaos after infrastructure chaos is validated.
  4. Execute each experiment with safeguards:
    • Set a maximum experiment duration (5-15 minutes).
    • Configure automatic rollback triggers (error rate > 5% triggers abort).
    • Monitor system metrics in real-time during the experiment.
    • Have a manual kill switch ready (script to remove all injected failures immediately).
  5. Observe and record system behavior during the experiment:
    • Did circuit breakers activate? How quickly?
    • Did auto-scaling trigger? How long until new instances were healthy?
    • Did retries succeed? Were they idempotent?
    • Did fallback mechanisms engage (cached responses, degraded mode)?
    • Were alerts triggered? Did on-call receive notification?
  6. After the experiment, verify full recovery:
    • Remove all injected failures.
    • Verify steady-state hypothesis holds again within expected recovery time.
    • Check for data inconsistencies or orphaned state.
  7. Document findings and create action items for resilience improvements.

Output

  • Chaos experiment definition files (YAML or JSON) with hypothesis, method, and rollback
  • Experiment execution log with timeline of injected failures and observed effects
  • System behavior report covering circuit breakers, retries, fallbacks, and alerts
  • Recovery timeline showing time-to-detection and time-to-recovery
  • Action items for resilience improvements (retry policies, circuit breaker tuning, fallback additions)

Error Handling

ErrorCauseSolution
Experiment caused production outageBlast radius larger than expected or missing safeguardsAlways run in staging first; reduce scope; add automatic abort triggers; require approval
System did not recover after experimentAuto-healing mechanisms not configured or too slowAdd health-check-based restarts; configure auto-scaling; implement circuit breaker patterns
Monitoring missed the failureAlerting thresholds too lenient or wrong metrics monitoredTighten alert thresholds; add specific alerts for the failure mode tested; verify alert channels
Chaos tool cannot access targetNetwork segmentation or security policies blocking the toolDeploy chaos agent inside the target network; add security group rules for the chaos controller
Data corruption persists after rollbackStateful failure injection without transaction protectionUse read-only chaos first; snapshot databases before stateful experiments; implement compensating transactions

Examples

toxiproxy network latency injection:

set -euo pipefail
# Create a proxy for the database connection
toxiproxy-cli create postgres_proxy -l 0.0.0.0:15432 -u postgres-host:5432  # 15432: PostgreSQL port

# Inject 500ms latency
toxiproxy-cli toxic add postgres_proxy -t latency -a latency=500 -a jitter=100  # HTTP 500 Internal Server Error

# Run tests while latency is active
npm test -- --grep "handles slow database"

# Remove the toxic
toxiproxy-cli toxic remove postgres_proxy -n latency_downstream

Kubernetes pod kill experiment (Litmus Chaos):

apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
  name: api-pod-kill
spec:
  appinfo:
    appns: default
    applabel: "app=api-server"
  chaosServiceAccount: litmus-admin
  experiments:
    - name: pod-delete
      spec:
        components:
          env:
            - name: TOTAL_CHAOS_DURATION
              value: "60"
            - name: CHAOS_INTERVAL
              value: "10"
            - name: FORCE
              value: "true"

Custom chaos script (process kill and verify recovery):

#!/bin/bash
set -euo pipefail
echo "=== Chaos Experiment: API server kill ==="
echo "Hypothesis: System recovers within 30 seconds"

# Record baseline
BASELINE=$(curl -s -o /dev/null -w '%{http_code}' http://app.test/health)
echo "Baseline health: $BASELINE"

# Kill one API instance
docker kill api-server-1

# Monitor recovery
for i in $(seq 1 30); do
  STATUS=$(curl -s -o /dev/null -w '%{http_code}' --max-time 2 http://app.test/health)
  echo "T+${i}s: HTTP $STATUS"
  if [ "$STATUS" = "200" ]; then  # HTTP 200 OK
    echo "RECOVERED at T+${i}s"
    break
  fi
  sleep 1
done

Resources

When not to use it

  • Production environments without explicit approval
  • Systems lacking rollback capabilities

Prerequisites

Distributed system in staging environmentMonitoring and alerting configuredRollback capabilityChaos engineering tool

Limitations

  • Requires staging environment for safety
  • Stateful failure injection risks data corruption
  • Requires manual kill switch for safety

How it compares

This method uses systematic failure injection to validate resilience, whereas manual testing often relies on unpredictable real-world outages.

Compared to similar skills

running-chaos-tests side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
running-chaos-tests (this skill)127dReviewAdvanced
webapp-testing3533moReviewIntermediate
ui-ux-expert-skill919moReviewAdvanced
skill-creator1283moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

You might also like

webapp-testing

anthropics

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

353585

ui-ux-expert-skill

fercracix33

Technical workflow for implementing accessible React user interfaces with shadcn/ui, Tailwind CSS, and TanStack Query. Includes 6-phase process with mandatory Style Guide compliance, Context7 best practices consultation, Chrome DevTools validation, and WCAG 2.1 AA accessibility standards. Use after Test Agent, Implementer, and Supabase agents complete their work.

91244

skill-creator

anthropics

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

128200

python-testing-patterns

wshobson

Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.

77204

dependency-upgrade

wshobson

Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.

26240

playwright-mcp

sfc-gh-dflippo

Browser testing, web scraping, and UI validation using Playwright MCP. Use this skill when you need to test Streamlit apps, validate web interfaces, test responsive design, check accessibility, or automate browser interactions through MCP tools.

33197

Search skills

Search the agent skills registry