agentleFS
sabirmgdsabirmgd/terminal-first-goal-loop/skills/babysit-prs/SKILL.md

babysit-prs

Skill2 starsChanged 2 months agoMITView on GitHub

Run one quiet PR or MR babysitting tick that checks the real branch state, reviews only the new delta, and reports only meaningful changes. Use when a branch needs light monitoring for commits, comments, CI, mergeability, approvals, or human action without constant manual polling.

11 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 9 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If any write permission is not explicitly granted, treat it as no.

    line 36
  2. Distinctive:

    commit count or commit ids since last tick

    line 56
  3. Distinctive:

    Use stable ids when the platform provides them.

    line 63
  4. Distinctive:

    When there is a new head commit:

    line 67
  5. Distinctive:

    If the previous head is unknown, fall back to the current branch diff against the base branch and record that this was a baseline tick.

    line 72
  6. Distinctive:

    If a human comment claims something was fixed, verify it in code before reporting it as resolved.

    line 74
  7. Distinctive:

    Only advance the cursor after the tick is understood.

    line 90
  8. Distinctive:

    If nothing meaningful changed, stay quiet.

    line 95
  9. Distinctive:

    Do not send "still watching" messages with no new proof.

    line 103
  10. Distinctive:

    If the loop reaches a point where a write would be useful but not authorized, report that and stop.

    line 134
  11. Very specific:

    Stop and report blocked when:

    line 142

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “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

Babysit PRs

This skill runs one tick, then stops. It is meant to be called again by /loop, /schedule, cron, launchd, systemd, or another scheduler.

Why This Exists

A branch can change while nobody is looking:

  • new commits arrive
  • CI flips red or green
  • a reviewer leaves a comment
  • mergeability changes
  • the branch becomes ready for a human decision

The goal is to notice those changes without staring at the PR page and without spamming the same update every few minutes.

Inputs

The caller should provide or discover:

  • PR or MR URL, or enough repo and branch context to find it
  • local repo or worktree path if code inspection is needed
  • cursor store path
  • report route
  • whether posting comments is allowed
  • whether approval is allowed
  • whether merge is allowed

If any write permission is not explicitly granted, treat it as no.

One Tick

Each run should:

  1. Load the saved cursor. If none exists, start with an empty baseline.
  2. Fetch the current PR or MR state from the source of truth.
  3. Compare it with the last cursor.
  4. Inspect the actual code delta for new commits before trusting any reply or comment summary. Code wins over narration.
  5. Report only meaningful changes.
  6. Save the new cursor.
  7. Exit.

What To Watch

Track at least these fields:

  • head commit SHA
  • commit count or commit ids since last tick
  • review comments and issue comments
  • review decisions or approvals
  • CI and required checks
  • mergeability or conflict state
  • open or closed or merged state

Use stable ids when the platform provides them. Do not key off free text alone.

Delta-Only Review Rule

When there is a new head commit:

  1. Compare the previous head SHA to the current head SHA.
  2. Review only the new diff between those two points, not the whole branch from scratch.
  3. If the previous head is unknown, fall back to the current branch diff against the base branch and record that this was a baseline tick.
  4. If a human comment claims something was fixed, verify it in code before reporting it as resolved.

This keeps the loop cheap and stops it from rediscovering the same findings.

Idempotency And Cursor

The cursor should remember enough to avoid duplicate updates, for example:

  • last seen head SHA
  • last seen comment ids
  • last seen review ids
  • last seen CI conclusion per check
  • last seen mergeability state
  • consecutive transient failure count

Only advance the cursor after the tick is understood. If the run half-fails, do not move the pointer and pretend the event was handled.

Quiet Path

If nothing meaningful changed, stay quiet.

Acceptable quiet output:

BABYSIT PRS | state=quiet | target=<pr-or-mr>

Do not send "still watching" messages with no new proof.

Reporting

Report only when one of these changes:

  • new commit landed
  • a new review comment or blocking thread appeared
  • CI changed state
  • mergeability changed
  • the branch was approved, closed, or merged
  • the loop hit a blocker or needs a human decision

Use proof-based status:

BABYSIT PRS | target=<pr-or-mr> | state=<update|done|blocked>
HEAD | old=<sha-or-none> | new=<sha>
CI | changed=<checks-that-changed-or-none>
COMMENTS | new=<count-or-none> | unresolved=<count-or-none>
MERGE | state=<mergeable|conflicted|blocked|merged|closed>
NEXT | <next action or none>

Authority Boundaries

  • Reading PR, MR, CI, and code state is allowed.
  • Posting a review comment is allowed only when the task explicitly says so.
  • Approving is allowed only when the task explicitly says so.
  • Merging is allowed only when the task explicitly says so.

If the loop reaches a point where a write would be useful but not authorized, report that and stop. Do not silently act.

Retry And Stop Rules

Retry only transient failures, such as timeouts or a temporary API error. Keep a consecutive failure counter in the cursor.

Stop and report blocked when:

  • the branch is merged
  • the branch is closed
  • the loop needs a human decision
  • the same transient failure keeps repeating and reaches the retry cap
  • repo access or platform access is unavailable

Final Rule

This skill is a branch watcher, not a hidden reviewer or merger. It watches, verifies the new delta, reports with proof, and stops at authority boundaries.

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.