Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

api-chaos-runner

БесплатноБез исполняемых скриптовНе проверен

Use when an existing API test suite should be rerun under network faults to prove retries, timeouts, circuit breakers and fallbacks work. Injects latency…

testlandот testland★ 18 звёзд на GitHub

Об этом скилле

api-chaos-runner

Overview

Most API tests run against perfect networks: <1ms latency, no packet loss, infinite bandwidth, deterministic ordering. Real production isn't like that. Network chaos testing drives the existing tests under controlled network impairment - the team discovers which retry / circuit-breaker / timeout patterns actually hold up before real customers find out.

The canonical open-source primitive is Toxiproxy - Shopify's "TCP proxy to simulate network and system conditions for chaos and resiliency testing" (toxiproxy-readme). The pattern: sit Toxiproxy between client and upstream; manipulate toxics (latency, timeout, bandwidth, etc.) during test execution.

This skill is build-an-X - the workflow chains the team's existing API tests (Postman / Karate / RestAssured / Tavern / Schemathesis) through a Toxiproxy-managed connection and orchestrates a per-scenario chaos matrix.

When to use

  • The API has documented resilience requirements (retry on 5xx, circuit-break on 3 consecutive failures, timeout at 5s, etc.) and the team needs to verify them, not just document them.
  • A new external dependency just got added; the team wants to pressure-test fallback behavior.
  • An incident postmortem identified a "we should have caught this in testing" item; chaos coverage is the prevention mechanism for that class.
  • The team has integration tests already and wants to multiply their signal value via fault injection.

If the team is just starting API testing and has no resilience patterns to verify, this skill is overkill - start with happy-path coverage via postman-collections or the language-native equivalents first.

How to use

  1. Confirm documented resilience requirements exist (retry, circuit-breaker, timeout, fallback). If none, start with happy-path coverage instead of chaos.
  2. Pick the chaos primitive - Toxiproxy for per-API chaos in CI (Step 1).
  3. Build the chaos matrix: for each existing test scenario, list the toxics to inject and the expected behavior per condition (Step 2).
  4. Wire Toxiproxy between the app and its upstream and register a proxy per dependency (references/toxiproxy-wiring.md).
  5. Run the matrix, always including a no-toxic control row; capture one JUnit XML per scenario (Step 3).
  6. Aggregate results into a resilience matrix and report which assertions break under which toxic (Step 4).
  7. Inject only toxics that map to a documented expectation; run the full matrix nightly, the control row per PR.

Step 1 - Pick the chaos primitive

Tool Layer Best for
Toxiproxy TCP proxy Per-connection latency / bandwidth / timeout / drop. Most precise.
Pumba Docker container Container-level chaos (kill, pause, network).
Gremlin (commercial) Multi-platform Production-grade chaos with audit / approval flow.
LitmusChaos Kubernetes operator Cloud-native; experiments declared as CRDs.
tc qdisc (Linux native) Network interface Lowest level; most setup; CI-friendly only with --cap-add NET_ADMIN.

Default recommendation: Toxiproxy for per-API chaos in CI. The others fit when the team is already in those ecosystems (Docker-Compose-heavy projects, Kubernetes-first projects).

Step 2 - Define the chaos matrix

For each existing API test scenario, define a matrix of conditions to run it under:

Scenario Toxic Expected behavior
Order create (POST /orders) None (control) 201 in <500ms
Order create latency=1000ms 201 in <2s (within timeout budget)
Order create latency=10000ms 504 with retry-after, OR client gives up
Order create bandwidth=10kbps 201 (eventual) OR 408 timeout
Order create reset_peer 502 with retry attempted
Order create timeout 504; circuit-breaker opens after 3rd

Per toxiproxy-readme, the canonical toxic types include latency, down (forced failure), bandwidth, slow_close, timeout, slicer, limit_data, reset_peer.

The matrix is the load-bearing artifact: what the team expects under each condition is what differentiates resilience verification from "did the test pass?" The Expected column drives the assertions.

Step 3 - Wire Toxiproxy and run the matrix

Sit Toxiproxy between th

Полный SKILL.md на GitHub

Установить api-chaos-runner в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

.tessl-plugin/plugin.jsonreferences/toxiproxy-wiring.md

FAQ

Что делает скилл api-chaos-runner?

Use when an existing API test suite should be rerun under network faults to prove retries, timeouts, circuit breakers and fallbacks work. Injects latency, timeouts, dropped connections, bandwidth caps and packet loss with Toxiproxy and reports which assertions break under which fault.

Как установить скилл api-chaos-runner?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл api-chaos-runner запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить api-chaos-runner с