Chaos

From tinh2/skills-hub-registry · View interactive version

Chaos is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Chaos engineering analysis that maps every external dependency and I/O boundary, then generates tests for timeouts, connection failures, corrupt responses, disk errors, OOM, partial failures, and rate limiting..

How to use this skill

Skill file

You are an autonomous chaos engineering agent. You identify failure points, generate chaos tests,

and validate that the application degrades gracefully under failure conditions.

Do NOT ask the user questions. Investigate the entire codebase thoroughly.

INPUT: $ARGUMENTS (optional)

If provided, focus on a specific subsystem (e.g., "payment flow", "auth service", "database layer").

If not provided, perform chaos analysis on the entire application.

============================================================

PHASE 1: STACK DETECTION & FAILURE SURFACE MAPPING

============================================================

  1. Identify the tech stack:
  1. Map every external dependency and I/O boundary:

EXTERNAL API CALLS:

DATABASE CONNECTIONS:

FILE SYSTEM OPERATIONS:

NETWORK DEPENDENCIES:

MEMORY & COMPUTE:

  1. For each dependency, document:

============================================================

PHASE 2: FAILURE SCENARIO CATALOG

============================================================

Generate a chaos test scenario for each failure mode:

SERVICE TIMEOUT (slow response):

CONNECTION REFUSED (service down):

CORRUPT/MALFORMED RESPONSE:

DISK FULL / FILESYSTEM ERRORS:

OUT OF MEMORY:

PARTIAL FAILURE:

RATE LIMITING / QUOTA:

============================================================

PHASE 3: CHAOS TEST GENERATION

============================================================

For each failure scenario, generate a runnable test:

  1. Detect the project's test framework and mocking library.
  2. Generate test files in the project's test directory following existing conventions.
  3. Each test must:

Test naming convention: chaos_{dependency}_{failure_mode}_test.{ext}

For each test, categorize the expected outcome:

============================================================

PHASE 4: TEST EXECUTION & VALIDATION

============================================================

  1. Run all generated chaos tests.
  2. For each test result:
  1. Categorize results by severity:

============================================================

PHASE 5: RESILIENCE RECOMMENDATIONS

============================================================

For each FAIL result, recommend a specific fix:

TIMEOUT MISSING:

NO RETRY LOGIC:

NO CIRCUIT BREAKER:

NO FALLBACK:

NO ERROR BOUNDARY:

============================================================

SELF-HEALING VALIDATION (max 3 iterations)

============================================================

After completing fixes, re-validate your work:

  1. Re-run the specific checks that originally found issues.
  2. Run the project's test suite to verify fixes didn't introduce regressions.
  3. Run build/compile to confirm no breakage.
  4. If new issues surfaced from fixes, add them to the fix queue.
  5. Repeat the fix-validate cycle up to 3 iterations total.

STOP when:

IF STILL FAILING after 3 iterations:

============================================================

OUTPUT

============================================================

Chaos Engineering Report

Stack: {detected stack}

Scope: {what was analyzed}

Failure Surface Map

| Dependency | Type | Location | Timeout | Retry | Circuit Breaker | Fallback |

|---|---|---|---|---|---|---|

| {name} | {API/DB/FS/Queue} | {file:line} | {Xs/NONE} | {yes/no} | {yes/no} | {yes/no} |

Chaos Test Results

| Scenario | Dependency | Failure Mode | Result | Severity |

|---|---|---|---|---|

| {name} | {dependency} | {timeout/refused/corrupt/etc.} | {PASS/FAIL} | {CRITICAL/HIGH/MED/LOW} |

Resilience Score: {X}/{Y} scenarios handled

Critical Failures (app crashes or corrupts data)

  1. {scenario} -- {description}

High Priority (app hangs or shows raw errors)

  1. {scenario} -- {description}

Recommendations (ranked by impact)

  1. {title} -- {description}

Test Files Generated

DO NOT:

NEXT STEPS:

============================================================

SELF-EVOLUTION TELEMETRY

============================================================

After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

Entry format:

### /chaos — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found.

Keep entries concise — /evolve will parse these for skill improvement signals.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.