/ccxp-skills:rca <run-url or run-id> [workflow-name] [--repo owner/repo] [--no-post]from ccxp-skills
Use when you have a failed GitHub Actions run URL or run ID to diagnose, classify, and track root cause directly (not from a Slack notification — that's /labrun-rca)
Ships in ccxp-skills. 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; scripts run unread.
Perform root cause analysis on a failed GitHub Actions pipeline run.
<skills-root>= this skill's "Base directory" minus its last component; substitute the literal path (skill-conventions§9).
$ARGUMENTS is a run URL or run ID:
/rca https://github.com/your-org/build-pipeline-repo/actions/runs/12345/rca 12345/rca — auto-pick the most recent failed run on main--repo owner/repo (any position) — the repo that owns the run; default: the working repo (gh repo view). A run URL carries its repo; an explicit --repo wins. Every gh call below then uses --repo <owner/repo> and ci-triage.sh <run-id> --repo <owner/repo> reads that repo's run; tasks still land in the working repo's dev/TODO/. /labrun-rca passes the repo derived from the alert's run URL.--no-post (any position) — skip step 5.5's Slack post. A caller that owns the Slack reply (/labrun-rca posts into the alert's thread) passes it so the report is not also posted to the channel root.# Get run details
bash <skills-root>/_gh/gh.sh run view <run-id> [--repo <owner/repo>] --json name,status,conclusion,headBranch,jobs \
--jq '{name: .name, branch: .headBranch, conclusion: .conclusion, jobs: [.jobs[] | {name: .name, conclusion: .conclusion}]}'
main, note it — main failures are higher priorityFor each failed job:
# Failed job/step names + a bounded error-context window in one shot
bash <skills-root>/_gh/ci-triage.sh <run-id> [--repo <owner/repo>]
Dig deeper — don't stop at the first error. Look for:
Check the local KB first. If dev/known-failures.md exists at the current repo's root, grep it for a match on the error signature from step 2. A match gives you a candidate root cause and a verify command — but re-run that verify command now. A KB hit is a lead, not an answer: the same signature can have a different cause than last time it was seen (a 403 that used to mean a credential scope gap can just as easily mean a storage quota — that drift, discovered only on the 7th reproduction, is why this file exists).
| Category | Examples | Action |
|---|---|---|
| Our code | Script bug, missing patch, wrong SHA | Create task, fix ASAP |
| Infrastructure | Runner OOM, disk full, network timeout | Note it, may retry |
| Upstream | New upstream code breaks build | Create task, investigate |
| Transient | Git fetch timeout, rate limit, flaky test | Retry, monitor frequency |
| Configuration | Missing secret, wrong env var | Fix configuration |
Evidence required — no guessing. Every classification must be backed by one of:
If neither is available — you have a hypothesis ("probably a network glitch") but no way to prove it from what's on hand — do not report it as classified. Mark it Unconfirmed (see report template, step 5) and, in step 6, file a task whose action item is adding the logging/instrumentation that would make the next occurrence provable instead of guessed. Never write "probably X" into a report as if it were a finding.
Only when step 3 matched a KB entry, Confirmed (else step 6). Determination only — /top runs in step 6:
task: on the entry → step 6 as normal.dev/TODO/ → open. Note "T: re-top" as the Action item.dev/JOURNAL//migrated) → step 6 as normal; note the recurrence.Is main broken? (blocks all builds)
Is it a release blocker? (blocks specific version)
Is it a nightly-only issue? (lower priority)
Has it happened before? Check recent runs:
bash <skills-root>/_gh/gh.sh run list --workflow <workflow> --branch main --limit 5 \
--json databaseId,conclusion --jq '.[] | "\(.databaseId) \(.conclusion)"'
Output a structured report:
## RCA: <workflow name> run <run-id>
**Branch**: main / <branch>
**Failed job**: <job name>
**Failed step**: <step name>
### Error
<exact error message from logs>
### Root cause
<1-2 sentence explanation with evidence>
### Classification
<Our code | Infrastructure | Upstream | Transient | Configuration> — <Confirmed | Unconfirmed>
### Verification
<one of: the command you ran just now and what it showed; "Confirmed via cited log line — see Root cause, no command needed"; or, if Unconfirmed, "No verification path available; instrumentation task filed (see Action)">
### Impact
<What's blocked>
### Action
- [ ] <specific action item — or, per 3.5, "T<id>: re-top">
Skip this whole step when --no-post was passed (the caller posts the report itself, in a thread). Otherwise, immediately post the report to Slack via slack_send_message — don't ask "want me to post this?" first; that just adds friction and stalls the loop. The RCA is meant to feed back to the team, so posting is the default, not an opt-in. Post to #claude-notification (or whatever the repo's configured standup/alert channel is — see SLACK_STANDUP_CHANNEL) if a more specific build-alerts channel isn't reachable.
Plain text, not a markdown table — even though the report template in step 5 above reads naturally as a set of labeled fields, render it as bold key-value lines / bullets, not a table, when posting to Slack. Slack does not render markdown tables; a table posted there shows up as a garbled pipe-delimited mess instead of the structured report it's meant to be.
Get the plan first (print-only; you still classify and judge Confirmed vs Unconfirmed):
bash <skills-root>/rca/scripts/action-plan.sh --class <our-code|upstream|configuration|transient|infrastructure> \
--confidence <confirmed|unconfirmed> [--kb-task-open [T<id>]] [--recent <n>] [--retry-result pass|fail|pending]
--recent (transient; optional with --kb-task-open) = occurrences in the last 7 days; --retry-result is infrastructure only. One action per line, in order: RETRY, TOP, TASK kind=fix|instrument, PROMOTE, NOTE; the IF_RETRY_FAILS prefix = only after the retry failed. Exit 2 = bad inputs: fix them, never guess a plan.
If 3.5 flagged an open task: invoke /top <id> here instead of any task-creation gate below (Infrastructure's retry still always runs; Transient's 3+ check no longer applies).
If classification is Unconfirmed (step 3): always create a task, regardless of category — this is additive to that category's own action below, not a replacement for it (e.g. an Unconfirmed Infrastructure failure still gets retried first per that path; the instrumentation task is filed either way, retry outcome aside). The task's action item is adding the instrumentation/logging needed to make the next occurrence provable — not "fix the bug," since the bug isn't diagnosed yet. Apply the same /top promote + scheduled: stamp as below.
If classification is Our code, Upstream, or Configuration:
Generate task ID with the shared helper (no inlined generator — same one every skill uses):
bash <skills-root>/_taskid/new.sh --check ./dev
Create dev/TODO/<id>-<slug>.md with the RCA findings
Promote the new task to the front of the queue (red-pipeline rule): /top <id> (or /stage when it must sit behind a blocker). Mid-week additions no longer edit the IPM file; dev/TODO/queue.md is the single priority order.
Stamp scheduled: on the new task file so its iteration mapping matches the current iteration (without this it's mapped to no board iteration). The shared helper resolves the Monday token-free (committed IPM → Project API → next Monday) and writes it update-forward-only:
bash <skills-root>/_ipm/stamp-scheduled.sh dev/TODO/<id>-<slug>.md current
Report the task ID, the scheduled: date the stamper printed, and that it was promoted to the front of queue.md.
If classification is Transient:
/top promote + scheduled: stamp (steps 3–4 above)If classification is Infrastructure:
bash <skills-root>/_gh/gh.sh run rerun <run-id> --failed/top promote + scheduled: stamp (steps 3–4 above)If the classification is Confirmed (step 3 verified it with a concrete command, not a guess):
dev/known-failures.md (create it, with a short header, if it doesn't exist — repo-local, not part of this skill). Record: the grep-able signature, root cause, verify command that confirmed it, false positives ruled out, the run URL, task: (step 6's ID, if filed), and today as "last confirmed."403's cause drifting across reproductions): correct that entry in place — don't add a duplicate. Bump "last confirmed" and note the correction.task: too — write it if step 6 just filed the entry's first task (e.g. Transient at 3 occurrences), update it if the old task closed and a replacement was filed, else leave it (step 6 ran /top).Skip this step entirely if the classification is Unconfirmed — there's nothing confirmed yet to record.
dev/known-failures.md is repo-local, not part of this skill. This skill's classification/verification discipline is generic; domain-specific failure signatures (e.g. what a given CI's 403s tend to mean) are knowledge that belongs to the repo whose pipeline produces them, built up incrementally via step 7. A repo without one yet just skips the KB-lookup in step 3.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub synx-data-labs/ccxp-skills --plugin ccxp-skills57 skills in this plugin
/1password-env-setupUse when the user explicitly asks to bootstrap or refresh a repo's 1Password-backed .env — installs the refresh-env helper, generates a hash-checking .envrc, and materializes .env from .env.tpl via op inject/address-prUse when the user explicitly asks to address, verify, or merge a specific open PR (CI, Claude Code review, test plan, tiered merge)/agent-pairingUse when the user explicitly asks to toggle the ccxp-agent main-session agent on/off for this Claude Code profile or check its status/agents-sdkBuild AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, chat applications, voice agents, or browser automation. Covers Agent class, state management, callable RPC, Workflows, durable execution, queues, retries, observability, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge./autopilotUse when the user explicitly asks to turn the unattended background /drive loop on or off, pause or resume it, or check its status — "/autopilot on", "/autopilot off", "/autopilot pause", "/autopilot resume", "/autopilot status", "/autopilot config"/bottomUse when the user explicitly asks to move a task (or several) to the back of the dev/TODO priority queue