/prbuddy:cifrom prbuddy
Monitors CI/workflow status for a PR, diagnoses failures, fixes the root cause, and adds systematic prevention. Use when CI checks are failing, builds are broken, tests are failing, or the user says "CI failing", "workflow failed", "checks red", or "rerun workflows".
Ships in prbuddy. 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.
None: SKILL.md is the whole skill.
Monitors CI/workflow status, diagnoses failures, fixes issues, and implements systematic prevention.
Check CI at these moments (not continuously):
gh pr checks --json name,state,bucket,link,workflow
Status interpretation:
bucket: "pass" → Check passedbucket: "fail" → Check failedbucket: "pending" → Still runningbucket: "skipping" → Skippedbucket: "cancel" → CancelledIf all passing:
✓ All CI checks passing (N/N)
Ready for next step.
If pending:
CI checks in progress (N/M complete)
✓ lint (passed)
✓ typecheck (passed)
⏳ test (running)
⏳ build (queued)
Check again:
- Before requesting review
- Before declaring done
If failed: Continue to diagnosis
# Get branch name (with fallback for detached HEAD)
BRANCH=$(git branch --show-current)
if [ -z "$BRANCH" ]; then
BRANCH=$(gh pr view --json headRefName -q .headRefName)
fi
gh run list --branch "$BRANCH" --json databaseId,name,status,conclusion --limit 10
Filter for conclusion: "failure".
For each failed run:
gh run view <run-id> --log-failed
This fetches only the logs for failed steps.
Analyze the logs to identify:
Before fixing, determine if this is a flaky test or real failure:
Signs of flaky test (consider rerun):
Signs of real failure (fix required):
If flaky: Try gh run rerun <id> --failed first. If it fails again, investigate further.
For complex failures, use PAL for expert opinion:
mcp__pal__chat: "CI failure diagnosis:
Error: [error message]
Context: [relevant code/config]
What's the root cause and recommended fix?"
If mcp__pal__chat is unavailable: Diagnose directly from the logs — re-read the full failed step output, search the codebase for the failing symbol or path, and apply standard root-cause analysis (is it an env issue, a dependency change, a logic error?). Proceed to Step 7 without PAL consultation.
Make the code changes to fix the immediate failure.
Ask: "What would have caught this earlier?"
See CLAUDE.md for the prevention hierarchy.
git add [changed files]
git commit -m "fix: [description]
- Fixed: [acute issue]
- Prevention: [systematic change]"
git push
Report:
Pushed fix. CI will re-run automatically.
Check status: /prbuddy:ci
Or watch in browser: gh pr checks --web
Checking CI status for PR #42...
❌ 1 of 4 checks failed
Failed: test (run 987654321)
Fetching logs...
Error in tests/auth.test.ts:
TypeError: Cannot read property 'email' of undefined
at validateUser (src/auth.ts:45)
Root cause: Missing null check when user object is undefined.
Fixing:
1. Added null check in src/auth.ts:45
2. Added test case for undefined user
3. Prevention: Enabled strictNullChecks in tsconfig.json
Committing...
Pushing...
✓ Fix pushed. Monitor with: /prbuddy:ci
| Task | Command |
|---|---|
| Check status | gh pr checks --json name,state,bucket |
| List runs | gh run list --branch <branch> --json databaseId,name,conclusion |
| View run | gh run view <id> |
| Failed logs | gh run view <id> --log-failed |
| Full logs | gh run view <id> --log |
| Watch run | gh run watch <id> |
| Rerun failed | gh run rerun <id> --failed |
| Rerun all | gh run rerun <id> |
What SKILL.md sets; muted values are Claude Code's defaults
prbuddy@2389-research is listed by 2389-research/claude-plugins — review the source before installing
npx claudepluginhub 2389-research/claude-plugins --plugin prbuddy3 skills in this plugin
/prbuddyMonitors PR health by checking CI status and triaging review comments, then fixes issues and implements systematic prevention. Use when CI checks are failing, review comments are unresolved, or the user says "check my PR", "make PR green", "fix PR", "ready to merge", or "handle PR feedback"./reviewsprbuddy:reviewsTriages PR review comments by fixing critical ones (with systematic prevention) and converting nitpicks to tracked GitHub issues. Use when a PR has unresolved review comments, changes have been requested, or the user says "address feedback", "reviewer asked", "changes requested", or "triage reviews".