agentleFS
stevancrisstevancris/sre-ai-agent/skills/chaos-engineering/SKILL.md

chaos-engineering

Skill0 starsChanged 5 months agoMITView on GitHub

Design and run controlled chaos experiments to validate system resilience. Use when validating failure modes, running gameday exercises, testing recovery procedures, or building a chaos testing program. Must NOT be invoked during active production incidents. Trigger keywords: chaos engineering, chaos experiment, gameday, game day, fault injection, resilience testing, failure mode, what happens if, kill pod, simulate failure, disaster recovery test, DR test, resilience validation, failure scenario, blast radius test, dependency failure, region failure.

13 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 10 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 10

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before loading context files, check if context/CONTEXT.md exists in the current directory.

    line 20
  2. Distinctive:

    Use the answers inline for this session.

    line 32
  3. Distinctive:

    Before any other step, verify:

    line 41
  4. Distinctive:

    Ask: "Is there currently an active P0 or P1 incident?" If yes: stop immediately.

    line 42
  5. Distinctive:

    Ask: "Has this experiment been approved by the on-call engineer and engineering manager?"

    line 44
  6. Distinctive:

    Only proceed if all three are satisfied.

    line 47
  7. Very specific:

    Read context/CONTEXT.md and context/company/tech-stack.md.

    line 52
  8. Distinctive:

    Before designing the experiment, assess the maximum possible impact:

    line 55
  9. Distinctive:

    Every experiment must have a clear, falsifiable hypothesis:

    line 76
  10. Distinctive:

    Never run chaos experiments during business peak hours without a compelling reason.

    line 160
  11. Distinctive:

    Every experiment needs an abort condition — define it before starting.

    line 161
  12. Distinctive:

    Start small: a single pod kill is more valuable than a full region failure as a first experiment.

    line 162

“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Chaos Engineering Skill

Setup Check

Before loading context files, check if context/CONTEXT.md exists in the current directory.

If context/CONTEXT.md exists — read it and proceed normally.

If context/CONTEXT.md does not exist — this skill was installed standalone (e.g. via npx skills add). Ask the user these questions before proceeding:

  1. Role — junior-sre / senior-sre / sre-manager (shapes output depth and tone)
  2. Cloud provider — aws / gcp / azure / on-prem / hybrid
  3. Observability stack — e.g. Datadog, Prometheus+Grafana, New Relic
  4. Company name and primary services affected (if relevant to this task)

Use the answers inline for this session. For persistent setup across all skills, suggest:

pipx install sre-agent
sre-agent init

Instructions

Step 0: Safety Gate (MANDATORY)

Before any other step, verify:

  1. Ask: "Is there currently an active P0 or P1 incident?" If yes: stop immediately. "Chaos experiments must not run during active incidents. Resolve the incident first."
  2. Ask: "Has this experiment been approved by the on-call engineer and engineering manager?"
  3. Confirm: "What is the rollback/abort procedure if this experiment goes wrong?"

Only proceed if all three are satisfied.


Step 1: Load Context

Read context/CONTEXT.md and context/company/tech-stack.md.

Step 2: Blast Radius Assessment

Before designing the experiment, assess the maximum possible impact:

Scope questions:

  • Which services are in scope for the experiment?
  • Which services have a dependency on in-scope services (blast radius)?
  • What percentage of users could be affected if the experiment escapes its scope?
  • Is there a way to limit the experiment to a subset of users or a single region?
  • What is the recovery time if something goes wrong (RTO)?

Blast radius classification:

ClassScopeUser impact possible
ContainedSingle pod / replica< 1%
ServiceEntire serviceFeature-level
PlatformCluster / DBMajor degradation
Multi-serviceCross-servicePotential P0

Rule: Only run Class "Contained" or "Service" experiments in production without explicit VP Engineering approval.

Step 3: Define the Hypothesis

Every experiment must have a clear, falsifiable hypothesis:

Hypothesis template:
"We believe that [service] will [behavior] when [failure condition],
because [reason], and we will verify this by [measurement]."

Example:
"We believe that the checkout-api will continue processing orders
within its normal SLO when the inventory-service is unavailable,
because checkout-api has a circuit breaker configured with a 30-second
timeout and a cached fallback, and we will verify this by measuring
the checkout error rate and latency during the experiment."

Step 4: Define Steady State

Establish measurable baseline before the experiment:

Steady state metrics (measure 10 minutes before starting):
- checkout error rate: <0.1%
- checkout P99 latency: <500ms
- order creation success rate: >99.9%

Step 5: Design the Experiment

Choose the failure injection type:

Failure typeWhat it testsCommon tool
Pod killService resilience, restart recoverykubectl delete pod
Network partitionDependency failure handlingChaos Mesh, tc
Latency injectionTimeout handling, circuit breakersChaos Mesh, Toxiproxy
Resource exhaustionSaturation handlingstress-ng, Chaos Mesh
Region failureMulti-region failoverRoute53 health checks, simulated
Dependency failureFallback and graceful degradationChaos Mesh

Design output:

Experiment: checkout-api circuit breaker validation

Failure injection:
  Tool: Chaos Mesh
  Target: inventory-service, all pods, production namespace
  Failure type: network partition (100% packet drop)
  Duration: 5 minutes

Monitoring:
  - Watch: checkout error rate (expect: <1%)
  - Watch: checkout P99 latency (expect: <1s with cache fallback)
  - Watch: circuit breaker open state in Datadog

Abort conditions:
  - checkout error rate > 5% → abort immediately
  - any other service shows unexpected degradation → abort
  - experiment duration > 10 minutes without resolution → abort

Rollback:
  - Remove Chaos Mesh network policy
  - Verify inventory-service connectivity restored
  - Confirm checkout metrics return to steady state

Step 6: Generate the Gameday Runbook

Produce a gameday document with:

  • Experiment hypothesis
  • Steady state definition
  • Timeline (when each step happens, who does what)
  • Monitoring checklist
  • Abort conditions and rollback procedure
  • Success/failure criteria
  • Observation notes section

Step 7: Post-Experiment Analysis

After the experiment:

  1. Did steady state hold? (Hypothesis confirmed or refuted?)
  2. What surprises occurred?
  3. What did the experiment reveal about the system?
  4. Generate action items for gaps discovered.

Guidelines

  • Never run chaos experiments during business peak hours without a compelling reason.
  • Every experiment needs an abort condition — define it before starting.
  • Start small: a single pod kill is more valuable than a full region failure as a first experiment.
  • "It worked" is not a result — document what metrics confirmed it worked.
  • Persona (junior-sre): read-only participation only; do not design or run experiments without senior supervision.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.