# Test Mirrord Sessions Under Chaos

Teams need realistic failure tests without changing shared workloads or application code. This skill creates session-scoped mirrord rules for latency and connection failures in local and CI tests.

## Install

```bash
npx skillstore add metalbear-co/mirrord-chaos
```

## Metadata

- Status: approved
- Slug: metalbear-co-mirrord-chaos
- Version: 2.0
- Author version: 2.0
- Skillstore revision: r1
- Version status: invalid
- Tree hash: 6469466b0a0a4edc1229abc3825c6441bda498ff30804f80cadcc77d24daed81
- Author: metalbear-co
- GitHub username: metalbear-co
- License: MIT
- Repository: https://github.com/metalbear-co/skills/tree/a0ad7ca50ffb241a1c4f9c6a05d17661d5d658a5/skills/mirrord-chaos
- Ref: bad9dafc37d1638cd29cb9bab06d5f8dbcd0f6c2
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network, filesystem
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/metalbear-co-mirrord-chaos
- Manifest: https://skillstore.pages.dev/api/skills/metalbear-co-mirrord-chaos/manifest

## Capabilities

- Create valid mirrord chaos rule files for latency and connection errors.
- Explain session scope, selectors, percentages, priorities, and hit counts.
- Provide commands to add, list, edit, and delete session rules.
- Design CI workflows that apply reviewed rules and clean them up.
- Troubleshoot validation errors, missing sessions, and rules that do not fire.

## Use Cases

- Test Retry Behavior: Inject timeouts or refused connections into selected dependency traffic and verify application retries, fallbacks, and error handling.
- Add Failure Scenarios to CI: Version rule files with integration tests, apply them to a tagged mirrord session, and remove them after the test run.
- Investigate Rule Behavior: Inspect active rules, priorities, percentages, identifiers, and hit counts when a chaos scenario behaves unexpectedly.

## Prompt Templates

### Add Basic Latency

```
Create a mirrord chaos rule that adds read latency to 25 percent of outgoing TCP connections to my database host. Explain each field.
```

### Simulate a Timeout

```
Show me how to make calls to payments.internal time out in a live mirrord session, then provide the cleanup command.
```

### Build a CI Scenario

```
Design a CI workflow that starts a tagged mirrord session, finds its session ID, applies reviewed chaos rules, runs integration tests, and always cleans up.
```

### Resolve Rule Conflicts

```
Review these mirrord chaos rules and explain which rule wins for each matching upstream. Identify invalid effects, priorities, percentages, and selectors.
```

## Limitations

- Chaos rules currently target outgoing TCP connections only.
- The chaos feature requires a compatible mirrord CLI and a live session.
- The feature is alpha and may change between mirrord releases.
- The skill does not install mirrord or verify a production environment.

## Best Practices

- Run chaos tests against staging dependencies whenever possible.
- Review rule files with the tests that use them.
- Include deterministic cleanup in every CI workflow.

## Anti Patterns

- Do not use deprecated experimental latency configuration for new scenarios.
- Do not apply broad failure rules to production sessions without approval.
- Do not depend on rule names when identifiers are available.

## Security Audit

- Audited at: 2026-09-29T21:23:28.154\+00:00
- Summary: All 78 static findings are false positives for this document-only skill. The flagged commands are explicit mirrord, shell, and text-processing examples for session-scoped chaos testing; no malicious installation, credential access, exfiltration, or prompt injection was found.

## Stats

- Views: 0
- Downloads: 4
- Favorites: 0
- Popularity score: 0
