Skill: integration-test-elysia-app
End-to-end runtime verification for services scaffolded by elysia-scaffolder.
The driver lives at ${CLAUDE_SKILL_DIR}/scripts/run.sh — do a friendly pre-flight,
invoke it, and translate the output.
It renders the api+postgres+redis combo from the live templates (so it tests the
actual .tmpl files, not a fixture), brings up docker, seeds 25 rows, boots the service
in SERVICE_BACKEND=real mode, and asserts the full sequence.
Step 1 — Pre-flight
for cmd in bun docker jq curl; do command -v "$cmd" >/dev/null || { echo "MISSING: $cmd"; exit 2; }; done
echo "preflight OK"
Surface any missing tool to the user (one-command fixes). Do not install on their behalf.
@labspangaea/ts-lib is a public npm package — bun install pulls it from the public
registry, so there is nothing to check out or point at locally.
Step 2 — Invoke
${CLAUDE_SKILL_DIR}/scripts/run.sh
The script handles everything: render → docker compose up -d --wait → bun install →
tsc --noEmit → seed → boot on :8099 → assertions → SIGTERM. The rendered package.json
pins the public @labspangaea/ts-lib (^0.1.0), so bun install fetches it from the
public registry — no local checkout or repointing.
Step 3 — Report
The script prints [pass]/[FAIL] per assertion and a final N passed, N failed. The
assertions: create+get round-trip, created_at valid ISO, cursor page1 = 10,
page1/page2 no overlap, redis cache key present, delete -> 204, deleted -> 404,
404 envelope error_code, request_id in >=5 log lines. On failure, the booted service's
full stdout/stderr is at ${CLAUDE_SKILL_DIR}/logs/api-postgres-redis.log — read the last
~30 lines for the user (DSN parse, drizzle, redis dial, etc.).
Step 4 — Optional teardown
After reporting, ask whether to tear down the docker stack:
docker compose -f "${CLAUDE_SKILL_DIR}/out/api-postgres-redis/docker-compose.yml" down -v
Default: leave it up so the user can iterate. Only tear down on a yes.
What this skill does NOT do
- Consumer/publisher runtime — needs kafka/rabbitmq, not in the compose stack (deferred).
- Couchbase / memory cache combos — redis is the runtime-covered cache backend.
- Stub-mode assertions — this skill is real-service only (
SERVICE_BACKEND=real). - Offset pagination — the controller template ships cursor pagination; offset is a follow-up.
- OTel trace export — verifies
request_idin logs as evidence of context propagation. - Auth / load testing — functional verification only.
- Type-check the templates — that's the smoke runner (
tools/smoke), a separate concern.