GitHub Actions Rerun Effectiveness Audit
Use this skill to measure how often workflows require reruns and whether reruns are actually recovering failures.
What this skill does
- Reads GitHub Actions run JSON exports
- Tracks rerun episodes using workflow run id + attempt history
- Measures rerun rate, rerun success rate, and extra rerun attempts
- Estimates wasted rerun minutes from attempt durations
- Emits severity (
ok, warn, critical) for CI policy gates
Inputs
Optional:
RUN_GLOB (default: artifacts/github-actions/*.json)
TOP_N (default: 20)
OUTPUT_FORMAT (text or json, default: text)
GROUP_BY (workflow or workflow-branch, default: workflow)
FAILURE_CONCLUSIONS (comma-separated, default: failure,cancelled,timed_out,startup_failure,action_required)
SUCCESS_CONCLUSIONS (comma-separated, default: success)
MIN_RUNS (minimum workflow runs required, default: 4)
WARN_RERUN_RATE (0..1, default: 0.2)
CRITICAL_RERUN_RATE (0..1, default: 0.35)
WARN_RERUN_SUCCESS_RATE (0..1, default: 0.5)
CRITICAL_RERUN_SUCCESS_RATE (0..1, default: 0.25)
WARN_WASTED_MINUTES (default: 20)
CRITICAL_WASTED_MINUTES (default: 60)
WORKFLOW_MATCH / WORKFLOW_EXCLUDE (regex, optional)
BRANCH_MATCH / BRANCH_EXCLUDE (regex, optional)
EVENT_MATCH / EVENT_EXCLUDE (regex, optional)
REPO_MATCH / REPO_EXCLUDE (regex, optional)
ACTOR_MATCH / ACTOR_EXCLUDE (regex, optional)
FAIL_ON_CRITICAL (0 or 1, default: 0)
Collect run JSON
gh run view <run-id> --attempt <attempt> \
--json databaseId,runAttempt,workflowName,event,headBranch,headSha,conclusion,createdAt,updatedAt,runStartedAt,url,repository,actor,triggeringActor \
> artifacts/github-actions/run-<run-id>-attempt-<attempt>.json
Run
Text report:
RUN_GLOB='artifacts/github-actions/*.json' \
bash skills/github-actions-rerun-effectiveness-audit/scripts/rerun-effectiveness-audit.sh
JSON output + fail gate:
RUN_GLOB='artifacts/github-actions/*.json' \
OUTPUT_FORMAT=json \
FAIL_ON_CRITICAL=1 \
bash skills/github-actions-rerun-effectiveness-audit/scripts/rerun-effectiveness-audit.sh
Run against bundled fixtures:
RUN_GLOB='skills/github-actions-rerun-effectiveness-audit/fixtures/*.json' \
bash skills/github-actions-rerun-effectiveness-audit/scripts/rerun-effectiveness-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 workflow groups
- JSON mode prints summary + ranked groups + critical groups
1---2name: github-actions-rerun-effectiveness-audit3description: Audit GitHub Actions rerun dependency and success-after-rerun effectiveness to highlight workflows wasting CI time.4---56# GitHub Actions Rerun Effectiveness Audit78Use this skill to measure how often workflows require reruns and whether reruns are actually recovering failures.910## What this skill does11- Reads GitHub Actions run JSON exports12- Tracks rerun episodes using workflow run id + attempt history13- Measures rerun rate, rerun success rate, and extra rerun attempts14- Estimates wasted rerun minutes from attempt durations15- Emits severity (`ok`, `warn`, `critical`) for CI policy 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` (`workflow` or `workflow-branch`, default: `workflow`)23- `FAILURE_CONCLUSIONS` (comma-separated, default: `failure,cancelled,timed_out,startup_failure,action_required`)24- `SUCCESS_CONCLUSIONS` (comma-separated, default: `success`)25- `MIN_RUNS` (minimum workflow runs required, default: `4`)26- `WARN_RERUN_RATE` (0..1, default: `0.2`)27- `CRITICAL_RERUN_RATE` (0..1, default: `0.35`)28- `WARN_RERUN_SUCCESS_RATE` (0..1, default: `0.5`)29- `CRITICAL_RERUN_SUCCESS_RATE` (0..1, default: `0.25`)30- `WARN_WASTED_MINUTES` (default: `20`)31- `CRITICAL_WASTED_MINUTES` (default: `60`)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- `ACTOR_MATCH` / `ACTOR_EXCLUDE` (regex, optional)37- `FAIL_ON_CRITICAL` (`0` or `1`, default: `0`)3839## Collect run JSON4041```bash42gh run view <run-id> --attempt <attempt> \43 --json databaseId,runAttempt,workflowName,event,headBranch,headSha,conclusion,createdAt,updatedAt,runStartedAt,url,repository,actor,triggeringActor \44 > artifacts/github-actions/run-<run-id>-attempt-<attempt>.json45```4647## Run4849Text report:5051```bash52RUN_GLOB='artifacts/github-actions/*.json' \53bash skills/github-actions-rerun-effectiveness-audit/scripts/rerun-effectiveness-audit.sh54```5556JSON output + fail gate:5758```bash59RUN_GLOB='artifacts/github-actions/*.json' \60OUTPUT_FORMAT=json \61FAIL_ON_CRITICAL=1 \62bash skills/github-actions-rerun-effectiveness-audit/scripts/rerun-effectiveness-audit.sh63```6465Run against bundled fixtures:6667```bash68RUN_GLOB='skills/github-actions-rerun-effectiveness-audit/fixtures/*.json' \69bash skills/github-actions-rerun-effectiveness-audit/scripts/rerun-effectiveness-audit.sh70```7172## Output contract73- Exit `0` in report mode (default)74- Exit `1` when `FAIL_ON_CRITICAL=1` and one or more groups are critical75- Text mode prints summary + ranked workflow groups76- JSON mode prints summary + ranked groups + critical groups