deepagents-architectur…
Guides architectural decisions for Deep Agents applications. Use when deciding between Deep Agents vs alternatives, choosing backend strategies, designing…
Execute YAML test plan, stop on first failure, output rich debug prompt
$ npx -y skills add existential-birds/beagle --skill run-test-plan --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/run-test-planContext preview
The summary Claude sees to decide when to auto-load this skill.
Execute YAML test plan, stop on first failure, output rich debug prompt
description: Execute YAML test plan, stop on first failure, output rich debug prompt name: run-test-plan disable-model-invocation: true
Execute a YAML test plan, run setup commands, health checks, and each test sequentially. Stop on first failure with rich debug output.
Read and validate the test plan:
# Resolve plan path from --plan (default shown)
PLAN_PATH="${PLAN_PATH:-docs/testing/test-plan.yaml}"
# Check file exists
ls "$PLAN_PATH" || { echo "Error: Test plan not found: $PLAN_PATH"; exit 1; }
# Validate YAML
python3 -c "import yaml; yaml.safe_load(open('$PLAN_PATH'))" || { echo "Error: Invalid YAML: $PLAN_PATH"; exit 1; }Extract from the YAML:
If `setup.prerequisites` exists, verify each one:
# For each prerequisite in setup.prerequisites
<prerequisite.check> || { echo "Prerequisite not met: <prerequisite.name>"; exit 1; }If `setup.env` exists, export each variable. Variables using `${VAR}` syntax should be resolved from the current environment:
# For each key/value in setup.env export <key>="<value>"
If `setup.build` exists, execute build commands sequentially:
# For each command in setup.build
<command> || { echo "Build failed: <command>"; exit 1; }If `setup.services` exists, start long-running processes and wait for health checks:
# For each service in setup.services nohup <service.command> > .beagle/service-<index>.log 2>&1 & echo $! > .beagle/service-<index>.pid
For each service with a `health_check`, poll until ready:
timeout=<service.health_check.timeout or 30>
url=<service.health_check.url>
elapsed=0
while [ $elapsed -lt $timeout ]; do
if curl -s -o /dev/null -w "%{http_code}" "$url" | grep -qE "^(200|301|302)"; then
echo "✓ Health check passed: $url"
break
fi
sleep 2
elapsed=$((elapsed + 2))
done
if [ $elapsed -ge $timeout ]; then
echo "✗ Health check timeout: $url"
exit 1
fiIf the plan uses the older flat format (`setup.commands` + `setup.health_checks` instead of `prerequisites`/`build`/`services`), fall back to executing `setup.commands` sequentially and polling `setup.health_checks` as before.
Do not start **Step 4** until each condition you can check is true:
1. **Plan load:** The file from `--plan` (default `docs/testing/test-plan.yaml`) exists and parses as YAML (same checks as Step 1). 2. **Setup branch:**
3. **Evidence path:** `mkdir -p docs/testing/evidence` succeeds and the directory exists.
If any gate fails, stop, fix setup or flags, and do not execute tests.
For each test in the plan:
## Running: TC-XX - <test.name> Context: <test.context>
For each step in `test.steps`, determine the step type and execute accordingly:
**Shell commands (`run:` steps):**
The most common step type. Execute the command via Bash and capture stdout, stderr, and exit code:
# Execute the command, capture output and exit code <command> 2>&1 echo "EXIT_CODE: $?"
Capture all output for evaluation in step 4c. Shell steps cover:
**curl actions (`action: curl` steps):**
curl -X <method> \
-H "Content-Type: application/json" \
<additional headers> \
-d '<body>' \
"<url>" \
-o response.json \
-w "%{http_code}" > status_code.txt
# Capture response for evaluation
cat response.json
cat status_code.txt**agent-browser CLI actions:**
Steps starting with `agent-browser` are browser automation commands:
# Navigate agent-browser open <url> # Snapshot interactive elements (always do before interacting) agent-browser snapshot -i # Interact using refs from snapshot output (@e1, @e2, etc.) agent-browser fill @<ref> "<value>" agent-browser click @<ref> # Wait for conditions agent-browser wait --url "<pattern>" agent-browser wait --text "<text>" agent-browser wait --load networkidle # Capture evidence agent-browser screenshot docs/testing/evidence/<test.id>.png
**Important:** Always run `agent-browser snapshot -i` before interacting with elements to get valid refs, and re-snapshot after navigation or significant DOM changes.
Save screenshots to `docs/testing/evidence/<test.id>.png`
**Gate — artifacts before PASS/FAIL:**
Image: NASA, Public Domain. Source Beagle is an Agent Skills marketplace: framework-aware code review, documentation, testing, architectural analysis, and git workflows for any compatible coding agent.
Repo: existential-birds/beagle
Guides architectural decisions for Deep Agents applications. Use when deciding between Deep Agents vs alternatives, choosing backend strategies, designing…
Reviews Deep Agents code for bugs, anti-patterns, and improvements. Use when reviewing code that uses create_deep_agent, backends, subagents, middleware, or…
Implements agents using Deep Agents. Use when building agents with create_deep_agent, configuring backends, defining subagents, adding middleware, or setting…
Guides architectural decisions for LangGraph applications. Use when deciding between LangGraph vs alternatives, choosing state management strategies, designing…
Reviews LangGraph code for bugs, anti-patterns, and improvements. Use when reviewing code that uses StateGraph, nodes, edges, checkpointing, or other LangGraph…
Implements stateful agent graphs using LangGraph. Use when building graphs, adding nodes/edges, defining state schemas, implementing checkpointing, handling…