apps/cli/src/templates/claude/skills/verify-build/SKILL.md
Build a verification script that defines "done" for a parent task or project phase. Creates a .sh script and attaches it via tx auto verify set.
npx skillsauth add jamesaphoenix/tx verify-buildInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Creates a .sh script that defines machine-checkable "done" criteria for a parent task or project phase. The primary use case: attach a verification gate to a parent task so agents (and humans) can machine-check whether a phase is complete before moving on.
Ask the user:
Based on the user's definition of done, create a .sh script at .tx/verify/<name>.sh.
The most common parent task check — verify all subtasks have been completed:
#!/usr/bin/env bash
set -euo pipefail
PARENT_ID="${1:-tx-xxxxxx}" # pass as arg or hard-code
CHILDREN=$(tx dep children "$PARENT_ID" --json 2>/dev/null)
TOTAL=$(echo "$CHILDREN" | jq 'length')
INCOMPLETE=$(echo "$CHILDREN" | jq '[.[] | select(.status != "done")] | length')
if [ "$INCOMPLETE" -gt 0 ]; then
echo "FAIL: $INCOMPLETE of $TOTAL child tasks not done" >&2
echo "$CHILDREN" | jq -r '.[] | select(.status != "done") | " - \(.id): \(.title) [\(.status)]"' >&2
exit 1
fi
echo "PASS: All $TOTAL children of $PARENT_ID are done"
#!/usr/bin/env bash
set -euo pipefail
PARENT_ID="${1:-tx-xxxxxx}"
PASS=0; FAIL=0
check() {
local desc="$1"; shift
if "$@" >/dev/null 2>&1; then
PASS=$((PASS+1))
echo " PASS: $desc"
else
FAIL=$((FAIL+1))
echo " FAIL: $desc" >&2
fi
}
# Check all children done
INCOMPLETE=$(tx dep children "$PARENT_ID" --json 2>/dev/null | jq '[.[] | select(.status != "done")] | length')
if [ "$INCOMPLETE" -eq 0 ]; then
PASS=$((PASS+1)); echo " PASS: All children done"
else
FAIL=$((FAIL+1)); echo " FAIL: $INCOMPLETE children not done" >&2
fi
# Check tests pass
check "Tests pass" bun run test:unit
# Check typecheck
check "Typecheck clean" bun run typecheck
echo "$PASS passed, $FAIL failed"
[ "$FAIL" -eq 0 ]
For richer verification data (use with --schema for machine validation):
#!/usr/bin/env bash
set -euo pipefail
PARENT_ID="${1:-tx-xxxxxx}"
CHILDREN=$(tx dep children "$PARENT_ID" --json 2>/dev/null)
TOTAL=$(echo "$CHILDREN" | jq 'length')
DONE=$(echo "$CHILDREN" | jq '[.[] | select(.status == "done")] | length')
INCOMPLETE=$((TOTAL - DONE))
# Output structured JSON for schema validation
cat <<ENDJSON
{
"total": $TOTAL,
"done": $DONE,
"incomplete": $INCOMPLETE,
"passed": $([ "$INCOMPLETE" -eq 0 ] && echo "true" || echo "false")
}
ENDJSON
[ "$INCOMPLETE" -eq 0 ]
#!/usr/bin/env bash
set -euo pipefail
DOC_COUNT=$(find specs -name "*.yaml" -type f | wc -l | tr -d ' ')
echo "Found $DOC_COUNT docs"
if [ "$DOC_COUNT" -lt 10 ]; then
echo "FAIL: Need at least 10 docs, found $DOC_COUNT" >&2
exit 1
fi
echo "PASS: Docs phase complete ($DOC_COUNT docs)"
#!/usr/bin/env bash
set -euo pipefail
bunx --bun vitest run test/integration/ --reporter=json 2>/dev/null | jq -e '.numFailedTests == 0'
#!/usr/bin/env bash
set -euo pipefail
bun run typecheck && bun run build && echo "PASS: Build clean"
#!/usr/bin/env bash
set -euo pipefail
curl -sf http://localhost:3456/health | jq -e '.status == "ok"'
After creating the script, make it executable and attach it to the parent task:
chmod +x .tx/verify/<name>.sh
tx auto verify set <parent-task-id> ".tx/verify/<name>.sh"
Optional: attach a JSON schema to validate structured output from the script:
tx auto verify set <parent-task-id> ".tx/verify/<name>.sh" --schema ".tx/verify/<name>.schema.json"
Example schema (.tx/verify/<name>.schema.json):
{
"required": ["total", "done", "incomplete", "passed"],
"properties": {
"total": { "type": "number" },
"done": { "type": "number" },
"incomplete": { "type": "number" },
"passed": { "type": "boolean" }
}
}
If no task ID was provided, ask which parent task to attach it to.
Run the verification to confirm it works:
tx auto verify run <parent-task-id>
tx auto verify run <parent-task-id> --json # machine-readable output
tx auto verify run <parent-task-id> --timeout 600 # longer timeout for heavy checks
Show the user the output and ask if adjustments are needed.
tx auto verify set <id> <command> [--schema <path>] # Attach verify script
tx auto verify show <id> # Inspect what's attached
tx auto verify run <id> [--timeout <seconds>] [--json] # Execute and check
tx auto verify clear <id> # Remove verify script
The parent task verification pattern fits into the agent loop like this:
# Agent completes all subtasks, then verifies the parent
PARENT_ID="tx-abc123"
# Work on children...
for child in $(tx dep children "$PARENT_ID" --json | jq -r '.[].id'); do
# ... agent works on each child, calls tx done $child
done
# Gate: only mark parent done if verification passes
if tx auto verify run "$PARENT_ID"; then
tx done "$PARENT_ID"
else
echo "Parent verification failed — check remaining work"
fi
set -euo pipefail at the top.tx/verify/ directory (create if needed).tx/config.toml or via --timeout)${var:1:-1}, &>>, associative arrays (declare -A), |&, coproc, mapfile, declare -ndevelopment
Implement and verify design doc invariants by annotating tests and source code with [INV-*] / @spec tags, then driving tx spec coverage from BUILD toward HARDEN (100% FCI). Works with any design doc that has an invariants block.
data-ai
Link tasks to paired PRD/design specs, export all open work to markdown, and keep Ralph-style loops moving by creating tasks, subtasks, and dependency updates through tx primitives.
development
Refresh bundled tx Claude Code and Codex skills in a project from the canonical tx source without manual copy and paste.
development
Run Ralph against either the full repo queue or tasks linked to one design doc, with injected task/spec/queue context for Codex or Claude runtimes.