chaos-engineering
Chaos engineering practice: hypothesis-driven fault injection to surface weakness before users do. Use when designing a chaos experiment, planning a gameday, picking what to inject (network, host, dependency, resource, state), computing the blast radius of an experiment, building a chaos maturity model for a team, or running a post-incident game to verify the same failure doesn't recur. Covers the four chaos maturity levels, the experiment design loop (steady-state → hypothesis → variables → blast-radius → run → learn), and the catalog of fault types per layer.
What this skill does
# Chaos Engineering End-to-end chaos engineering: experiment design, fault injection catalog, gameday execution, and the maturity model that turns one-off "let's break stuff" exercises into a reliable discipline. Provider-agnostic — works whether you use Litmus, Chaos Mesh, AWS FIS, Gremlin, ChaosToolkit, or hand-rolled scripts. This skill answers four questions: **what to inject, where to inject it, how to size the blast, and how to extract durable learning** from each run. --- ## When to use this skill | Situation | Skill applies | |-----------|---------------| | Spinning up a chaos program from scratch | Yes — start with **maturity model** + **first 5 experiments** | | Designing a single experiment for a known concern | Yes — use the **experiment design loop** | | Planning a gameday for a team or service | Yes — use `scripts/gameday_planner.py` | | Validating a kill switch or fallback path actually works | Yes — chaos is the way to test these in prod-like conditions | | Post-incident verification: "did the fix really fix it?" | Yes — re-inject the original fault, confirm the new behavior | | Compliance evidence (SOC 2 A1 / DORA Art. 25) | Yes — chaos runs produce auditable resilience-testing evidence | | Improving SLOs / error budgets | Pair with `engineering/observability-designer` — chaos surfaces SLO violations | --- ## The chaos engineering principles (Principles of Chaos, applied) Five principles drive every experiment. Skip one and you're not doing chaos engineering — you're either generating noise or producing false confidence. 1. **Define steady state.** What's "normal" for the system? Measured quantitatively (RPS, error rate, latency, conversion). If you can't define it, you can't detect deviation. 2. **Hypothesize that steady state continues under the perturbation.** "If we kill one of the three recommendation pods, P99 latency stays within +50ms of baseline." Specific, falsifiable. 3. **Inject real-world events.** Things that actually happen: a node dies, a network partition, a DNS lookup fails, a downstream API returns 503, a disk fills up. 4. **Run in production (eventually).** Staging chaos finds staging bugs. Many critical failures only show up at production scale, with production traffic. Start in staging; graduate carefully. 5. **Minimize blast radius.** Constrain the experiment so a wrong hypothesis costs you minimum users / requests / dollars. Use `scripts/blast_radius_calculator.py`. A chaos engineer's job is to find the gap between the hypothesis and reality. The interesting result is "hypothesis disproven" — that's where you learn. --- ## Chaos maturity model Four levels. Most teams should target Level 2-3; only mature organizations need Level 4. | Level | What it looks like | Frequency | Risk tolerance | |-------|---------------------|-----------|----------------| | **L0 — None** | Ad-hoc "let's see what happens" exercises, no method | Random | n/a | | **L1 — Manual, staging** | Hand-run scripts in staging, before-after observation, post-it learnings | Quarterly | Low — staging only | | **L2 — Automated, staging** | Tooling (Chaos Mesh / Litmus / homegrown) running scheduled experiments in staging, results captured | Weekly to daily | Low | | **L3 — Production, scheduled** | Targeted production experiments during low-traffic windows, with explicit blast-radius limits and auto-rollback | Weekly | Medium — controlled | | **L4 — Production, continuous** | Always-on chaos (e.g., Chaos Monkey) in prod; system designed so loss of components is non-events | Continuous | High — by design | See [references/chaos-principles-and-maturity.md](references/chaos-principles-and-maturity.md) for the per-level scorecard, the "first five experiments" list every L0→L1 team should run, and the org/SRE prerequisites for each level. --- ## The experiment design loop Every chaos experiment follows this loop. Skipping a step usually means the result is unactionable. ``` 1. Define steady state → quantitative metrics defining "normal" 2. Form hypothesis → specific, falsifiable prediction 3. Pick variables → what to vary (one at a time, ideally) 4. Compute blast radius → who/what is affected; cap the impact 5. Define abort criteria → when to halt early 6. Run → inject; observe; record 7. Analyze → was hypothesis confirmed or disproven? 8. Act → file fixes, update runbooks, retire experiment OR keep it 9. Document → permanent artifact for future engineers ``` ### Step 1: Define steady state **Bad:** "The service is healthy." **Good:** ``` SLOs: - 99.5% of /search requests return 2xx - P95 latency < 200ms - P99 latency < 500ms KPIs: - Conversion rate stable within 10% of 7-day MA - Active user count stable within 5% ``` If your monitoring can't quantify steady state for the target service, that's your real first problem. Pause chaos; build observability first. ### Step 2: Form a hypothesis | Bad hypothesis | Good hypothesis | |----------------|-----------------| | "Things will be fine if we kill a pod" | "If we kill 1 of 6 search pods, P95 latency stays under 250ms and error rate stays under 0.6% for the duration of the experiment (max 10 min)" | | "The fallback works" | "If we block all outbound calls to the recommendations service for 5 minutes, the homepage continues to render with static recommendations, and error rate on /home stays under 0.2%" | | "We can survive a region outage" | "If we fail over from us-east-1 to us-west-2, the failover completes in under 60 seconds, with < 0.5% requests dropped during the cutover and zero data loss" | A good hypothesis names: the perturbation, the expected outcome, the measurable threshold, the time bound. ### Step 3: Pick variables Vary one thing at a time when possible. If you inject network latency AND kill a pod simultaneously and the system breaks, you don't know which fault caused it. Common variables: - Pod / instance / VM (kill, pause, network-isolate) - Network (latency, packet loss, partition, bandwidth limit) - Dependency (block, slow, return error, return malformed response) - Resource (CPU pressure, memory pressure, disk full, IO throttle) - State (corrupt cache, expire all tokens, clock skew) - Traffic (10x spike, replay attack pattern, slowloris) See [references/fault-injection-catalog.md](references/fault-injection-catalog.md) for the full catalog per layer with tool mappings (Chaos Mesh / Litmus / AWS FIS / Gremlin / ChaosToolkit). ### Step 4: Compute blast radius Use `scripts/blast_radius_calculator.py` with inputs: total users / traffic, % targeted, duration, expected fallback. Output: worst-case affected users, recommended caps, abort-trigger thresholds. Key rule: blast radius starts tiny and grows only after each level passes. First run of any experiment: 1 pod / 1% of traffic / 1 minute / one region. Expand from there. ### Step 5: Define abort criteria Before running, write down: at what metric value do we halt the experiment? ```yaml abort_if: - error_rate_for_target > 5% - p99_latency_for_target > 1000ms - any_dependent_service_alerting - on-call_says_so abort_method: - automatic (kill the chaos tool) - manual (stop button in the dashboard) duration_cap: 10 minutes ``` If your abort can't fire in < 30 seconds, the blast radius is too big. ### Step 6: Run Run during a window with: - The owner team online and watching - Active monitoring dashboards open - Communication channel open (Slack thread for the experiment) - The abort mechanism tested and at the ready - An explicit "GO" call by the experiment lead Record: start time, end time, what was actually injected, all metrics during the window. ### Step 7: Analyze After the experiment ends, answer: - Did the hypothesis hold? (yes / no / partial) - What unexpected behavior did we see? - What didn't we measure that we wish we had? - What was the actual blast radius vs. predicted? - Did the
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.