Pr Backlog Triage logo

Pr Backlog Triage

OrganizationPopular
amd
pr-backlog-triage

Interactively clear a backlog of open amd/gaia PRs to zero (or to a short, justified human-review list) by fanning out one isolated subagent per PR. Use when the user asks to 'audit open PRs', 'triage the backlog', 'fix CI and merge what's safe', or similar — not for reviewing a single named PR someone just opened (that's a normal review), and not for the scheduled nightly audit workflow (see weekly-audit-patterns, a different, automated lens).

Overview

Publisheramd
Repositorygaia
Skill namepr-backlog-triage
Stars
1.6K
Forks
176
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by amd on GitHub. Read the source before you install it.

Installation

Install the Pr Backlog Triage AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/amd/gaia/tree/main/.claude/skills/pr-backlog-triage
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/amd/gaia.git /tmp/gaia
mkdir -p .claude/skills
cp -r /tmp/gaia/.claude/skills/pr-backlog-triage .claude/skills/pr-backlog-triage
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pr Backlog Triage in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Pr Backlog Triage on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Pr Backlog Triage is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

PR Backlog Triage

Clears a large, standing backlog of open PRs by dispatching one worktree-isolated subagent per PR, in parallel, repeatedly, until nothing mergeable is left open. This is a loop, not a one-shot pass: new PRs land while you're triaging the old ones, PRs you held come back with fixes, and CI itself sometimes breaks underneath the whole batch. Budget for several rounds in one sitting.

Before the first round: sync to origin/main

A worktree's local main can silently fall behind origin/main by dozens of commits — nothing here force-pushes or rebases your worktree, so staleness only clears when you fetch. Running tests or reproducing a bug against a stale worktree produces a false report: a bug "found" that a merged PR already fixed, or a fix that looks broken because the test it needs hasn't landed yet. Check and fast-forward before trusting any local result:

bash
git fetch origin main
git log --oneline HEAD..origin/main | wc -l   # non-zero means you're behind
git merge --ff-only origin/main               # safe: fails loudly instead of rewriting history if it can't fast-forward

Re-run this at the start of every round, not just once — rounds in this loop can span hours, and main moves fast when several PRs merge per round.

Per-PR subagent dispatch

One Agent call per PR, isolation: "worktree", run in parallel (multiple Agent invocations in a single message). Each subagent's prompt should carry:

  1. The PR number, title, and author — enough that the agent doesn't have to guess what it's for from the diff alone.
  2. The sync-to-main step above, inline — a fresh worktree needs it too.
  3. Known non-blocking CI causes, as categories, not hardcoded issue numbers. Issue numbers for flakes get fixed and re-opened as the codebase moves; a skill that hardcodes "failure X is always issue #1234, ignore it" goes stale and becomes wrong in the opposite direction — treating a new regression as a known flake because it superficially resembles one. Instead, tell the agent the shape of a known flake and to verify by reading the actual job log every time:
    • A continue-on-error: true smoke-test job failing on a platform-specific assertion unrelated to the PR's own files (e.g. a POSIX-only check running on Windows, a macOS-only library conflict) — real flakes recur verbatim across unrelated PRs; confirm by reading the log, not by the job's name alone.
    • The automated PR-review bot skipping with a quota/auth error rather than posting a verdict — treat as "never ran," not a finding either way.
    • A failure that reproduces identically on bare origin/main with none of the PR's own changes present — proves the PR isn't the cause; still worth filing an issue if nothing already tracks it (see "What a subagent should still do" below).
  4. Fork vs. same-repo handling. Check headRepositoryOwner/headRepository before assuming push access. Same-repo branches: push fixes directly. Fork branches: push to the fork remote (git push <fork-owner>-fork HEAD:branch), never to amd/gaia directly, and never force. A push that ends up on the wrong remote (easy to do when a worktree still has origin pointed at the main repo) needs to be deleted and redone, not left stray.
  5. The eval-gating rule. If the diff touches a system prompt, tool docstring, tool-call schema, tool-registration/availability logic, retry/recovery prompts, or verification/grounding logic, it's LLM-behavior-affecting and needs a real gaia eval agent (or gaia eval tasks) run with posted results before merge — per CLAUDE.md. A PR with a clean diff and green CI but no eval evidence for this category of change is a hold, not a merge. Draft-status language left in the PR body ("needs the eval run", "draft until...") after the PR left draft is a strong signal the author knows this gate is unmet — don't treat coming out of draft as the gate having cleared.
  6. What to actually do, in order: read the diff, description, and every comment (not just the latest) — a bot review's finding from hours ago is still unaddressed if no commit followed it. Check fork status. Fix merge conflicts (additively — when two features touched the same lines, keep both, don't drop either side without understanding why it was there). Root-cause every failing check from the actual log, not the job name. Run the affected test suite with PYTHONPATH pointed at this worktree's src/ + hub/agents/*/python/ (an editable install elsewhere on the machine will otherwise silently test the wrong checkout — see project_editable_install_wrong_worktree in memory, or the repo's own root conftest.py pin for pytest specifically). Run lint. Merge via gh pr merge <n> --squash, falling back to --auto when the repo's merge queue rejects a direct squash ("! The merge strategy for main is set by the merge queue" is the queue accepting it, not refusing it — re-check state/mergedAt afterward since a queued merge can still fail later and the PR stays open).
  7. When to hold instead of merge: a real bug whose fix is still incomplete: a confirmation prompt that can approve a declined action's full scope without showing it, a cache keyed wrong, a leak path only half-closed, a race "narrowed" rather than closed, a doc deletion that hides a still-live, still-supported surface rather than reflecting an actual retirement. State the gap precisely — "what's missing before this can merge" — not just "needs more review."
  8. Large PRs (roughly >5k lines or a full subsystem rewrite) get resolved to a clean, CI-green, conflict-free state but are never auto-merged, regardless of how clean they are — they get flagged for explicit human sign-off. Still do the full conflict-resolution and bug-hunting work; don't skip triage just because it's big.
  9. Security-sensitive PRs (permission prompts, confirmation gating, path-scope enforcement, anything in the "ask before doing X" family) get the same fail-closed scrutiny every time: trace what happens on timeout, on a malformed answer, on an answer to a different prompt arriving late, and whether a grant can be scoped wider than what was actually shown to the user. These also get held for human sign-off even when the mechanism checks out — the two concerns (size/security and "is it merge-ready") are independent; a PR can clear one and still need the other.

What a subagent should still do even when holding

Don't just report a finding and stop. Post it as a PR comment if nothing already says it (a bot review that already caught the same thing doesn't need a duplicate). If the finding is a real bug unrelated to the PR under review — a CI failure that reproduces on bare main, a stale pinned test, a leftover reference to something already deleted — fix it in its own small PR (or file an issue if it's bigger than a one-commit fix) rather than letting it silently block every other PR in the batch. Check whether another parallel subagent already found and fixed the same thing before filing a duplicate — two subagents hitting the same shared-file break independently is common in a big parallel batch.

Re-verifying a previously-held PR

When a round turns up a new commit on a PR you held last round, don't assume the new commit fixes what you flagged — re-read the actual diff and re-verify the specific claim. A plausible-looking follow-up commit sometimes addresses a different, superficially similar concern (e.g. adds an unrelated optimization instead of fixing the flagged correctness gap) and the original hold stands.

End state

The loop is done for a round when every open PR is either merged, or held with a specific, current, re-checked reason (not "needs review" — the actual blocking fact). Summarize the held list for the user with one line per PR naming the concrete reason, grouped by reason category (eval-gate unmet / incomplete fix / large-PR sign-off / security sign-off), so a human can scan it in seconds rather than re-deriving why each one is still open.

Frequently asked questions

What does the Pr Backlog Triage AI skill do?

Interactively clear a backlog of open amd/gaia PRs to zero (or to a short, justified human-review list) by fanning out one isolated subagent per PR. Use when the user asks to 'audit open PRs', 'triage the backlog', 'fix CI and merge what's safe', or similar — not for reviewing a single named PR someone just opened (that's a normal review), and not for the scheduled nightly audit workflow (see weekly-audit-patterns, a different, automated lens).

Why use Pr Backlog Triage on TypingMind?

Because you install it once and use it with any model. Pr Backlog Triage is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Pr Backlog Triage in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/amd/gaia/tree/main/.claude/skills/pr-backlog-triage. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Pr Backlog Triage?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Pr Backlog Triage?

As many as you like. As long as a model supports skills, you can use Pr Backlog Triage with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Pr Backlog Triage AI skill free?

Yes. It is published on GitHub by amd under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇