handle-ci-failurelisted
Install: claude install-skill richardkmichael/claude-rodin
# Handle CI failure
## Project CI context
```!
cat .github/HANDLE_CI_FAILURE.md 2>/dev/null || echo "No .github/HANDLE_CI_FAILURE.md found. Derive the branch from \`git branch --show-current\`; find the check command from the Makefile, CI workflow, or package scripts (or ask the user); push without force unless you confirm the branch is rebased on a cycle. There are no project-specific failure patterns to consult."
```
The context file is the project's contract with this skill. It declares the working branch, the
check command, the push policy, the commands behind any auto-fixable failures (formatter,
regenerate, dependency tidy), and any project-specific failure patterns. Read it before matching.
## Inputs
The user may provide:
- A bare run ID (`24375242526`).
- A `View results:` URL from a GitHub notification email — extract the numeric run ID with
`grep -oE 'actions/runs/[0-9]+' <<<"$input" | cut -d/ -f3`.
- Nothing — list recent failures on the working branch and ask.
## Workflow
### 1. Resolve the run ID
If the user gave one, use it. Otherwise:
```bash
gh run list --branch <branch> --status=failure --limit 5
```
Show the list with run IDs and ages, and ask which one to handle. Don't silently pick "most
recent" — it drifts between sessions.
### 2. Extract failure context
```bash
"$CLAUDE_SKILL_DIR"/scripts/ci-failure-context.sh <run-id>
```
Output JSON shape:
```json
{
"run_id": "...", "run_url": "...", "workflow": "...",
"branch": "...", "head_sha":