Agent skill

Oldest PR Merge

by itgalaxy in itgalaxy/webfont

Process the oldest open pull request end-to-end: analyze the diff, add missing tests on that PR branch, resolve review comments (including Copilot) in a loop, fix test regressions, update…

MITAuto-check: notesDevelopment

Install Oldest PR Merge

skills CLI
$ npx skills add itgalaxy/webfont --skill oldest-pr-merge -a claude-code

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

GitHub CLI
$ gh skill install itgalaxy/webfont oldest-pr-merge --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/itgalaxy/webfont.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/oldest-pr-merge .claude/skills/oldest-pr-merge && 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
oldest-pr-merge
GitHub stars
310
Token cost
~2.8k tokens
SKILL.md length
1,222 words
Files
2
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Process the oldest open pull request end-to-end: analyze the diff, add missing tests on that PR branch, resolve review comments (including Copilot) in a loop, fix test regressions, update…

  • Works in 8 steps: Pick the oldest open PR and analyze it → Verify tests cover the changes → If coverage is missing, implement tests… → …
  • The user asks to babysit
  • SKILL.md covers Continuous backlog drain, 1. Pick the oldest open PR and…, 1a. Already on main… and 1b. Assignees and labels…, plus 10 more sections
  • Calls gh, git and npm

What it does

Oldest PR Merge is an agent skill from itgalaxy/webfont. Process the oldest open pull request end-to-end: analyze the diff, add missing tests on that PR branch, resolve review comments (including Copilot) in a loop, fix test regressions, update TROUBLESHOOTING.md / AGENTS.md / ADRs, merge when CI is green, then close related issues. Use when the user asks to babysit, triage, review, or merge the oldest PR, clear the PR backlog, or run the oldest-PR merge workflow.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `gh-recipes.md`).

It sits in Development, covering Architecture decision records, Dependency management and Pull requests. The repository describes itself as: Awesome generator of webfont. The licence is MIT.

When your agent uses it

  • The user asks to babysit
  • Merge the oldest PR
  • Clear the PR backlog
  • Run the oldest-PR merge workflow

Example prompts

  • “/oldest-pr-merge”

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Pick the oldest open PR and analyze it
  2. Verify tests cover the changes
  3. If coverage is missing, implement tests on the same PR
  4. Review comments loop (including Copilot)
  5. Documentation updates
  6. Merge when ready
  7. Related issue(s)
  8. Final uncommitted-diff sweep (mandatory)

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh
    • git
    • npm

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

  • Network

    No URLs in SKILL.md. Its commands use gh, git and npm, 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.

Context cost

Oldest PR Merge loads about 2.8k tokens when it runs. Until then it costs about 107 tokens; SKILL.md has 1,222 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:247
    files that should stay untracked, e.g. `.env`).

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from itgalaxy/webfont at commit c7af1bc, republished under its MIT licence (© itgalaxy). 1,222 words, ~2,846 tokens.

Download SKILL.mdSave it as .claude/skills/oldest-pr-merge/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
oldest-pr-merge
description
Process the oldest open pull request end-to-end: analyze the diff, add missing tests on that PR branch, resolve review comments (including Copilot) in a loop, fix test regressions, update TROUBLESHOOTING.md / AGENTS.md / ADRs, merge when CI is green, then close related issues. Use when the user asks to babysit, triage, review, or merge the oldest PR, clear the PR backlog, or run the oldest-PR merge workflow.

Oldest PR merge

End-to-end workflow for the oldest open PR. Follow project rules in AGENTS.md and CONTRIBUTING.md (atomic Conventional Commits in English, English issue/PR comments, TROUBLESHOOTING updates).

Copy and track this checklist:

Oldest PR progress:
- [ ] 1. Select and analyze oldest open PR
- [ ] 1a. If already on main (Dependabot/Renovate), request bot rebase — do not close
- [ ] 1b. Ensure assignee + at least one meaningful label (hard gate)
- [ ] 2. Check test coverage for the changes
- [ ] 3. Add missing tests on the same PR branch
- [ ] 4. Resolve all review comments (incl. Copilot) in a loop
- [ ] 5. Run tests and check for regressions
- [ ] 6. Fix regressions if any
- [ ] 7. Record work in TROUBLESHOOTING.md / AGENTS.md (and ADR if needed)
- [ ] 8. Merge only when comments done, tests green, CI green, assignee + label set
- [ ] 9. Close related issue(s) with a summary comment
- [ ] 10. Final uncommitted-diff sweep and commit(s)

Continuous backlog drain

When the user asks to run oldest-pr-merge, clear the backlog, or says to keep going to the next PR:

  1. After finishing one PR (merge, or Dependabot/Renovate has closed it after rebase), immediately select the new oldest open PR and repeat the full checklist.
  2. Do not ask whether to continue between PRs.
  3. Stop only on the Stop / escalate conditions, when there are no open PRs left, or when the user explicitly cancels.

1. Pick the oldest open PR and analyze it

bash
gh pr list --state open --limit 100 --json number,title,createdAt,author,url,headRefName,baseRefName,labels,assignees,body \
  --jq 'sort_by(.createdAt) | .[0]'

Then:

bash
gh pr view <N> --json title,body,files,commits,statusCheckRollup,reviewDecision,comments,reviews,assignees,labels
gh pr diff <N>

Checkout the PR branch (gh pr checkout <N>). Summarize intent, risk, and touched areas before editing.

If there is no open PR, stop and report that.

1a. Already on main (Dependabot / Renovate) — request rebase, never self-close

If analysis shows the PR is redundant with main (examples below), do not gh pr close or abandon the PR yourself.

Treat as already-on-main when any of these hold:

  • The titled dependency version is already present on main’s package.json / lockfile
  • git diff origin/main...HEAD (or the PR merge diff) has no remaining meaningful package change
  • A squash merge would be empty / no-op relative to current main
Dependabot
  1. Comment on the PR mentioning Dependabot and requesting a rebase (English):
bash
gh pr comment <N> --body "$(cat <<'EOF'
@dependabot rebase

This looks redundant with current `main` (dependency already present or empty merge). Please rebase so Dependabot can close or refresh the PR itself.
EOF
)"
  1. Wait for Dependabot to rebase and for CI to run (gh pr checks <N> / gh run watch as needed).
  2. Let Dependabot close the PR if the bump is obsolete after rebase. Do not close it manually.
  3. If after rebase the PR still has a real bump, continue the normal merge checklist (§1b onward).
Renovate

Same policy for Renovate-authored PRs: do not self-close when already on main. Request a rebase and wait for the bot:

bash
gh pr comment <N> --body "$(cat <<'EOF'
@renovate rebase

This looks redundant with current `main`. Please rebase so Renovate can close or refresh the PR itself.
EOF
)"

See gh-recipes.md for the snippet. After the bot closes (or the PR becomes mergeable again), continue the backlog drain.

1b. Assignees and labels (mandatory before merge)

As soon as you start processing the PR (right after checkout / analysis), and again immediately before merge, ensure metadata is set. Never merge a PR that is missing either requirement.

Assignees

Prefer cursoragent; if that user is not assignable on the repo, fall back to jimmyandrade.

bash
# Prefer cursoragent; fall back to jimmyandrade if not assignable
if gh api "repos/$(gh repo view --json nameWithOwner -q .nameWithOwner)/assignees/cursoragent" --silent 2>/dev/null; then
  gh pr edit <N> --add-assignee cursoragent
else
  gh pr edit <N> --add-assignee jimmyandrade
fi

# Verify at least one required assignee is present
gh pr view <N> --json assignees --jq '
  [.assignees[].login] as $a
  | if (($a | index("cursoragent")) or ($a | index("jimmyandrade"))) then "ok" else error("missing required assignee") end
'

If neither user can be assigned, stop and escalate — do not merge.

Labels

Ensure at least one meaningful label from the repo’s existing labels (create a new label only when none fit and the name is clearly useful). Prefer:

PR kindExample labels
Renovate / dependency bumpsdependencies, renovate
Docs / skills / AGENTSdocumentation
Bug fixbug
Feature / product changeenhancement
CI / workflowsadd or reuse a CI-related label if present; otherwise dependencies only when that fits
bash
gh label list --limit 100
gh pr view <N> --json labels --jq '.labels | length'
# If zero labels, add one that fits, e.g.:
gh pr edit <N> --add-label "dependencies"

A label is meaningful when it describes the PR’s nature (deps, docs, bug, enhancement, CI, etc.). Do not invent placeholder labels like todo unless that is the real status.

2. Verify tests cover the changes

From the diff, list behavior that must be tested. Search for existing unit/integration/E2E tests that exercise those paths.

Gaps count as missing coverage (new logic, changed branches, bug fixes without assertions, snapshots that only assert structure when behavior changed).

3. If coverage is missing, implement tests on the same PR

  • Add tests on the PR branch (do not open a separate PR unless the user asks).
  • Match existing Jest/Cypress patterns in the repo.
  • Commit with atomic Conventional Commits, e.g. test: cover parking plate validation on wizard step.
  • Push to the PR head branch.

4. Review comments loop (including Copilot)

Repeat until no unresolved review threads / actionable comments remain:

  1. Load comments and threads (see gh-recipes.md).
  2. Include Copilot / bot review comments; treat them like human review unless clearly noise.
  3. For each unresolved item:
    • Makes sense → apply the change on the PR branch; record reusable guidance in AGENTS.md; reply on the thread explaining what you did; resolve the conversation.
    • Does not make sense → reply explaining why (English); record the rationale in AGENTS.md; if it is an architectural decision, add or update an ADR under docs/adr/ (create the folder/template if missing); resolve only after the disagreement is clearly documented on the thread.
  4. Push commits, then re-fetch comments (new Copilot rounds may appear). Loop.

Never resolve a thread without a reply that states the outcome.

Show full SKILL.md (506 more words)Show less

5–6. Regressions

After code/test/comment fixes:

bash
npm test
# plus any targeted suites for touched files

Watch PR checks: gh pr checks <N>.

If regressions appear, fix them on the same branch, commit atomically, push, and re-run until local tests and required CI are green. Log novel failures in TROUBLESHOOTING.md.

7. Documentation updates

Before merge:

  • TROUBLESHOOTING.md: any new install/build/test/CI failure you hit and how you fixed it (same format as existing entries).
  • AGENTS.md: any adopted best practice or rejected-suggestion rationale worth remembering.
  • docs/adr/: only for meaningful architecture decisions (short ADR: context, decision, consequences).

Commit docs separately when possible (docs: …).

8. Merge when ready

Merge only if all are true:

  • All review comments answered and resolved
  • No known test regressions locally
  • PR CI pipeline is green (or only waived checks the user explicitly approved)
  • Assignee set: cursoragent (preferred) or jimmyandrade (fallback) is among assignees
  • At least one meaningful label is present

Re-check metadata right before merge (see §1b and gh-recipes.md). If assignee or label is missing, set them first — do not merge without both.

bash
gh pr view <N> --json assignees,labels --jq '{assignees:[.assignees[].login],labels:[.labels[].name]}'
gh pr checks <N>
gh pr merge <N> --squash

If merge is blocked (rules, reviews, conflict), report the blocker; do not force-merge unless the user explicitly asks. Never use --merge or --rebase unless a maintainer explicitly overrides the squash-only policy.

Detect linked issues from PR body/commits (#123, Fixes #123, closing keywords).

bash
gh pr view <N> --json closingIssuesReferences,body

For each associated issue:

  1. Comment in English with what shipped and the PR URL.
  2. Update checklists (- [x] / remaining items) per AGENTS.md.
  3. Close when acceptance criteria are met: gh issue close <N> --reason completed.

10. Final uncommitted-diff sweep (mandatory)

At the end of every oldest-pr-merge run (after merge/close, or after stopping early), inspect the working tree:

bash
git status -sb
git diff
git diff --cached

If anything is uncommitted (modified, staged, or untracked that belongs in git):

  1. Classify each change:
    • Related to the PR just processed (tests, fixes, docs for that PR) → commit on the PR branch before merge if the PR is still open; if already merged, commit on a follow-up branch/PR or on main only if that is the repo’s normal flow and the user expects it.
    • Not related to the PR (skill/rules, unrelated docs, tooling, leftover stash conflict fixes, etc.) → switch to main (or a dedicated branch), commit separately with its own atomic Conventional Commit, and push. Do not fold unrelated work into the PR commits.
  2. Use progressive atomic commits (English, Conventional Commits).
  3. Re-run git status until the tree is clean for intentional work (ignore local-only files that should stay untracked, e.g. .env).

Never leave PR-related or skill-run leftovers uncommitted without an explicit user decision to discard them.

Stop / escalate conditions

Stop and ask the user when:

  • The oldest PR is draft and not meant to merge
  • Changes require product/architecture choice beyond ADRs
  • CI failures need secrets/network access you do not have
  • Merge requires admin bypass or force push
  • Neither cursoragent nor jimmyandrade can be assigned (assignee hard gate)
  • Dependabot/Renovate was asked to rebase an already-on-main PR but does not respond within a long wait and the PR stays open with no clear next step (do not self-close; escalate)

Additional resources

  • gh-recipes.md — GitHub CLI snippets for PRs, comments, and threads

© itgalaxy, 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 1 other file in .cursor/skills/oldest-pr-merge of itgalaxy/webfont.

  • SKILL.md
  • gh-recipes.md

Open the folder on GitHubat commit c7af1bc

Compare with similar skills

Oldest PR Merge 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.

Oldest PR Merge compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Oldest PR Merge this skillitgalaxy/webfont310—~2.8kAutomated safety check: NotesMIT
Dsh Code ReviewZhou-Yujing114514/deepseek-harness-linux120—~2.1kAutomated safety check: PassMIT
Alego Code Reviewsingula-ai/alego109—~2.4kAutomated safety check: PassMIT
PR Design DocOpenHands/OpenHands90k—~2.4kAutomated safety check: PassMIT
Ansible Development Contextansible/ansible71k—~427Automated safety check: PassGPL-3.0
Renovate Actions PR Reviewbacknotprop/plannotator9.3k—~640Automated safety check: PassApache-2.0

Similar skills

  • Dsh Code Review

    Zhou-Yujing114514/deepseek-harness-linux

    A skill your agent uses when reviewing a pull request in the deepseek-harness repo — orients the reviewer to this codebase's standards (AGENTS.md conventions, defensive patterns, ADRs, quality…

    120 GitHub stars~2.1k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Alego Code Review

    singula-ai/alego

    A skill your agent uses when reviewing a pull request in the alego repo — orients the reviewer to this codebase's standards (AGENTS.md conventions, defensive patterns, ADRs, quality gates) and the…

    109 GitHub stars~2.4k tokensUpdated 12 days ago
    DevelopmentAuto-check passed
  • PR Design Doc

    OpenHands/OpenHands

    For a non-trivial pull request, write a self-contained HTML design doc under the temporary .pr/ directory and link a visibility-appropriate preview in the PR description, so maintainers grasp the…

    90k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Load Ansible project development guidelines, testing conventions, PR review processes, and code structure reference into context

    71k GitHub stars~427 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Renovate Actions PR Review

    backnotprop/plannotator

    Reviews Renovate pull requests that bump GitHub Actions by checking pinned SHAs against upstream tags, scanning changelogs and confirming workflows stay compatible.

    9.3k GitHub stars~640 tokensUpdated today
    DevelopmentAuto-check passed
  • Mariadb Operator PR Review

    mariadb-operator/mariadb-operator

    Perform a structured maintainer-style PR review for the mariadb-operator repository.

    1k GitHub stars~3.3k tokensUpdated 3 days ago
    DevelopmentAuto-check passed

Categories

Questions about Oldest PR Merge

What does Oldest PR Merge do?

Process the oldest open pull request end-to-end: analyze the diff, add missing tests on that PR branch, resolve review comments (including Copilot) in a loop, fix test regressions, update…. Oldest PR Merge is an agent skill from itgalaxy/webfont.md / ADRs, merge when CI is green, then close related issues.

When should I use Oldest PR Merge?

Oldest PR Merge fits situations like: the user asks to babysit; merge the oldest PR; clear the PR backlog; run the oldest-PR merge workflow.

How do I install Oldest PR Merge in Claude Code?

Run `npx skills add itgalaxy/webfont --skill oldest-pr-merge -a claude-code`. Or copy the skill folder (.cursor/skills/oldest-pr-merge in itgalaxy/webfont) into .claude/skills/oldest-pr-merge in your project. Claude Code loads it when a task matches its description.

How do I install Oldest PR Merge in Codex?

Run `npx skills add itgalaxy/webfont --skill oldest-pr-merge -a codex`. Or copy the skill folder (.cursor/skills/oldest-pr-merge in itgalaxy/webfont) into .agents/skills/oldest-pr-merge in your project. Codex loads it when a task matches its description.

Can I use Oldest PR Merge 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 itgalaxy/webfont --skill oldest-pr-merge -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/oldest-pr-merge, .gemini/skills/oldest-pr-merge, .github/skills/oldest-pr-merge and .opencode/skills/oldest-pr-merge in your project.

What does Oldest PR Merge need to run?

Going by SKILL.md and its folder, Oldest PR Merge needs the command-line tools its instructions call (gh, git and npm).

Does Oldest PR Merge access the network?

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

Is Oldest PR Merge safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Oldest PR Merge use?

Oldest PR Merge 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 Oldest PR Merge use?

About 2.8k tokens (SKILL.md is roughly 11k 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 Oldest PR Merge?

Skills that share tags, products or a category with Oldest PR Merge: Dsh Code Review (Zhou-Yujing114514/deepseek-harness-linux, 120 stars), Alego Code Review (singula-ai/alego, 109 stars), PR Design Doc (OpenHands/OpenHands, 90k stars) and Ansible Development Context (ansible/ansible, 71k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Oldest PR Merge?

itgalaxy (a GitHub organization) maintains it in itgalaxy/webfont, which has 310 GitHub stars. The repository was last updated on October 5, 2026.

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