Review Triage Phase
prisma/orm
Runs the triage step of the review-framework loop: reads fetched PR review state, builds `review-actions.json`, validates it and renders `review-actions.md`.
Fills in issue-brief.md and pr-decisions.md for an existing pull request, so you can pick up a PR mid-flight with its linked issue and past review decisions summarized.
$ npx skills add pydantic/pydantic-ai-harness --skill adopt-pr -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install pydantic/pydantic-ai-harness adopt-pr --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/pydantic/pydantic-ai-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/adopt-pr .claude/skills/adopt-pr && rm -rf skills-srcUse ~/.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/
Install the "adopt-pr" agent skill from https://github.com/pydantic/pydantic-ai-harness/tree/main/.agents/skills/adopt-pr into .claude/skills/adopt-pr/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adopt-pr", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/pydantic/pydantic-ai-harness/tree/main/.agents/skills/adopt-prType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add pydantic/pydantic-ai-harness --skill adopt-pr -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install pydantic/pydantic-ai-harness adopt-pr --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pydantic/pydantic-ai-harness.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/adopt-pr .agents/skills/adopt-pr && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "adopt-pr" agent skill from https://github.com/pydantic/pydantic-ai-harness/tree/main/.agents/skills/adopt-pr into .agents/skills/adopt-pr/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adopt-pr", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add pydantic/pydantic-ai-harness --skill adopt-pr -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install pydantic/pydantic-ai-harness adopt-pr --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pydantic/pydantic-ai-harness.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/adopt-pr .cursor/skills/adopt-pr && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "adopt-pr" agent skill from https://github.com/pydantic/pydantic-ai-harness/tree/main/.agents/skills/adopt-pr into .cursor/skills/adopt-pr/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adopt-pr", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/pydantic/pydantic-ai-harness.git --path .agents/skills/adopt-pr--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add pydantic/pydantic-ai-harness --skill adopt-pr -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install pydantic/pydantic-ai-harness adopt-pr --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pydantic/pydantic-ai-harness.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/adopt-pr .gemini/skills/adopt-pr && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "adopt-pr" agent skill from https://github.com/pydantic/pydantic-ai-harness/tree/main/.agents/skills/adopt-pr into .gemini/skills/adopt-pr/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adopt-pr", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install pydantic/pydantic-ai-harness adopt-prInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add pydantic/pydantic-ai-harness --skill adopt-pr -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/pydantic/pydantic-ai-harness.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/adopt-pr .github/skills/adopt-pr && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "adopt-pr" agent skill from https://github.com/pydantic/pydantic-ai-harness/tree/main/.agents/skills/adopt-pr into .github/skills/adopt-pr/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adopt-pr", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add pydantic/pydantic-ai-harness --skill adopt-pr -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install pydantic/pydantic-ai-harness adopt-pr --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pydantic/pydantic-ai-harness.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/adopt-pr .opencode/skills/adopt-pr && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "adopt-pr" agent skill from https://github.com/pydantic/pydantic-ai-harness/tree/main/.agents/skills/adopt-pr into .opencode/skills/adopt-pr/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adopt-pr", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
adopt-prFills in issue-brief.md and pr-decisions.md for an existing pull request, so you can pick up a PR mid-flight with its linked issue and past review decisions summarized.
This skill bootstraps branch-context files on a worktree whose pull request already has history. It writes issue-brief.md from the linked issues and the current PR state, and backfills pr-decisions.md with decision-bearing entries taken from review threads that are already resolved. It suits PRs you checked out fresh, PRs you are taking over from someone else, and your own PRs that predate the branch-context setup.
The steps are to read CLAUDE.md for project context, create the branch-context files from their templates if missing, and ask before overwriting a brief that is already populated. The agent then resolves the PR from an argument or the current branch with gh, collects linked issues from the PR's closing references or, failing that, from Fixes, Closes or Resolves keywords in its body, and studies the diff against the merge base. It cautions that an issue's author is no proof the problem is real, and it is not meant for new work with no PR yet.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 4399efa. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
Bash(git:*)Bash(gh:*)Bash(jq:*)Bash(date:*)Bash(ls:*)Bash(cat:*)Bash(cp:*)Bash(.claude/skills/branch-context/*)ReadWrite…and 4 more on the same allowed-tools line.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitghFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Adopt PR Branch Context loads about 1.8k tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 621 words of instructions outside code blocks.
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.
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); files beside SKILL.md are not scanned.
The full file from pydantic/pydantic-ai-harness at commit 4399efa, republished under its MIT licence (© pydantic). 621 words, ~1,751 tokens.
.claude/skills/adopt-pr/SKILL.md (or your agent's skills folder).Populate issue-brief.md and pr-decisions.md for a worktree whose PR already
exists and has history.
Do not use this for fresh work with no PR yet -- write the brief from the linked issue directly.
Bootstrapping presumes the linked issue describes a real problem. If you have not confirmed that, skim the issue before adopting -- authorship (a bot, contributor, or automated sweep) is not proof the problem is real.
CLAUDE.md for project context.cd "$(git rev-parse --show-toplevel)"
D=.claude/skills/branch-context
[ -f "$D/issue-brief.md" ] || cp "$D/issue-brief.template.md" "$D/issue-brief.md"
[ -f "$D/pr-decisions.md" ] || cp "$D/pr-decisions.template.md" "$D/pr-decisions.md"issue-brief.md already has populated issues: frontmatter, ask via
AskUserQuestion whether to overwrite the brief, re-seed decisions, both, or
neither, before proceeding.Parse $ARGUMENTS:
PR_NUMBER=$(gh pr view --json number -q .number 2>/dev/null)AskUserQuestion.Fetch PR metadata:
gh pr view "$PR_NUMBER" --json number,title,url,state,headRefName,body,closingIssuesReferences,createdAt,authorTwo sources, in order:
closingIssuesReferences from the PR metadata (canonical -- set via the PR
sidebar or Fixes #N keywords).(?:Fixes|Closes|Resolves|Relates to) #\d+ if
(1) is empty.For each linked issue:
gh issue view "<N>" --json number,url,title,state,body,labels,commentsIf there is no linked issue and the body has no problem description worth
linking, proceed with issues: [] (free-text problem) -- ask the user whether to
continue or abort.
Understand the code before synthesizing the brief:
git fetch origin main 2>/dev/null || git fetch origin master
MERGE_BASE=$(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD origin/master)
git diff --stat "$MERGE_BASE"..HEAD
git log --oneline "$MERGE_BASE"..HEADMap the changes: which files/modules are touched, which tests exist on the branch (existing tests are implied success criteria), which public symbols changed, any notable new abstractions.
issue-brief.mdUse the schema in issue-brief.template.md. Adaptations for adoption:
related_pr: the PR URL (not TBD -- the PR already exists).branch: git rev-parse --abbrev-ref HEAD.Write to .claude/skills/branch-context/issue-brief.md, overwriting the
template.
pr-decisions.md from resolved threadsFetch resolved review threads via the GraphQL API:
read -r OWNER REPO < <(gh repo view --json owner,name -q '.owner.login + " " + .name')
gh api graphql -f query='
query($owner:String!,$repo:String!,$pr:Int!){
repository(owner:$owner,name:$repo){
pullRequest(number:$pr){
reviewThreads(first:100){ nodes{
isResolved
comments(first:50){ nodes{ author{login} bodyText url path } }
}}
}
}
}' -F owner="$OWNER" -F repo="$REPO" -F pr="$PR_NUMBER" \
--jq '.data.repository.pullRequest.reviewThreads.nodes | map(select(.isResolved))'For each resolved thread, read the full conversation, then classify:
For each decision-bearing thread, append an entry (Source is the root comment's
url):
.claude/skills/branch-context/append-pr-decision.sh \
--title "thread: <short title>" \
--decision "<one-line summary of what was decided>" \
--why "<one-line reason, quoting reviewer or author if concise>" \
--source "<thread URL>" \
--iter "-"Decision budget: aim for <=10 entries. If more resolved threads than that seem worth logging, you are probably over-including noise -- re-apply the filter.
Append one final entry marking the boundary between backfilled decisions (everything above) and live-logged ones (everything below):
.claude/skills/branch-context/append-pr-decision.sh \
--title "adopted PR #<N> at <DATE>" \
--decision "Branch-context bootstrapped from existing PR + issue(s). Decisions above are backfilled from resolved threads." \
--why "PR predates the branch-context setup" \
--source "<PR URL>" \
--iter "-"Print a concise summary:
Adopted PR #<N> -- "<title>"
Issues linked: #<A>, #<B>
Resolved threads seeded: <count> decisions
Unresolved threads (for later triage): <count>Source:. If you cannot find
one, you are over-inferring -- skip it.© pydantic, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/adopt-pr of pydantic/pydantic-ai-harness.
Open the folder on GitHubat commit 4399efa
Adopt PR Branch Context 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Adopt PR Branch Context this skillpydantic/pydantic-ai-harness | 948 | — | ~1.8k | Automated safety check: Pass | MIT | |
| Review Triage Phaseprisma/orm | 48k | — | ~995 | Automated safety check: Pass | Apache-2.0 | |
| Understand Diff AnalysisEgonex-AI/Understand-Anything | 86k | 1 repos | ~1.4k | Automated safety check: Pass | MIT | |
| Open Code Review CLIalibaba/open-code-review | 44k | — | ~3.1k | Automated safety check: Pass | Apache-2.0 | |
| Code Reviewflutter/flutter | 179k | — | ~1.4k | Automated safety check: Pass | BSD-3-Clause | |
| PR Review State Fetchprisma/orm | 48k | — | ~767 | Automated safety check: Pass | Apache-2.0 |
prisma/orm
Runs the triage step of the review-framework loop: reads fetched PR review state, builds `review-actions.json`, validates it and renders `review-actions.md`.
Egonex-AI/Understand-Anything
Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.
alibaba/open-code-review
Runs the ocr command-line tool to review Git changes, a commit or a branch comparison with an AI model, returning line-level comments and optionally applying fixes.
flutter/flutter
Performs a comprehensive, multi-step code review of pull requests or local code changes, using iterative refinement (generation, critique, synthesis) to ensure high-quality, actionable feedback.
prisma/orm
Fetches a pull request's canonical review state as JSON, validates it, and renders markdown, a text summary and triage target files from it using bundled scripts.
tirth8205/code-review-graph
Reviews a pull request or branch diff with a code knowledge graph and produces a structured review that includes blast-radius analysis.
pydantic/pydantic-ai-harness
Keeps a branch-local issue brief, decision log and session handoffs so a pull request's context survives across separate agent sessions.
pydantic/pydantic-ai-harness
What to do when you open a PR and every time you push -- label the PR, watch CI to green, triage every review comment to a reply and a reaction, and escalate genuine design trade-offs to maintainers.
Works with
Categories
Fills in issue-brief.md and pr-decisions.md for an existing pull request, so you can pick up a PR mid-flight with its linked issue and past review decisions summarized. This skill bootstraps branch-context files on a worktree whose pull request already has history.md with decision-bearing entries taken from review threads that are already resolved.
Adopt PR Branch Context fits situations like: picking up someone else's pull request that has no local context; backfilling a brief for your own PR that predates the branch-context setup; recovering the decisions made in already-resolved review threads.
Run `npx skills add pydantic/pydantic-ai-harness --skill adopt-pr -a claude-code`. Or copy the skill folder (.agents/skills/adopt-pr in pydantic/pydantic-ai-harness) into .claude/skills/adopt-pr in your project. Claude Code loads it when a task matches its description.
Run `npx skills add pydantic/pydantic-ai-harness --skill adopt-pr -a codex`. Or copy the skill folder (.agents/skills/adopt-pr in pydantic/pydantic-ai-harness) into .agents/skills/adopt-pr in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pydantic/pydantic-ai-harness --skill adopt-pr -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/adopt-pr, .gemini/skills/adopt-pr, .github/skills/adopt-pr and .opencode/skills/adopt-pr in your project.
Going by SKILL.md and its folder, Adopt PR Branch Context needs the command-line tools its instructions call (git and gh). Our summary lists: The gh CLI authenticated for the repository; A worktree with the PR branch checked out; The branch-context skill files in the repository. Its frontmatter pre-approves these tools: Bash(git:*), Bash(gh:*), Bash(jq:*), Bash(date:*), Bash(ls:*), Bash(cat:*), Bash(cp:*), Bash(.claude/skills/branch-context/*), Read, Write, Edit, Glob, Grep, AskUserQuestion.
SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
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. Review the folder before installing.
Adopt PR Branch Context is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Adopt PR Branch Context: Review Triage Phase (prisma/orm, 48k stars), Understand Diff Analysis (Egonex-AI/Understand-Anything, 86k stars), Open Code Review CLI (alibaba/open-code-review, 44k stars) and Code Review (flutter/flutter, 179k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
pydantic (a GitHub organization, an official publisher) maintains it in pydantic/pydantic-ai-harness, which has 948 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 2, 2026.
Source: pydantic/pydantic-ai-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.