chaos-experiment-design
Skill19 starsChanged 6 months agoMITView on GitHub
Design end-to-end chaos engineering experiments as complete, runnable manifests. Use this skill whenever the user says "create a chaos experiment", "inject a fault", "design a chaos test", "I want to test resilience of X", "add a chaos step to my pipeline", or needs to produce ChaosExperiment / ChaosEngine YAML for LitmusChaos or Harness Chaos Engineering. Also trigger when the user wants to test failure scenarios such as pod crashes, network partitions, disk exhaustion, or CPU spikes, even if they don't use the word "chaos".
1 other project uses a version of this.
Adopted by
Most recently taken up by
- shinzoxD/knackboxtheir own version, first seen Jul 10, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- shinzoxD/knackbox★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository37 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- workflow-orchestratorSkill
- user-flow-writingSkill
- ba-requirements-analysisSkill
- taste-memory-managementSkill
- progress-trackerSkill
- harness-pipeline-designSkill
- harness-service-onboardingSkill
- harness-delegate-managementSkill
- harness-secrets-managementSkill
- harness-feature-flagsSkill
- harness-template-librarySkill
- harness-gitopsSkill
- security-scanningSkill
- cloakbrowser-testingSkill
- performance-load-testingSkill
- chaos-hypothesis-validationSkill
- chaos-blast-radius-controlSkill
- chaos-steady-state-definitionSkill
- chaos-infrastructure-faultsSkill
- chaos-application-faultsSkill
- chaos-game-day-planningSkill
- harness-cv-verificationSkill
- chaos-observability-integrationSkill
- alerting-recommendationsSkill
- harness-policy-governanceSkill
- harness-cloud-costSkill
- chaos-resilience-scoringSkill
- chaos-postmortem-learningSkill
- release-managementSkill
- disaster-recovery-business-continuitySkill
- compliance-auditSkill
- strategic-creatorSkill
- deep-researchSkill
- system-optimizationSkill
- documentation-writingSkill
- devils-advocateSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 243
Before marking an experiment ready to run:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Chaos Experiment Design
Purpose
Produce complete, safe, runnable chaos experiments following the hypothesis-driven scientific method. Every experiment has a clear hypothesis, defined steady state, bounded blast radius, and automated abort conditions.
Input Contract
| Input | Source | Required |
| PRD / service criticality analysis | s01 (workflow_context) | Yes |
| Pipeline YAML (chaos step location) | s04 output | Yes |
| Service definitions (target services) | s05 output | Yes |
| Blast radius budget per environment | s01 (env tier table) | Yes |
| Feature flag chaos gate config | s08 output | No (recommended) |
| Risk tolerance preferences | s02 taste (risk_tolerance) | Yes |
Output Contract
| Output | Destination | Format |
| ChaosExperiment manifest | .commandcode/artifacts/experiment-<name>.yaml | Litmus YAML |
| ChaosEngine manifest | .commandcode/artifacts/engine-<name>.yaml | Litmus YAML |
| Experiment design checklist | s13 (hypothesis input) | Markdown |
| Fault taxonomy map | s16, s17 (fault selection) | Reference |
| Pipeline chaos step config | s04 (pipeline update) | YAML |
| Experiment context | workflow_context.artifacts | YAML object |
Prerequisites
- LitmusChaos / Harness Chaos Engineering installed in target cluster
- Target namespace and service identified
- Steady state defined (see chaos/04-steady-state-definition)
- Observability stack active (metrics flowing before experiment starts)
- Rollback plan documented
- Blast radius approved for target environment (see CLAUDE.md env tiers)
Experiment Design Framework (5 Steps)
1. HYPOTHESIS → "If X fails, then Y should happen, and Z metric stays within N"
2. STEADY STATE → Baseline metrics confirmed healthy before injection
3. FAULT → Specific fault, target scope, duration, intensity
4. OBSERVE → Monitor during injection — did system behave as expected?
5. LEARN → Document findings, fix gaps, update runbooksFault Taxonomy
| Category | Faults | Skill Reference |
| Application | pod-delete, pod-cpu-hog, pod-memory-hog, container-kill | chaos/07-application-faults |
| Network | network-loss, network-latency, network-corruption, dns-chaos | chaos/07-application-faults |
| Infrastructure | node-drain, node-cpu-hog, disk-fill, node-restart | chaos/06-infrastructure-faults |
| AWS | ec2-stop, ebs-loss, rds-instance-stop, lambda-timeout | chaos/06-infrastructure-faults |
| GCP | gce-vm-stop, gke-node-pool-scale | chaos/06-infrastructure-faults |
Experiment YAML Structure
ChaosExperiment (what fault to run + parameters)
ChaosEngine (which targets + which experiments + probes)Complete Experiment Example: Pod Delete
ChaosExperiment
# Generated by: hybrid-harness-chaos-process-prm
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosExperiment
metadata:
name: pod-delete
namespace: <TARGET_NAMESPACE>
labels:
app.kubernetes.io/part-of: litmus
app.kubernetes.io/component: chaosexperiment
managed-by: hcprm
experiment-category: application
spec:
definition:
scope: Namespaced
permissions:
- apiGroups: [""]
resources: ["pods"]
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["create", "get", "list", "patch", "update"]
- apiGroups: ["litmuschaos.io"]
resources: ["chaosengines", "chaosexperiments", "chaosresults"]
verbs: ["create", "get", "list", "patch", "update", "watch"]
image: litmuschaos/go-runner:latest
imagePullPolicy: Always
args: ["-c", "ls -lt /experiments | awk 'FNR == 2 {print $9}' | xargs -I {} sh -c './{}'"]
command: ["/bin/bash"]
env:
- name: TOTAL_CHAOS_DURATION
value: "60" # seconds of fault injection
- name: CHAOS_INTERVAL
value: "10" # seconds between pod deletions
- name: FORCE
value: "false" # graceful delete (respects terminationGracePeriod)
- name: TARGET_PODS
value: "" # empty = random selection from appLabel pods
- name: PODS_AFFECTED_PERC
value: "50" # % of matching pods to delete per interval
- name: SEQUENCE
value: "random" # random | serial
- name: RAMP_TIME
value: "10" # seconds to wait before and after chaos
labels:
experiment: pod-deleteChaosEngine
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: <SERVICE_NAME>-pod-delete-engine
namespace: <TARGET_NAMESPACE>
labels:
managed-by: hcprm
service: <SERVICE_NAME>
environment: <ENV>
chaos-type: application
spec:
appinfo:
appns: <TARGET_NAMESPACE> # Target namespace
applabel: "app=<SERVICE_NAME>" # Pod selector label
appkind: deployment # deployment | statefulset | daemonset
chaosServiceAccount: litmus-admin
monitoring: true # Expose Prometheus metrics
jobCleanUpPolicy: retain # retain | delete (keep for debugging)
annotationCheck: "true" # Only target pods with chaos annotation
engineState: active
experiments:
- name: pod-delete
spec:
probe:
# ── HTTP Probe: service must keep responding ──
- name: application-health-check
type: httpProbe
mode: Continuous # Check throughout entire experiment
httpProbe/inputs:
url: "http://<SERVICE_NAME>.<TARGET_NAMESPACE>.svc.cluster.local/health"
insecureSkipVerify: false
method:
get:
criteria: "=="
responseCode: "200"
runProperties:
probeTimeout: 5s
interval: 5s
retry: 2
probePollingInterval: 2s
# ── Prometheus Probe: error rate must stay < 5% ──
- name: error-rate-check
type: promProbe
mode: Edge # Check at start and end
promProbe/inputs:
endpoint: "http://prometheus.monitoring.svc.cluster.local:9090"
query: |
sum(rate(http_requests_total{
namespace="<TARGET_NAMESPACE>",
pod=~"<SERVICE_NAME>.*",
status=~"5.."
}[2m])) /
sum(rate(http_requests_total{
namespace="<TARGET_NAMESPACE>",
pod=~"<SERVICE_NAME>.*"
}[2m])) * 100
comparator:
type: float
criteria: "<="
value: "5.0" # Max 5% error rate allowed
runProperties:
probeTimeout: 10s
interval: 30s
retry: 3
components:
env:
- name: TOTAL_CHAOS_DURATION
value: "60"
- name: CHAOS_INTERVAL
value: "10"
- name: PODS_AFFECTED_PERC
value: "50"
- name: RAMP_TIME
value: "10"Experiment in Harness Pipeline
- step:
name: Chaos - Pod Delete
identifier: chaos_pod_delete
type: Chaos
timeout: 10m
spec:
experimentRef: <EXPERIMENT_UUID_FROM_HARNESS_HCE>
expectedResilienceScore: 80 # Minimum score to pass (0-100)
failureStrategies:
- onFailure:
errors: [AllErrors]
action:
type: StageRollback
when:
stageStatus: Success # Only run chaos if deploy succeeded
condition: <+env.type> != "Production" # Not on prod without explicit overrideExperiment Design Checklist
Before marking an experiment ready to run:
[ ] Hypothesis written in format: "If [fault] then [expected behavior] measured by [metric]"
[ ] Steady state confirmed healthy in last 10 minutes
[ ] Blast radius scoped to minimum required (namespace / label selector)
[ ] Duration appropriate: dev=30s, staging=60s, preprod=120s, prod=60s max
[ ] At least one HTTP probe OR Prometheus probe configured
[ ] Abort conditions defined (probe failure = immediate abort)
[ ] `dryRun: true` tested first
[ ] Monitoring dashboard open and visible during run
[ ] Rollback steps prepared and tested
[ ] Team notified via Slack before running in shared environmentsExperiment Result Interpretation
| Resilience Score | Interpretation | Action |
| 100 | System fully resilient to this fault | Increase blast radius or move to production |
| 80-99 | Good — minor degradation within tolerance | Document, schedule re-test after improvements |
| 60-79 | Partial failure — some probes failed | File ticket, fix before next game day |
| 40-59 | Significant failure — system degraded | Immediate remediation required |
| 0-39 | Critical — system could not handle fault | P0 remediation, do not run in production |
AI Agent Integration
Autonomy Level
| Aspect | Level | Description |
| Current | L1 | AI recommends experiments based on system analysis |
| Target | L2 | AI generates experiment manifests from natural language |
Harness AI Agent
Agent: Harness AI Reliability Agent Capabilities:
- Chaos experiment recommendations from app events and infra changes
- Natural language experiment generation (e.g., "Generate a pod-delete experiment for staging")
- Service discovery and auto-creation of tailored experiments
Human Gates
- Hypothesis approval
- Experiment activation
- Target service selection
MCP
- LitmusChaos MCP (experiment CRUD, infra ops, resilience probes)
- Gremlin MCP (experiment analysis, remediation)
Success Criteria
- Experiment YAML passes
kubectl apply --dry-run=client - ChaosEngine references correct
appLabelfor target service - At least one HTTP or Prometheus probe configured
- Experiment ran successfully in dev/staging before targeting preprod
- Resilience score ≥ 80 before considering production run
- Results documented in experiment tracker
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
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.

