Agent skill

PR Gardening

by paperclipai in paperclipai/paperclip

Discover the pull requests this Paperclip instance opened (never community contributions), report what each is for and how confident we are that it is merge-ready, and automatically drive the…

MITAuto-check passedDevelopment

Install PR Gardening

skills CLI
$ npx skills add paperclipai/paperclip --skill pr-gardening -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install paperclipai/paperclip pr-gardening --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/paperclipai/paperclip.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/pr-gardening .claude/skills/pr-gardening && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pr-gardening
GitHub stars
100k
Token cost
~3.3k tokens
SKILL.md length
1,605 words
Files
6 (incl. scripts)
Skills in repo
60
Repo updated
First seen
Licence
MIT

At a glance

Discover the pull requests this Paperclip instance opened (never community contributions), report what each is for and how confident we are that it is merge-ready, and automatically drive the…

  • Works in 4 steps: Search open Paperclip issues for the… → Inspect matching issue titles,… → If an equivalent open task exists, reuse… → …
  • Tasks that involve Pull requests
  • SKILL.md covers Scope — Our PRs Only, Hard Guardrails, Inputs and Stage A — Discover Candidates, plus 7 more sections
  • Runs JavaScript scripts from its folder; calls node and gh

What it does

PR Gardening is an agent skill from paperclipai/paperclip. Discover the pull requests this Paperclip instance opened (never community contributions), report what each is for and how confident we are that it is merge-ready, and automatically drive the non-ready ones back to green with /prepare-paperclip-pr — without ever merging.

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts. Compatibility notes: Requires Node.js 20+, gh authenticated for GitHub read access, and Paperclip run credentials.

It sits in Development, covering Pull requests. It works with GitHub. The repository describes itself as: The open-source app everyone uses to manage agents at work. The licence is MIT.

When your agent uses it

  • Tasks that involve Pull requests

Example prompts

  • “/pr-gardening”

Requirements

  • Node.js
  • Compatibility (from SKILL.md): Requires Node.js 20+, gh authenticated for GitHub read access, and Paperclip run credentials.
  • Pre-approved tools (allowed-tools): Bash(node:*), Bash(gh:*), Bash(curl:*)

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Search open Paperclip issues for the exact branch name with statuses backlog, todo, in_progress, in_review, and blocked.
  2. Inspect matching issue titles, descriptions, and recent comments for an equivalent open "create PR from this branch" task for the same…
  3. If an equivalent open task exists, reuse it: add a concise comment with the current PR/head/reason context and link it from the gardening…
  4. Only if no equivalent open task exists, create exactly one follow-up task for that branch.

What it can do on your machine

Read from SKILL.md and the folder at commit de9ab8e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(node:*)
    • Bash(gh:*)
    • Bash(curl:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 5 files in scripts/ (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires Node.js 20+, gh authenticated for GitHub read access, and Paperclip run credentials.

    From compatibility in the SKILL.md frontmatter.

Context cost

PR Gardening loads about 3.3k tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 1,605 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~3.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from paperclipai/paperclip at commit de9ab8e, republished under its MIT licence (© paperclipai). 1,605 words, ~3,291 tokens.

Download SKILL.mdSave it as .claude/skills/pr-gardening/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
pr-gardening
description
Discover the pull requests this Paperclip instance opened (never community contributions), report what each is for and how confident we are that it is merge-ready, and automatically drive the non-ready ones back to green with /prepare-paperclip-pr — without ever merging.
allowed-tools
Bash(node:*), Bash(gh:*), Bash(curl:*)
compatibility
Requires Node.js 20+, gh authenticated for GitHub read access, and Paperclip run credentials.

PR Gardening

Actively garden the pull requests this Paperclip instance opened that are referenced by Paperclip issues active in a recent window (default 14 days). Candidate discovery and readiness checking are scripts, not LLM analysis. GitHub access is read-only throughout this workflow.

Scope — Our PRs Only

By default the workflow gardens only pull requests authored by this instance's GitHub identity (the gh authenticated login, e.g. cryppadotta). Community contributions and dependabot PRs are excluded mechanically by author login in Stage A and land in droppedCommunityPullRequests; never re-add them by hand, widen the scope only when the caller explicitly passes --authors or --include-community.

Hard Guardrails

  • Never merge, approve, or close a pull request.
  • Never instruct another person or agent to merge, approve, or close a pull request.
  • Never garden, comment on, or run /prepare-paperclip-pr against a community PR. Only PRs from the Stage A author allowlist are actionable.
  • Never use mutating gh commands or mutating GitHub API requests. The scripts only use gh pr view and read-only gh api GET requests.
  • Draft pull requests are report-only. Do not post gardening comments for drafts.
  • Comment only on existing originating issues. Never create a gardening issue per pull request.
  • --dry-run suppresses all Paperclip mutations, including gardening comments, prepare tasks, and inbox archives. Discovery and GitHub inspection remain read-only in every mode.

Inputs

  • --days <N>: activity window, default 14. Applies to both mentioning-issue activity and the PR's own updatedAt; open PRs with no activity inside the window are dropped as stale.
  • --authors <logins>: comma-separated GitHub logins whose PRs are in scope; default is the gh authenticated user.
  • --include-community: disable the author filter entirely. Only on explicit caller request.
  • --repo <owner/repo>: GitHub repository, default detected by gh repo view.
  • --dry-run: discover, verify, and report without posting comments, creating prepare tasks, or archiving inbox entries.
  • --archive-inbox: after GitHub confirms a candidate PR is merged at its current head, archive the originating issue from the responsible user's inbox in Stage D.
  • --cooldown-hours <N>: repeat-gardening cooldown, default 48.
  • --max-rounds <N>: maximum gardening rounds per PR, default 3.

Use a run-owned directory such as $PAPERCLIP_RUN_SCRATCH_DIR/pr-gardening for generated files.

Stage A — Discover Candidates

Run the extract-search path. It scans every result page, normalizes PR URLs, deduplicates PR numbers, records every mentioning issue, checks issue work products to identify the origin, drops PRs that GitHub says are merged or closed, drops PRs whose author is outside the allowlist (community contributions) into droppedCommunityPullRequests, and drops open PRs whose own updatedAt is older than the window into droppedStalePullRequests. Issues that exceed the per-issue extract match cap (typically digest or QA issues that enumerate hundreds of PR URLs) are recorded in source.truncatedIssues and noted in the report instead of aborting the run.

bash
node .agents/skills/pr-gardening/scripts/find-candidates.mjs \
  --days 14 \
  --dry-run \
  --output "$RUN_DIR/candidates.json"

The script calls GET /api/companies/:companyId/search/extract with kind=url, scope=all, and updatedWithin=<N>d, then resolves the author allowlist from gh api user unless --authors or --include-community overrides it. Do not replace it with full issue-list fetching or LLM scanning.

Stage B — Verify Current-Head Readiness

bash
node .agents/skills/pr-gardening/scripts/check-readiness.mjs \
  --input "$RUN_DIR/candidates.json" \
  --output "$RUN_DIR/readiness.json" \
  --dry-run

For every candidate, the script re-fetches the current head SHA and records:

  • open/draft state and mergeability/conflicts;
  • statusCheckRollup check-run and legacy status inventory;
  • a completed Greptile check-run on the exact head, clean only for success or neutral;
  • reviewDecision;
  • commits behind the base branch.

Verdicts are ready, needs_gardening, or report_only for drafts. Always rerun this stage after any wake or claim that a PR was fixed. Never trust issue comments as proof of readiness.

Follow-up Create-PR Task Deduplication

If gardening decides a branch needs a follow-up task to create a single pull request, deduplicate before creating anything.

For each branch, process one branch at a time and do this serially:

  1. Search open Paperclip issues for the exact branch name with statuses backlog, todo, in_progress, in_review, and blocked.
  2. Inspect matching issue titles, descriptions, and recent comments for an equivalent open "create PR from this branch" task for the same branch.
  3. If an equivalent open task exists, reuse it: add a concise comment with the current PR/head/reason context and link it from the gardening issue or blocker list. Do not create another task.
  4. Only if no equivalent open task exists, create exactly one follow-up task for that branch.

Never fan out follow-up task creation in parallel. Do not issue concurrent POST /api/companies/:companyId/issues calls for create-PR or prepare-PR tasks. After P1's issue-create idempotency support is available, every create-PR follow-up task creation must include idempotencyKey: "pr-gardening:create-pr:{branch}" and every prepare-PR task idempotencyKey: "pr-gardening:prepare-pr:{owner/repo}#{number}".

Stage C — Drive Our PRs to Ready with /prepare-paperclip-pr

Skip this stage in --dry-run mode and for ready or report_only entries.

Every needs_gardening PR here was opened by this instance (Stage A guarantees it), so do not just report — actively get it merge-ready by running the /prepare-paperclip-pr skill against it. Process PRs one at a time:

  1. Cooldown and rounds. Locate the originatingIssue from candidates.json (selection priority: issue carrying the exact PR URL as a pull_request work product; then issue whose comment mentions the PR; then most recently active mentioning issue). Fetch its comments and search for the marker:

    text
    <!-- pr-gardening:<owner/repo>#<number> -->

    Skip the PR if the latest matching marker is newer than the cooldown. Track rounds from matching markers; after three rounds, stop and report not converging; recommend close or human decision. That is a recommendation for human disposition, not an instruction to close the PR.

  2. Deduplicate. Search open Paperclip issues for the PR number/branch. If an equivalent open prepare-PR task already exists, reuse it with a concise status comment instead of creating another (see the deduplication section above).

  3. Run the prepare skill. Create one focused child task per PR assigned to a coder agent (prefer CodexCoder) instructing it to run /prepare-paperclip-pr for that PR — include the PR URL, branch, current head SHA, and the exact machine-detected reasons[] from readiness.json. If you are the gardener and already have the PR's branch checked out in a worktree, you may run /prepare-paperclip-pr directly instead of delegating. Either way, the prepare work must never merge, approve, or close the PR.

  4. Leave the marker comment. Comment on the originating issue with the marker above, the current head SHA, the copied reasons[], the round counter, and a link to the prepare task. Use POST /api/issues/:issueId/comments with X-Paperclip-Run-Id. Include resume: true when the issue is terminal so the comment creates a live continuation.

Suggested body:

markdown
<!-- pr-gardening:paperclipai/paperclip#1234 -->
Gardening: dispatched `/prepare-paperclip-pr` for https://github.com/paperclipai/paperclip/pull/1234 via PAP-XXXX.

Current-head verification at `abc123` found:
- failing check: test
- Greptile missing at current head

Gardening round 1/3. Re-verification is required after changes; do not merge based on this comment.
Show full SKILL.md (567 more words)Show less

Stage D — Optional Inbox Tidy-Up

Run this stage only when the caller explicitly supplied --archive-inbox. --dry-run always suppresses inbox mutations, even when --archive-inbox is also present. Without the flag, do not archive anything.

Stage D applies to a previously monitored candidate that transitions to merged. Rerun Stage B immediately before this stage and require GitHub to report state: merged for the same current head SHA recorded by that verification. Fresh Stage A discovery intentionally drops PRs that were already merged or closed.

For each qualifying candidate, archive its originatingIssue from the responsible user's inbox with POST /api/issues/:issueId/inbox-archive and an empty JSON body. Do not pass userId; the Paperclip API resolves the responsible user from the gardener's run context and enforces that user's inbox-agent policy. GitHub access remains read-only.

Do not archive PRs that are merely ready, closed without merging, draft, pending, or merged at an unverified or stale head. Never archive an originating issue while the user is still awaiting review, a decision, approval, or other action on it. If Paperclip denies the mutation because the responsible user is unresolved, inbox management is disabled, the gardener is not allowlisted, or a trust boundary applies, report the denial and continue without retrying around policy.

After a successful archive, leave a standard gardening marker comment on the originating issue that names the archived issue and merged PR:

markdown
<!-- pr-gardening:paperclipai/paperclip#1234 -->
Inbox tidy-up: archived [PAP-310](/PAP/issues/PAP-310) from the responsible user's inbox after confirming https://github.com/paperclipai/paperclip/pull/1234 merged at current head `abc123`.

This archive is audited and reversible; later issue activity may resurface the item.

Use POST /api/issues/:issueId/comments and include X-Paperclip-Run-Id on both the archive and comment requests. In --dry-run, report the archive and marker comment that would have been written, but perform neither mutation.

Stage E — Monitor to Termination

Set the gardening run issue's blockedByIssueIds to the non-terminal prepare tasks and originating issues engaged in Stage C so blocker resolution wakes the gardener. A scheduled or manual rerun is the fallback.

On every wake, rerun Stage B first. A PR terminates from active gardening only when one of these is mechanically observed:

  • verified ready at the current head;
  • merged or closed externally;
  • maximum rounds reached, reported as not converging.

Do not leave the gardening issue blocked on terminal issues. Do not poll agents or long-running sessions.

Stage F — Render and Publish the Report

bash
node .agents/skills/pr-gardening/scripts/render-report.mjs \
  --input "$RUN_DIR/readiness.json" \
  --output "$RUN_DIR/gardening-report.md"

The report states the scope (authors + window), and for every open PR gives its author, a one-line purpose summary taken from the PR description, and a readiness confidence bucket:

  • High: current-head checks green, no conflicts, Greptile clean, base fresh, originating issue terminal.
  • Medium: otherwise green but base stale, review not complete, or originating issue active.
  • Low: failing/pending checks, missing Greptile, draft/just-fixed-unverified state, or no identifiable origin.

If a PR's generated purpose line is empty or unhelpful, write a one-sentence description from the PR title and diff summary when publishing the report.

Upload candidates.json, readiness.json, and gardening-report.md to the gardening issue, create/update the gardening-report issue document with the Markdown body, and leave a summary comment linking the artifacts. The report is the deliverable; it is never authorization to merge.

Verification

Run focused script tests:

bash
node --test .agents/skills/pr-gardening/scripts/pr-gardening.test.mjs

For a live dry run, execute Stages A, B, and F with --dry-run, then sanity-check named PRs only if they are still open. Merged or closed examples should appear under droppedClosedPullRequests, not in readiness results, and community-authored PRs must appear only under droppedCommunityPullRequests — a candidate or report entry with an author outside the allowlist is a scope failure. If also exercising --archive-inbox, confirm the report describes the suppressed Stage D action and that no Paperclip archive or marker-comment mutation occurred.

© paperclipai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts) in .agents/skills/pr-gardening of paperclipai/paperclip.

  • SKILL.md
  • scripts/check-readiness.mjs
  • scripts/find-candidates.mjs
  • scripts/lib.mjs
  • scripts/pr-gardening.test.mjs
  • scripts/render-report.mjs

Open the folder on GitHubat commit de9ab8e

Compare with similar skills

PR Gardening next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

PR Gardening compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PR Gardening this skillpaperclipai/paperclip100k—~3.3kAutomated safety check: PassMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Check PRonyx-dot-app/onyx32k2 repos~2.3kAutomated safety check: PassMIT
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0
Pull Request Title and Body Writeropeninterpreter/openinterpreter69k2 repos~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Check PR

    onyx-dot-app/onyx

    Checks a GitHub, GitLab, or Perforce (p4) pull request (or merge request, or shelved changelist) for unresolved review comments, failing status checks, and incomplete PR descriptions.

    32k GitHub starsUsed in 2 repos~2.3k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Pull Request Title and Body Writer

    openinterpreter/openinterpreter

    Rewrites the title and body of one or more pull requests with gh, leading with why the change was made, then what changed, and describing only the net result.

    69k GitHub starsUsed in 2 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Official

    Runs a loop on a GitHub pull request: fetch review state, triage comments into actions, implement them and resolve threads, repeating until nothing actionable is left.

    48k GitHub stars~2.2k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from paperclipai/paperclip

All 60 skills in this repo
  • Garden Inbox

    paperclipai/paperclip

    Scan a Paperclip user's Mine inbox, classify reversible archive candidates, request checkbox confirmation, and archive only accepted selections.

    100k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Paperclip

    paperclipai/paperclip

    Interact with the Paperclip control plane API for task coordination and governance.

    100k GitHub stars~9.6k tokensUpdated today
    Auto-check passed
  • Paperclip

    paperclipai/paperclip

    A skill your agent uses for Paperclip-managed tasks and heartbeats: reading task context, delivering task documents or files, updating completion or blockers, coordinating or delegating work, and…

    100k GitHub stars~18k tokensUpdated today
    Auto-check passed
  • Design Guide

    paperclipai/paperclip

    Paperclip UI design system guide for building consistent, reusable frontend components.

    100k GitHub starsUsed in 1 repo~3.1k tokens
    Auto-check passed
  • Paperclip Page

    paperclipai/paperclip

    Publish static HTML pages and asset folders to the Paperclip S3/CloudFront page host.

    100k GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Paperclip Create Agent

    paperclipai/paperclip

    Create new agents in Paperclip with governance-aware hiring.

    100k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed

Works with

Categories

Questions about PR Gardening

What does PR Gardening do?

Discover the pull requests this Paperclip instance opened (never community contributions), report what each is for and how confident we are that it is merge-ready, and automatically drive the…. PR Gardening is an agent skill from paperclipai/paperclip. Discover the pull requests this Paperclip instance opened (never community contributions), report what each is for and how confident we are that it is merge-ready, and automatically drive the non-ready ones back to green with /prepare-paperclip-pr — without ever merging.

When should I use PR Gardening?

PR Gardening fits situations like: tasks that involve Pull requests.

How do I install PR Gardening in Claude Code?

Run `npx skills add paperclipai/paperclip --skill pr-gardening -a claude-code`. Or copy the skill folder (.agents/skills/pr-gardening in paperclipai/paperclip) into .claude/skills/pr-gardening in your project. Claude Code loads it when a task matches its description.

How do I install PR Gardening in Codex?

Run `npx skills add paperclipai/paperclip --skill pr-gardening -a codex`. Or copy the skill folder (.agents/skills/pr-gardening in paperclipai/paperclip) into .agents/skills/pr-gardening in your project. Codex loads it when a task matches its description.

Can I use PR Gardening in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add paperclipai/paperclip --skill pr-gardening -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pr-gardening, .gemini/skills/pr-gardening, .github/skills/pr-gardening and .opencode/skills/pr-gardening in your project.

What does PR Gardening need to run?

Going by SKILL.md and its folder, PR Gardening needs JavaScript for the scripts in its folder and the command-line tools its instructions call (node and gh). Our summary lists: Node.js. Its frontmatter pre-approves these tools: Bash(node:*), Bash(gh:*), Bash(curl:*). Compatibility (from SKILL.md): Requires Node.js 20+, gh authenticated for GitHub read access, and Paperclip run credentials..

Does PR Gardening access the network?

SKILL.md contains no URLs. Its commands use gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is PR Gardening safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does PR Gardening use?

PR Gardening is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does PR Gardening use?

About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to PR Gardening?

Skills that share tags, products or a category with PR Gardening: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Check PR (onyx-dot-app/onyx, 32k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars) and Create Pull Request (cline/cline, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PR Gardening?

paperclipai (a GitHub organization) maintains it in paperclipai/paperclip, which has 99,905 GitHub stars. The repository holds 60 skills in this directory. The repository was last updated on October 11, 2026.

Source: paperclipai/paperclip on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.