/github-actions-plugin:ai-review-max-turnsfrom github-actions-plugin
Triages red Claude-powered CI review checks by distinguishing real unpublished findings from budget exhaustion, turn-ceiling overruns, and infra reruns using subtype + is_error signals.
Ships in github-actions-plugin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A growing class of CI checks are Claude-powered reviewers — a workflow
that runs the Claude Code action over the PR diff and reports findings as a
pass/fail check. They are usually a family of reusable-quality-*,
reusable-security-*, and reusable-a11y-* workflows, surfaced on the PR as
checks named typescript / analyze, secrets / scan, owasp / scan,
aria / analyze, wcag / analyze, and the like.
| Use this skill when... | Use something else when... |
|---|---|
The red check is Claude-powered (owasp / scan, secrets / scan, aria/wcag, …) | A deterministic check failed and you need its error → github-actions-inspection |
| Deciding whether that red is a finding or noise | The failure is real and needs a code fix pushed → git-plugin:git-fix-pr |
| The AI review stays green but re-runs on every push — see REFERENCE.md |
They go red for five reasons that demand opposite responses. Reading one as another is the whole hazard:
| Cause | Tell | Response |
|---|---|---|
| Budget exhaustion — the run died mid-flight | error_max_turns in the log; is_error: true | Ignore the failure; it says nothing about the code |
| Turn-ceiling overrun — the run finished, the wrapper failed the job | is_error: false, subtype: "success", no Found N line, and ##[error]Claude reported a successful result after N turns, exceeding the configured maximum of M | Ignore the failure; the scan completed and found nothing |
| A real finding it could not publish | is_error: false, subtype: "success", a ::error::Found N … line, and no PR comment | Investigate the code by hand — the check found something |
| Result flagged errored despite completing | subtype: "success" and is_error: true, low num_turns, 0 denials, no Found N line, no result string | Rerun the identical commit once; a pass means it was infra |
| Bot-actor refusal — the action refused to start Claude | No execution file, no is_error, no num_turns; the log says non-human actor: <name> (type: Bot); when a workflow pushed with github.token, also run_attempt ≥ 2 with actor ≠ triggering_actor | Ignore the failure; fix the workflow with allowed_bots, or push with a PAT or App token |
The law: the red X is never the discriminator, and neither is
is_erroron its own. Rule out Cause 5 first: a refused run has nothing to read. Then readsubtypeandis_errortogether.error_max_turnsmeans the run died mid-flight.subtype: "success"means it finished, and a finished run can still reportis_error: true(Cause 4), sois_erroralone does not separate a run that died from one that finished. Among finished runs readingis_error: false, the finding count decides: aFound Nline means the check is trying to tell you something through a blocked channel; its absence alongside a turn-count error means the wrapper failed a scan that had nothing to say.
Read subtype and is_error, then the finding count, before forming any
theory. Stopping at is_error sends a turn-ceiling overrun to the hand-audit
response, and files Cause 4 under budget exhaustion, whose upstream fix (raise
max_turns) cannot help a five-turn run.
url=$(gh pr checks <pr> -R <owner>/<repo> --json name,link \
--jq '.[]|select(.name=="<check>")|.link')
runid=$(echo "$url" | sed -E 's#.*/runs/([0-9]+)/.*#\1#')
gh run view "$runid" --log-failed 2>&1 | grep -iE '"is_error"|"subtype"|error_max_turns|num_turns|non-human actor'
Cause 1 (budget exhaustion) — when the log shows error_max_turns, open references/budget-exhaustion.md for the rotating-failure tell, why not to blind-rerun, the mergeStateStatus check, and the upstream fix.
Cause 2 (turn-ceiling overrun) — when a subtype: "success" run logs exceeding the configured maximum, open references/turn-ceiling-overrun.md for the grep, the evidence, where the turns went (including a base-branch restore that parks a PR's .claude/ edits in .claude-pr/), and the upstream fix.
Cause 4 (errored despite completing) — when subtype: "success" and is_error: true appear together, open references/errored-despite-completing.md for the full signature, the grep, and the rerun-once rule.
Cause 5 (bot-actor refusal) — when the step fails with no execution file and the log says non-human actor, open references/bot-actor-refusal.md for the approval-hold mechanism, the allowed_bots fix, and a scan counting them across a repo's failed runs.
These workflows are told Leave a PR comment with findings but are granted no
comment tool, so every attempt is denied and the prose is discarded — while
fail-on-critical still fails the build off the count in structured_output.
The result is a gate that blocks a merge on a finding nobody can read.
gh run view --job <job-id> --log | grep -E '"is_error"|"subtype"|permission_denials_count|critical security'
gh pr view <n> --json comments --jq '.comments | length' # 0 = it could not publish
gh api repos/<o>/<r>/check-runs/<job-id> --jq .output # all null = nothing to read
permission_denials_count in double digits is the signature: the model retries
the blocked call, which also burns budget.
Do not treat an unreadable finding as a false positive. Read the analyzed files yourself against the check's own category list. The finding is often in pre-existing code the scan read alongside the diff — but not always.
A worked case where the finding was real is in references/unpublished-finding.md.
The count is not stable. Same commit, different answer. Never treat a delta between runs as evidence a fix worked.
Before using a sibling PR as a "it's green there" control, check the
duration. These workflows carry file-patterns filters, so a PR touching
no matching files completes in 4–6 seconds having analyzed nothing — and
reports pass.
gh pr checks <n> | grep -E "owasp|code-smell" # 4s pass = skipped, not clean
gh run list --workflow security.yml --branch main -L 5 # empty = PR-triggered only, no main baseline
A green tick from a skipped run is not a control. This is
never-fabricate-test-identifiers.md's known-good control applied to CI: if
the "passing" comparison never executed, you have no baseline, and
pr-merge-hazards.md's merge-over-red test ("same check already fails on
main") cannot be satisfied.
The control above presumes some earlier run exists. A newly added workflow may have none, and its only run can be the failing one:
gh run list --workflow <file>.yml -L 12 # only the failing run, or nothing
When the workflow has ≤1 historical run, state it in the triage: no baseline exists,
so "is this normal for this check?" cannot be answered from history. An empty
gh run list reads as nothing to see; it means there is nothing to compare
against. Rerunning the identical commit then becomes the primary discriminator
rather than a follow-up (a deterministic failure repeats, a flake does not),
alongside reading the changed files against the check's own criteria.
Evidence (thelma#1524) is in references/errored-despite-completing.md.
A red check on valid code is worse than no check: it reads as a real finding,
so it pulls a reviewer into chasing a non-existent defect and erodes trust in
the AI-review signal. But the inverse error is worse still — treating every
AI-review red as flakiness waves through the findings that are real and merely
unpublishable. Ruling out the bot-actor refusal, then reading subtype,
is_error and the finding count together, separates all five. Same instinct as
github-actions-plugin:multirepo-ci-cd: diagnose against what CI actually
did (read the run), not against the surface red.
synchronize-triggered review loop with no round counter, why draft does not stop it, the kill switches and their blast radius, and where the per-run cost actually lives.claude/rules/pr-merge-hazards.md §4 — UNSTABLE vs BLOCKED, and the two
checks required before merging over redlaurigates/.claude/rules/ci-cd-workflows.md — the three green-but-inert
modes of these same workflows (empty secret, workflow anti-tampering, skipped
by filter); this skill covers the red modes~/.claude/rules/diagnose-at-the-failure-point.md — measure at the failure
point rather than accepting the framing the error hands yougithub-actions-plugin:multirepo-ci-cd — portfolio-wide CI diagnosis disciplineREFERENCE.md (opens in a new tab)references/bot-actor-refusal.md (opens in a new tab)references/budget-exhaustion.md (opens in a new tab)references/errored-despite-completing.md (opens in a new tab)references/turn-ceiling-overrun.md (opens in a new tab)references/unpublished-finding.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub laurigates/claude-plugins --plugin github-actions-plugin11 skills in this plugin
/actions-billing-usageMeasure GitHub Actions cost with the billing-usage API — per repo, month and SKU; net vs gross; per-job rounding; budgets and their hard stop. Use when optimizing CI cost or speed, before removing a workflow as expensive, or when jobs fail with zero steps because a budget ran out./claude-code-github-workflowsClaude Code GitHub Actions workflow patterns — PR reviews, issue triage, CI/CD integration. Use when creating or modifying workflows that integrate Claude Code./gh-workflow-monitoring`gh run watch` — block until a GitHub Actions run finishes, no polling loop. Use when waiting for CI after a push or following a triggered workflow to completion./github-actions-auth-securityGitHub Actions auth and security for Claude Code — OIDC, AWS Bedrock, Vertex AI, secrets, permission scoping. Use when setting up workflow authentication or security./github-actions-inspectionFailing step, stack trace, and test output from a completed GitHub Actions run; rerun failed jobs. Use when a CI check finished red and you need the error extracted from its log./github-actions-mcp-configMCP server config for GitHub Actions — tool permissions, env vars, multi-server setups. Use when configuring MCP servers in GitHub Actions workflows.Other plugins' skills for the same job