Tend pr

From doodledood/claude-code-plugins · View interactive version

Tend pr is an AI agent skill from the GitHub repository doodledood/claude-code-plugins. Tend a PR through review to merge-readiness. Classifies comments (bot/human, actionable/FP/uncertain), fixes issues via manifest amendment + scoped /do (or directly in babysit mode), tends CI, syncs PR description, and asks before merging. Use when a PR needs tending through review, or to babysit a

How to use this skill

Skill file

/tend-pr - PR Lifecycle Automation

Goal

Set up a PR for review and start a polling loop that tends it to merge-readiness. Each iteration is handled by /tend-pr-tick. This skill handles setup only, then delegates iteration work.

Two modes:

Input

$ARGUMENTS = manifest path, PR URL, or omitted. Optionally with --platform <platform>, --interval <duration>, --reviewers <usernames>, and --log <execution-log-path>.

Mode detection:

  1. If argument is a file path ending in .md pointing to an existing manifest → manifest-aware mode
  2. If no argument but conversation context contains a manifest path from a prior /do or /define run → manifest-aware mode (use the inferred manifest)
  3. If argument is a PR URL or no manifest is inferrable → babysit mode (identify the PR from the argument URL or from the current branch)

PR resolution (babysit mode without a PR URL argument): Look up the open PR for the current branch. If no open PR exists, error and halt — babysit mode requires an existing PR to tend (it does not create PRs).

Flags:

Errors:

Multi-Repo PR Sets

When the manifest declares Repos: in Intent (multi-repo changeset), each repo's PR is tended by its own /tend-pr invocation pointing at the same canonical /tmp manifest. PR descriptions stay summary-only — manifests are internal and never embedded in PRs.

All /tend-pr-tick instances amend the same shared manifest. There is no locking and no concurrency engineering. Concurrent amendments are last-writer-wins; the later write may overwrite the earlier write's amendment block. Recovery: the user notices the missing amendment in the next iteration and re-triggers the lost tick (e.g., re-add the comment, re-run /tend-pr-tick). Do not add file locking — collisions are rare and the recovery cost is small.

Single-repo manifests (no Repos: field) are unaffected — one /tend-pr, one PR, no shared-manifest considerations.

Full convention: references/MULTI_REPO.md (in define/references/) §f.

Setup

Manifest-aware mode: Ensure a non-draft PR exists for the current branch — create one if none exists. Use the manifest's Intent section for PR title/description. If --reviewers was provided, request review from those users. Resolve the execution log path (from --log, most recent /tmp/do-log-*.md, or conversation context).

Babysit mode: The PR must already exist (resolved during input). If --reviewers was provided, request review from those users.

Create a log file at /tmp/tend-pr-log-{pr-number}.md.

Output the PR link: "PR ready for review: <url>"

Start Loop

Build the tick arguments based on mode:

Invoke the /loop skill with: <interval> /tend-pr-tick <tick-arguments>

The tick handles its own lifecycle — terminal states (merge-ready, merged, closed, draft, escalation) are handled within the tick, including user interaction and loop termination.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.