stack-debug

Diagnose worktree Docker compose stacks using pnpm stack helper commands and bridge logs.

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/hontauadrian/sfx-app-empty-test --skill stack-debug-hontauadrian
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: stack-debug
Source: https://github.com/hontauadrian/sfx-app-empty-test/tree/main/.overstory/claude-profiles/reviewer/skills/stack-debug
Command: npx skills add https://github.com/hontauadrian/sfx-app-empty-test --skill stack-debug-hontauadrian

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When your worktree's isolated Docker stack misbehaves — the API crashes, a Prisma migration doesn't apply, or an env change never takes effect — you need a fast, structured way to inspect containers, logs, and the auto-apply bridge without fighting timeouts or stale container names. ## Core Features & Use Cases - One-shot stack snapshot: Run pnpm stack:debug to get a JSON status of project, postgres, api, web, and bridge services. - Log inspection without truncation: Use pnpm stack:logs and pnpm stack:follow for full or live service logs, and pnpm stack:bridge to read the NDJSON bridge event log covering migrations, env applies, and rebuilds. - Container exec and recovery: Exec into containers to verify env vars, and follow the decision table to fix a dead bridge via the idempotent stack-up-docker.sh respawn. - Use Case: Your pnpm probe:smoke run reports 500s. You run pnpm stack:logs api | grep -i "error", then pnpm stack:follow api to reproduce the failing request live and pinpoint the crash. ## Quick Start Ask the agent to debug why the API container in your worktree stack is crashing using the stack-debug helpers.

Frequently Asked Questions about stack-debug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug a Docker compose stack in my worktree?▼

Start with `pnpm stack:debug` for a one-shot JSON snapshot of all services, then use `pnpm stack:logs <service>` for the last 200 log lines or `pnpm stack:follow <service>` for a live tail. Always use the pnpm helpers since container names change on recreate.

Why didn't my Prisma migration apply in the Docker stack?▼

Check `pnpm stack:bridge` for a `migration.applied` event with success=false, which includes the stderr output. The panel-bridge auto-applies migrations, so its NDJSON log records every apply attempt and failure reason.

How do I see Docker container logs without timeouts?▼

Use `pnpm stack:logs` for the last 200 lines of all services or a single service like api, web, or postgres. Avoid piping `docker compose logs` through tail, which truncates mid-output and hides the real error.

Why is my .env change not taking effect in the API container?▼

Check `pnpm stack:bridge` for an `env.applied` event confirming the bridge detected the edit and restarted the service. If absent, the bridge is not watching that path — verify the env.files list in panel.config.json.

What should I do when the bridge log shows nothing for minutes?▼

The bridge process likely died. Check `cat .bridge.pid` and `ps -p $(cat .bridge.pid)`, then re-spawn with `bash scripts/stack-up-docker.sh`, which is idempotent and only restarts the bridge if the PID is stale.