test-ainb
Run tests for the ainb (agents-in-a-box) Rust workspace via a 5-layer strategy — unit, insta snapshot, mock-plugin compositing, real-plugin spawn, vhs recording. Wraps cargo + insta + vhs into one CLI. Use when Stevie says "/test-ainb", "test ainb", "run ainb tests", "snapshot <component>", "regenerate vhs tapes", or any phrasing about validating ainb test layers. The skill autodetects which ainb-tui worktree the cwd sits in and dispatches to scripts/run.sh.
Best use case
test-ainb is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Run tests for the ainb (agents-in-a-box) Rust workspace via a 5-layer strategy — unit, insta snapshot, mock-plugin compositing, real-plugin spawn, vhs recording. Wraps cargo + insta + vhs into one CLI. Use when Stevie says "/test-ainb", "test ainb", "run ainb tests", "snapshot <component>", "regenerate vhs tapes", or any phrasing about validating ainb test layers. The skill autodetects which ainb-tui worktree the cwd sits in and dispatches to scripts/run.sh.
Teams using test-ainb should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/test-ainb/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How test-ainb Compares
| Feature / Agent | test-ainb | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Run tests for the ainb (agents-in-a-box) Rust workspace via a 5-layer strategy — unit, insta snapshot, mock-plugin compositing, real-plugin spawn, vhs recording. Wraps cargo + insta + vhs into one CLI. Use when Stevie says "/test-ainb", "test ainb", "run ainb tests", "snapshot <component>", "regenerate vhs tapes", or any phrasing about validating ainb test layers. The skill autodetects which ainb-tui worktree the cwd sits in and dispatches to scripts/run.sh.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# /test-ainb — ainb 5-layer test runner
When invoked, parse the user's arguments and dispatch to `scripts/run.sh`. The script does all the work — argv parsing, workspace autodetect, layer dispatch, formatted output. Do not narrate; just run it and surface output.
## Invocation
```bash
{{HOME_TOOL_DIR}}/skills/test-ainb/scripts/run.sh [FLAGS]
```
Pass the user's arguments straight through. If user typed `/test-ainb` with no args, run with no args (defaults to `--layer quick` = L1 + L2).
## Argument forwarding
| User typed | Forward as |
|------------|-----------|
| `/test-ainb` | `scripts/run.sh` |
| `/test-ainb --layer L1` | `scripts/run.sh --layer L1` |
| "run ainb tests" | `scripts/run.sh` |
| "snapshot the session_list component" | `scripts/run.sh --component session_list` |
| "test ainb at layer all" | `scripts/run.sh --layer all` |
| "regenerate vhs tapes" | `scripts/run.sh --vhs all --update` |
| "run ci tests" | `scripts/run.sh --ci` |
| "spawn burndown plugin test" | `scripts/run.sh --plugin burndown` |
## Layers (quick reference)
| Layer | Scope | When |
|-------|-------|------|
| L1 | Unit (cargo test --lib --bins --tests) | Always — fastest, broadest. `--tests` is required: without it, integration tests under `crates/*/tests/` are skipped. |
| L2 | Insta snapshot (TestBackend) | Component renders — width-aware regressions |
| L3 | Mock-plugin compositing | BSP tile composition without subprocess spawn |
| L4 | Real-plugin spawn (`--ignored`) | Slow: actually spawns subprocess plugin |
| L5 | VHS recording | Manual visual regression — produces .gif artefacts |
Full layer detail: see `references/layers.md`.
## Defaults
- No args → `--layer quick` = L1 + L2.
- `--layer all` → L1 + L2 + L3 (L4 + L5 require explicit opt-in via `--plugin` / `--vhs`).
- `--ci` → CI subset (L1 + L2, single-threaded).
## What NOT to do
- Don't pre-narrate ("I'll run the tests now") — just invoke the script.
- Don't summarise the script output unless user explicitly asks; the script's own summary is the answer.
- Don't try to interpret test failures inside this skill — surface them and let Stevie decide.
- Don't auto-run L4 or L5 — they're explicit opt-in. `--layer all` deliberately excludes them.
- Don't hardcode any worktree path; the script autodetects.
## Tooling prerequisites
- `cargo` (Rust toolchain) — required for L1–L4.
- `cargo-insta` — required for L2 with `--update`. Install hint: `cargo install cargo-insta`.
- `vhs` — required for L5. Install hint: `brew install vhs`.
- Script prints install hints automatically when tooling is missing.
## Memory notes baked into the script
- **Volatile worktrees** (`user_volatile_worktrees`): workspace autodetect walks up from cwd; never hardcodes a path.
- **Verify worker test-green claims** (`feedback_verify_worker_test_green_claim`): L1 runs the full workspace incl. crates' integration `tests/` dirs.
- **insta trailing-newline trap** (`reference_insta_trailing_newline_trap`): tests must `trim_end_matches('\n')`; skill does NOT auto-accept bad snapshots — `--update` is explicit.
- **VHS sleep budget** (`reference_vhs_sleep_budget`): tapes themselves bake in correct sleeps (ainb home cold ~30s, post-`i` 40-60s); the skill just records.Related Skills
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code. Enforces RED-GREEN-REFACTOR cycle with test-first approach.
find-missing-tests
Analyze codebase and identify missing test cases, then create GitHub issues for each gap
expect-test
AI-powered browser testing using expect-cli. Auto-detects dev server, reads git diff, generates and executes browser tests via Playwright. Use when you need to verify UI changes in a real browser, test user flows, or validate fixes visually. Trigger on "test this in the browser", "verify the UI", "run expect", "browser test", or after completing UI fixes.
ainb-fleet:standup
Show fleet status — every claude session running on the host, merged across ainb + claude-peers broker + background jobs. Use when you need to enumerate sessions before composing an action, see which sessions have a peer registered (broker-routable) vs tmux-only, check the `summary` of each session, or pipe the list into jq for filtering. Default output: text table. Pass --format json for LLM consumption.
ainb-fleet:sequence
Ordered multi-step prompts to fleet targets, ack-gated between steps via JSONL assistant-turn-end detection. Use for cycles like disconnect→reconnect→verify, or any flow where step N+1 requires step N to have completed first. The skill BLOCKS until each target's transcript shows the next assistant turn finishing OR per-step timeout fires (default 300s).
ainb-fleet:needs
Center control panel — enumerate every claude session that is blocked waiting on something: a user answer (AskUserQuestion fired), an API error retry, an idle assistant turn-end with no follow-up, or an explicit WAITING: marker. Returns rich JSON with signal kind + context per session. Use this when you've stepped away from the fleet and want one place to see everything that wants your attention and answer it.
ainb-fleet:fleet-needs
Workflow-backed Jarvis control panel. Runs the deterministic `hangar` workflow with verb=needs (discover → enrich → prioritize), renders the Jarvis HUD from its render-ready cards, fires AskUserQuestion per blocked session, and routes each answer back via tmux send-keys (broker fallback only). Requires the workflow gate (CLAUDE_CODE_WORKFLOWS=1). If the gate is off, fall back to the prompt-driven `/ainb-fleet:needs` skill.
ainb-fleet:daemon
Long-running watcher that scans every claude session every 5s and auto-sends `continue` to any session whose recent tmux pane buffer matches a known API-error regex (rate_limited, overloaded_error, internal_server_error, request_timeout, socket_hang_up, fetch_failed, ECONNRESET). Use this when you want unattended recovery from transient API failures across the fleet.
ainb-fleet:broadcast
Fan out a single prompt to selected claude sessions across the fleet. Use when you need to apply the same instruction (e.g. `/clear`, `git pull`, `remote-control disconnect`) to many sessions at once. Routing: peers-first (broker HTTP) when peer registered, tmux send-keys fallback otherwise. Refuses to run without an explicit targeting flag (--all, --filter <regex>, or --cwd <substring>) — no implicit fan-out.
ainb-fleet
Fleet orchestration overview — the `ainb fleet ...` Rust subcommand namespace for driving every claude session on the host. Routes to one of five sub-skills (standup / broadcast / sequence / needs / daemon). Invoke this for an at-a-glance map of what fleet can do; reach for the specific sub-skill for the verb you want.
workflow
Guide through structured delivery workflow with plan, implement, validate phases