agentleFS
witi-projectswiti-projects/Skills/babysitting-pr/SKILL.md

babysitting-pr

Skill2 starsChanged 7 months agoMITView on GitHub

Monitor a pull request for CI failures, review comments, and merge conflicts — then fix them automatically. Use when a PR is open and you want the agent to keep it merge-ready. Use when the user says "/babysitting-pr", "babysitting pr", or asks about babysitting pr.

  • Commits and pushes

2 other projects use a version of this, 2 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 13 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Use this skill when the user has an open pull request and wants the agent to monitor it, fix CI failures, resolve review comments, and keep …

    line 8
  2. Very specific:

    Lint failures: run the linter locally (npm run lint -- --fix), fix remaining issues manually, commit.

    line 40
  3. Very specific:

    Type errors: run npx tsc --noEmit, read the errors, fix the types, commit.

    line 41
  4. Distinctive:

    Test failures: run the failing test suite locally, read the assertion errors, fix the code or update the test expectations, commit.

    line 42
  5. Very specific:

    Build failures: run npm run build, read the error output, fix imports/configs/missing deps, commit.

    line 43
  6. Distinctive:

    After fixing, push the changes:

    line 45
  7. Distinctive:

    Read the comment and the code it references.

    line 58
  8. Distinctive:

    If the fix is clear (typo, naming, missing null check, style issue), apply it.

    line 59
  9. Distinctive:

    If the comment requires a design decision or clarification, skip it and report to the user.

    line 60
  10. Distinctive:

    Commit fixes for resolved comments:

    line 62
  11. Distinctive:

    If new failures appear, go back to step 3.

    line 87
  12. Distinctive:

    All checks pass, no unresolved comments, no conflicts → PR is merge-ready

    line 104
  13. Distinctive:

    Never force-push to a shared PR branch.

    line 110
  14. Distinctive:

    Don't modify test assertions to make tests pass unless the behavior change was intentional.

    line 111
  15. Distinctive:

    Don't resolve review comments you're unsure about — skip them and let the user know.

    line 112
  16. Distinctive:

    If CI is queued/pending, wait for it to complete before analyzing failures.

    line 113
  17. Very specific:

    Use gh pr ready to mark the PR as ready for review once everything is green.

    line 114

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Babysitting a PR

Use this skill when the user has an open pull request and wants the agent to monitor it, fix CI failures, resolve review comments, and keep it merge-ready.

Steps

  1. Get the PR status — fetch the current state of the PR:

    gh pr view --json number,title,state,mergeable,reviewDecision,statusCheckRollup,comments,reviews

    Also check for merge conflicts:

    gh pr view --json mergeStateStatus
  2. Check CI status — look at the statusCheckRollup field. For each failing check:

    gh pr checks

    This lists all CI checks and their status (pass/fail/pending).

  3. Fix CI failures — for each failing check, get the logs:

    gh run view <run-id> --log-failed

    Analyze the failure and fix it:

    • Lint failures: run the linter locally (npm run lint -- --fix), fix remaining issues manually, commit.
    • Type errors: run npx tsc --noEmit, read the errors, fix the types, commit.
    • Test failures: run the failing test suite locally, read the assertion errors, fix the code or update the test expectations, commit.
    • Build failures: run npm run build, read the error output, fix imports/configs/missing deps, commit.

    After fixing, push the changes:

    git add -A && git commit -m "fix: resolve CI failures" && git push
  4. Handle review comments — fetch PR review comments:

    gh api repos/{owner}/{repo}/pulls/{pr}/comments

    For each unresolved comment:

    • Read the comment and the code it references.
    • If the fix is clear (typo, naming, missing null check, style issue), apply it.
    • If the comment requires a design decision or clarification, skip it and report to the user.

    Commit fixes for resolved comments:

    git add -A && git commit -m "fix: address review feedback" && git push
  5. Resolve merge conflicts — if the PR has conflicts:

    git fetch origin main
    git merge origin/main

    Resolve conflicts by reading both sides and choosing the correct resolution. For ambiguous conflicts, ask the user. After resolving:

    git add -A && git commit -m "fix: resolve merge conflicts" && git push
  6. Re-check status — after pushing fixes, wait for CI to run and check again:

    gh pr checks --watch

    If new failures appear, go back to step 3. Limit to 3 rounds to avoid infinite loops.

  7. Report — summarize what was done:
    • Which CI checks were failing and how they were fixed
    • Which review comments were addressed
    • Whether merge conflicts were resolved
    • Current PR status (ready to merge, or what's still blocking)

Loop Behavior

This skill is designed to run in a loop:

Check PR → Find issues → Fix issues → Push → Re-check → Repeat

Stop when:

  • All checks pass, no unresolved comments, no conflicts → PR is merge-ready
  • 3 fix-push-check cycles have been attempted without full resolution → report what's still failing
  • A fix requires a design decision → ask the user

Notes

  • Never force-push to a shared PR branch.
  • Don't modify test assertions to make tests pass unless the behavior change was intentional.
  • Don't resolve review comments you're unsure about — skip them and let the user know.
  • If CI is queued/pending, wait for it to complete before analyzing failures.
  • Use gh pr ready to mark the PR as ready for review once everything is green.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.