From pull-request
Monitors PR CI at intervals, auto-fixes trivial lint/types/formatting failures and simple merge conflicts, self-cancels when green. Use post-push for hands-off CI babysitting on GitHub/GitLab.
npx claudepluginhub bendrucker/claude --plugin pull-requestThis skill is limited to using the following tools:
Set up recurring CI monitoring that fixes trivial failures and cancels when green.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Set up recurring CI monitoring that fixes trivial failures and cancels when green.
git branch --show-currentgit remote get-url origingit rev-parse HEAD${CLAUDE_SKILL_DIR}/scripts/state.ts${CLAUDE_SESSION_ID}Query recent CI run durations, add 30s buffer, clamp to 1-10m (default 3m). Check current CI status. If already green, report and stop.
Use CronCreate with a self-contained prompt that handles each iteration:
Run state script to track iteration (bun <state-script> <session-id>).
Check for merge conflicts: gh pr view <number> --json mergeable,mergeStateStatus. If mergeable is CONFLICTING, identify conflicting files by running git merge origin/main --no-commit --no-ff, then git diff --name-only --diff-filter=U. Abort the merge afterward with git merge --abort.
bun.lock) or generated files. For lockfiles, delete and regenerate per project convention (e.g., rm bun.lock && bun install). Also trivial: conflicts in files the PR modified where the resolution is obvious (both sides added adjacent lines).After resolving, commit the merge and push. The next iteration will pick up the new SHA.
Query the PR's source branch SHA and CI status. Use /github:actions-monitor or /gitlab:ci-monitor as appropriate for the remote. Compare the PR's source branch SHA (not the pipeline/run SHA) against git rev-parse HEAD. Pipelines may run on synthetic merge commits whose SHAs never match the branch HEAD.
If the source branch SHA does not match git rev-parse HEAD, a fix was recently pushed and CI has not started or completed for the new commit yet. Treat this as "waiting" and do nothing.
CronDelete, clean state (bun <state-script> <session-id> clean), summarize commits since start SHA.
Do nothing.
Before diagnosing, check whether a fix was already pushed by comparing the PR's source branch SHA to git rev-parse HEAD. If HEAD is newer, skip diagnosis and wait for the new run.
Otherwise, diagnose with /github:actions-monitor or /gitlab:ci-monitor. Check whether the start SHA's CI run had the same failure. If so, this is a pre-existing issue, not a regression introduced by this branch's changes. Report it and cancel rather than attempting a fix.
If the failure is new, attempt a fix if trivial. Before pushing, reproduce the failing CI step locally to verify the fix works. Then commit and push.
After pushing, note the new HEAD SHA. On the next iteration, skip diagnosis until a run matching the new SHA completes.
After 20 iterations: CronDelete, report, clean state.
Resolve all ${} placeholders to absolute values in the prompt. Avoid xargs, $(), and pipes.
Lint errors, type errors, formatting, missing imports, simple test updates, merge conflicts in lockfiles or generated files.
Reproduce locally, fix, verify, commit with a descriptive message, and push.
Logic bugs, design issues, flaky tests, environment-dependent failures.
Cancel the cron job and report the failure details to the user.