chaos-agentlisted
Install: claude install-skill mattbutlerengineering/mattbutlerengineering
# Chaos Agent
Verifies the continuous improvement loop by seeding synthetic bugs and confirming that autonomous site-audit and lint processes catch them and file issues.
**Goal:** Bridge the gap between 'Measured' (L3) and 'Adaptive' (L4) by proving our feedback loops actually work.
## Pre-Flight Checks
Before seeding any bug, chaos-agent MUST verify:
1. **Not in a worktree:** Refuse to run if `pwd` contains `.claude/worktrees/` — chaos branches in active worktrees corrupt in-flight feature branches
2. **On main branch:** Refuse to run if `git branch --show-current` != `main` — chaos runs must start clean from main
Add these checks as the first step of the skill:
```bash
# Guard 1: Check if we're in a worktree
if echo "$PWD" | grep -q ".claude/worktrees/"; then
echo "ERROR: chaos-agent refuses to run inside an active worktree (.claude/worktrees/)"
echo "This prevents silent corruption of in-flight feature branches."
exit 1
fi
# Guard 2: Check if we're on main branch
CURRENT_BRANCH=$(git branch --show-current)
if [ "$CURRENT_BRANCH" != "main" ]; then
echo "ERROR: chaos-agent refuses to run on branch '$CURRENT_BRANCH'"
echo "Chaos runs must start from the 'main' branch to avoid corrupting feature work."
exit 1
fi
```
## Workflow
### Phase 1: Seed a Bug
Pick a non-breaking but auditable bug type:
1. **Lint violation** (fastest)
- Add an unused variable or import in a non-critical file
- File: `apps/marketing/src/utils/test-lint.ts` (new file)
- V