skills/babysit-pr/SKILL.md
Autonomous PR monitor — polls every 2 minutes for merge conflicts, CI/CD failures across GitHub Actions, Buildkite, Vercel, and Fly.io, review comments, and merge readiness. Auto-detects PR from current branch, fixes what it can, notifies on state changes. No setup questions. Use when asked to babysit a PR, watch a PR, monitor CI, keep a PR green, handle merge conflicts, or poll PR status
npx skillsauth add mblode/agent-skills babysit-prInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Autonomous PR monitor. Detects the PR from your current branch and starts polling every 2 minutes. No setup questions — auto-detects everything and applies sensible defaults.
| File | Read When |
| --------------------------------- | ---------------------------------------------------------------------------------------------------- |
| references/github-api.md | Default: GraphQL queries for fetching, replying, and resolving threads |
| references/bot-patterns.md | Comment triage: bot detection, severity parsing, deduplication, false positive rules |
| references/fix-plan-template.md | Comment triage: generating the fix plan document |
| references/monitoring-setup.md | Default: CronCreate configuration, state file, defaults |
| references/ci-platforms.md | CI/CD check: gh for GitHub, Buildkite auth fallback chain, vercel/flyctl for platform logs |
| references/merge-conflicts.md | Conflict check: detecting and resolving merge conflicts |
Copy this checklist to track progress:
PR babysit progress:
- [ ] Phase 1: Initialize — auto-detect PR, snapshot state, start cron
- [ ] Phase 2: Conflict check — detect and resolve merge conflicts
- [ ] Phase 3: CI/CD check — poll checks, diagnose failures, fix and push
- [ ] Phase 4: Comment check — detect new comments, triage autonomously
- [ ] Phase 5: Readiness check — evaluate merge readiness, notify user
Load references/monitoring-setup.md for CronCreate configuration and defaults.
gh pr view --json number,url,title,headRefName,baseRefName,mergeable,mergeStateStatus,reviewDecision from the current branch. If no PR found, tell the user and stop. If a PR number was passed as an argument, use it directlygh repo view --json owner,name.claude/scratchpad/babysit-pr-{N}.md: current HEAD SHA, mergeable status, check statuses, unresolved thread count, review decisiongh pr checks to identify active platforms (GitHub Actions, Buildkite, Vercel, Fly.io)*/2 * * * * schedule running phases 2-5. Print a single confirmation:Monitoring PR #{N}: {title}
Polling every 2 minutes | Auto-resolve noise: yes | Auto-merge: no
Detected CI: {platforms}
Current state: {mergeable} | {reviewDecision} | {check_summary}
Load references/merge-conflicts.md for resolution strategy.
gh pr view --json mergeable,mergeStateStatus
MERGEABLE → skip to Phase 3CONFLICTING → proceed to resolveUNKNOWN → wait, recheck next cyclegit fetch origin {base_branch} && git rebase origin/{base_branch}
git push --force-with-lease → notify usergit rebase --abort → notify user with detailsNever force-push without --force-with-lease. If the lease fails, someone else pushed — abort and notify.
Load references/ci-platforms.md for platform-specific commands and the Buildkite auth fallback chain.
gh pr checks --json name,state,conclusion,detailsUrlgh run view --log-failed (GitHub Actions), Buildkite auth fallback chain (Buildkite), vercel logs (Vercel), flyctl logs (Fly.io)gh pr view --jsonmergeable == MERGEABLE (no conflicts)reviewDecision == APPROVEDWhen Phase 4 detects new comments, run this inline — no separate invocation needed.
Load references/github-api.md for query templates and references/bot-patterns.md for detection rules.
reviewThreads query with pagination. Filter to isResolved == falseFor each item:
CHANGES_REQUESTED, Minor for APPROVED + questionHuman comments are never auto-ignored. Always classify as fix unless clearly already resolved or explicitly marked optional by the reviewer.
.claude/scratchpad/pr-{N}-review-plan.md as audit trailOn stop, report a final summary: total polls, fixes applied, conflicts resolved, current state.
--force-with-lease — risks overwriting teammate commitsgithub-actions[bot] as always noise — it is a shared identity used by DangerJS, schema checkers, and other active tools. Classify by contentbk CLI without checking auth first — test with bk auth status and fall back to REST API or gh pr checksreview-pr for local self-review before pushing fixesdevelopment
Fans out four concurrent review agents over the current diff, then APPLIES fixes directly to the working tree and verifies the build. Mutates code; it does not produce a report. Covers reuse (duplicate logic, hand-rolled stdlib, reinvented platform features), quality (hacky patterns, React/TypeScript hygiene, over-memoisation, exhaustive-deps, `any`, dead code, `CLAUDE.md`/`AGENTS.md` violations), efficiency (unnecessary work, missed concurrency, hot-path bloat), and test discipline (bug fixes without a repro test, useless tests to delete, missing tests only when they prevent a named failure). Use when the user says "tidy this up", "simplify", "clean up this diff", "polish my changes", "check for duplication", or "any reuse opportunities?", i.e. when the intent is to have the changes made automatically. For a read-only report that lists findings without touching files, use `pr-reviewer` instead. This skill edits code; for the PR's title, description, or commit history, use `pr-creator`.
development
Decides what an interface should do before UI is built or audited: interaction choice, action scope and consequence, reachable states, resilience, and accessibility as task completion. Works from a brief, spec, mockup, intent, or existing UI. Use when asked "is this the right interaction", "design the flow", "what control should this use", "what should this action affect", "which states should this have", "make this resilient", or "what breaks here". For building or styling use ui-design; for built-code audits use ui-audit; for copy wording use copywriting.
development
Builds and stress-tests implementation plans in two modes. Create mode scans code and docs, asks one question at a time with a recommended answer, runs a blindspot pass when the user is new to the area, then writes a plan file. Review mode scores completeness, feasibility, scope, testability, risk, and assumptions, verifies checkable claims, and writes resolutions back until every dimension reaches 5/5. Use when asked to "create a plan", "plan this feature", "I want to build X", "grill me", "think this through", "blindspot pass", "unknown unknowns", "this is new to me", "review my plan", "rubber duck this", "stress test this plan", "is this plan ready", "get this plan to 5/5", "what am I missing", "verify this claim", "prove this plan", "fact-check this plan", or when the user explicitly wants a plan artifact before implementation. For code review use pr-reviewer; for architecture briefs use define-architecture.
tools
Audits the smallest relevant developer-facing surface of a library, CLI, SDK, or npm package across API contracts, errors, CLI behavior, public types, onboarding, and config. Uses candidate-first rule loading, bounded local evidence, and compact root-cause findings. Use when asked to "audit my CLI", "make this CLI agent-friendly", "is this API ergonomic", "review the developer experience", "improve these errors", "simplify first run", or "review my SDK". For end-user UI use ui-audit, for agentic-app trust use ax-audit, for docs prose use docs-writing, for README work use readme-creator, and for repo architecture use define-architecture. Inside a product that also ships a UI, this is the skill for the developer-facing half, so pick it when the complaint is about an import, command, error string, exported type, or config rather than a screen.