debug-failed-run
Installation
SKILL.md
Debug a Failed Flow Run
Investigate why a flow run failed by combining two sources of truth:
- The DevOps debug script — live BullMQ job + Postgres (
flow_run,flow_version,flow) + the run log file, joined into one JSON report. Run over SSH. - ClickHouse logs — the centralized server/worker logs, queried via the ClickStack MCP. These fill in what the script can't: surrounding log lines, infra errors, and the decompressed run body when the script's host can't unzip it (see Node note below).
Inputs
id(required) — the flow run id. For flow executions the BullMQjobId === flowRun.id, so this works for both--runand--job.host(required) — SSH target for the DevOps box, e.g.user@host. Always ask the user for this (or read it from their local SSH config /~/.ssh/configalias) — never assume one. The examples below use<host>as a placeholder; substitute the real target at run time.--queue(optional) — BullMQ queue name. DefaultworkerJobs. Dedicated worker-group jobs may live inplatform-<workerGroupId>-jobs.
This skill lives in the repo, not on the DevOps box — it drives the remote scripts over SSH.
Step 1 — Pull the job/run report (SSH)
The scripts live in /root/queue on the DevOps box and read the same AP_* env (Redis, Postgres, S3) the server uses, via .env. Run with plain node (matches how the box invokes them):