GitHub Actions Stuck Run Audit
Use this skill to catch workflows that are stuck in queued/in-progress states for too long.
What this skill does
- Reads GitHub Actions run JSON exports
- Detects stale runs in non-terminal statuses (
queued, in_progress, etc.)
- Aggregates stuck risk by repo/workflow (or repo/branch)
- Scores severity with stuck-age, stuck-run volume, and stuck-rate thresholds
- Emits
ok / warn / critical and can fail CI gates
Inputs
Optional:
RUN_GLOB (default: artifacts/github-actions/*.json)
TOP_N (default: 20)
OUTPUT_FORMAT (text or json, default: text)
GROUP_BY (repo, repo-workflow, repo-workflow-branch; default: repo-workflow)
NOW_ISO (optional ISO timestamp override for deterministic replay)
STUCK_STATUSES (comma list, default: queued,in_progress,pending,waiting,requested)
WARN_STUCK_MINUTES (default: 45)
CRITICAL_STUCK_MINUTES (default: 120)
WARN_STUCK_RUNS (default: 2)
CRITICAL_STUCK_RUNS (default: 4)
WARN_STUCK_RATE (0..1, default: 0.2)
CRITICAL_STUCK_RATE (0..1, default: 0.45)
MIN_RUNS (default: 1)
WORKFLOW_MATCH / WORKFLOW_EXCLUDE (regex, optional)
BRANCH_MATCH / BRANCH_EXCLUDE (regex, optional)
EVENT_MATCH / EVENT_EXCLUDE (regex, optional)
REPO_MATCH / REPO_EXCLUDE (regex, optional)
STATUS_MATCH / STATUS_EXCLUDE (regex, optional)
FAIL_ON_CRITICAL (0 or 1, default: 0)
Collect run JSON
gh run view <run-id> \
--json databaseId,workflowName,event,headBranch,status,conclusion,createdAt,runStartedAt,updatedAt,url,repository \
> artifacts/github-actions/run-<run-id>.json
Run
Text report:
RUN_GLOB='artifacts/github-actions/*.json' \
bash skills/github-actions-stuck-run-audit/scripts/stuck-run-audit.sh
JSON output + fail gate:
RUN_GLOB='artifacts/github-actions/*.json' \
OUTPUT_FORMAT=json \
FAIL_ON_CRITICAL=1 \
bash skills/github-actions-stuck-run-audit/scripts/stuck-run-audit.sh
Run against bundled fixtures:
NOW_ISO='2026-03-08T00:00:00Z' \
RUN_GLOB='skills/github-actions-stuck-run-audit/fixtures/*.json' \
bash skills/github-actions-stuck-run-audit/scripts/stuck-run-audit.sh
Output contract
- Exit
0 in report mode (default)
- Exit
1 when FAIL_ON_CRITICAL=1 and one or more groups are critical
- Text mode prints summary + ranked stuck-risk groups
- JSON mode prints summary + ranked groups + critical groups
1---2name: github-actions-stuck-run-audit3description: Detect stale queued/in-progress GitHub Actions runs before they quietly block delivery.4---56# GitHub Actions Stuck Run Audit78Use this skill to catch workflows that are stuck in queued/in-progress states for too long.910## What this skill does11- Reads GitHub Actions run JSON exports12- Detects stale runs in non-terminal statuses (`queued`, `in_progress`, etc.)13- Aggregates stuck risk by repo/workflow (or repo/branch)14- Scores severity with stuck-age, stuck-run volume, and stuck-rate thresholds15- Emits `ok` / `warn` / `critical` and can fail CI gates1617## Inputs18Optional:19- `RUN_GLOB` (default: `artifacts/github-actions/*.json`)20- `TOP_N` (default: `20`)21- `OUTPUT_FORMAT` (`text` or `json`, default: `text`)22- `GROUP_BY` (`repo`, `repo-workflow`, `repo-workflow-branch`; default: `repo-workflow`)23- `NOW_ISO` (optional ISO timestamp override for deterministic replay)24- `STUCK_STATUSES` (comma list, default: `queued,in_progress,pending,waiting,requested`)25- `WARN_STUCK_MINUTES` (default: `45`)26- `CRITICAL_STUCK_MINUTES` (default: `120`)27- `WARN_STUCK_RUNS` (default: `2`)28- `CRITICAL_STUCK_RUNS` (default: `4`)29- `WARN_STUCK_RATE` (0..1, default: `0.2`)30- `CRITICAL_STUCK_RATE` (0..1, default: `0.45`)31- `MIN_RUNS` (default: `1`)32- `WORKFLOW_MATCH` / `WORKFLOW_EXCLUDE` (regex, optional)33- `BRANCH_MATCH` / `BRANCH_EXCLUDE` (regex, optional)34- `EVENT_MATCH` / `EVENT_EXCLUDE` (regex, optional)35- `REPO_MATCH` / `REPO_EXCLUDE` (regex, optional)36- `STATUS_MATCH` / `STATUS_EXCLUDE` (regex, optional)37- `FAIL_ON_CRITICAL` (`0` or `1`, default: `0`)3839## Collect run JSON4041```bash42gh run view <run-id> \43 --json databaseId,workflowName,event,headBranch,status,conclusion,createdAt,runStartedAt,updatedAt,url,repository \44 > artifacts/github-actions/run-<run-id>.json45```4647## Run4849Text report:5051```bash52RUN_GLOB='artifacts/github-actions/*.json' \53bash skills/github-actions-stuck-run-audit/scripts/stuck-run-audit.sh54```5556JSON output + fail gate:5758```bash59RUN_GLOB='artifacts/github-actions/*.json' \60OUTPUT_FORMAT=json \61FAIL_ON_CRITICAL=1 \62bash skills/github-actions-stuck-run-audit/scripts/stuck-run-audit.sh63```6465Run against bundled fixtures:6667```bash68NOW_ISO='2026-03-08T00:00:00Z' \69RUN_GLOB='skills/github-actions-stuck-run-audit/fixtures/*.json' \70bash skills/github-actions-stuck-run-audit/scripts/stuck-run-audit.sh71```7273## Output contract74- Exit `0` in report mode (default)75- Exit `1` when `FAIL_ON_CRITICAL=1` and one or more groups are critical76- Text mode prints summary + ranked stuck-risk groups77- JSON mode prints summary + ranked groups + critical groups