Official agent skill

PR Finalize Review

by microsoft in microsoft/garnet

Checks that a pull request's title and description match its implementation and reviews the code for Garnet best practices, reporting findings without posting them.

OfficialMITAuto-check passedDevelopment

Install PR Finalize Review

skills CLI
$ npx skills add microsoft/garnet --skill pr-finalize -a claude-code

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

GitHub CLI
$ gh skill install microsoft/garnet pr-finalize --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/microsoft/garnet.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/pr-finalize .claude/skills/pr-finalize && 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-finalize
GitHub stars
12k
Token cost
~3.1k tokens
SKILL.md length
1,099 words
Files
2 (incl. references)
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Checks that a pull request's title and description match its implementation and reviews the code for Garnet best practices, reporting findings without posting them.

  • Works in 5 steps: NEVER Approve or Request Changes → NEVER Post Comments Directly → Review Existing Description Quality → …
  • Checking a PR description against the diff before merging
  • SKILL.md covers Two-Phase Workflow, 🚨 CRITICAL RULES, Phase 1: Title & Description and Usage, plus 8 more sections
  • Calls gh and git

What it does

Two phases run before a merge. The first compares the PR title and description with the actual diff, and the second reviews the code for best practices specific to the Garnet project. The skill is standalone, so it can run on any PR, and it reads the PR state through the gh CLI with no local checkout needed.

Strict rules make it analysis only: the agent must never approve, request changes or post comments with gh commands, and instead presents findings to you so that people control what gets posted. For descriptions, it first judges the existing text on structure, technical depth, scannability and accuracy, preserves good descriptions, adds missing items such as issue links or test info, and rewrites only when the text is stale, wrong or incomplete.

A reference file holds a complete worked example, and the skill is explicitly not meant for extracting lessons from a PR or for investigating build failures.

When your agent uses it

  • Checking a PR description against the diff before merging
  • Reviewing a commit message or title after the implementation changed
  • Getting a best-practices code review on a Garnet PR

Example prompts

  • “Finalize the pull request for this branch and tell me if the description is stale.”
  • “Check whether the PR title still matches what the code now does.”
  • “Review this PR for Garnet best practices without posting any comments.”

Requirements

  • GitHub CLI (`gh`) with access to the pull request

Workflow steps

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

  1. NEVER Approve or Request Changes
  2. NEVER Post Comments Directly
  3. Review Existing Description Quality
  4. Compare to Template
  5. Produce Output

What it can do on your machine

Read from SKILL.md and the folder at commit 653bb32. 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

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

  • Network

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

PR Finalize Review loads about 3.1k tokens when it runs, and up to ~3.9k if it reads all its reference files. Until then it costs about 90 tokens; SKILL.md has 1,099 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~90
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.9k

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

SKILL.md

The full file from microsoft/garnet at commit 653bb32, republished under its MIT licence (© microsoft). 1,099 words, ~3,060 tokens.

Download SKILL.mdSave it as .claude/skills/pr-finalize/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
pr-finalize
description
Finalizes any PR for merge by verifying title/description match implementation AND performing code review for best practices. Use when asked to "finalize PR", "check PR description", "review commit message", before merging any PR, or when PR implementation changed during review. Do NOT use for extracting lessons or investigating build failures.

PR Finalize

Ensures PR title and description accurately reflect the implementation, and performs a code review for Garnet best practices before merge.

Standalone skill — Can be used on any PR.

Two-Phase Workflow

  1. Title & Description Review — Verify PR metadata matches implementation
  2. Code Review — Review code for Garnet-specific best practices and potential issues

🚨 CRITICAL RULES

1. NEVER Approve or Request Changes

AI agents must NEVER use --approve or --request-changes flags.

ActionAllowed?Why
gh pr review --approve❌ NEVERApproval is a human decision
gh pr review --request-changes❌ NEVERBlocking PRs is a human decision
2. NEVER Post Comments Directly

This skill is ANALYSIS ONLY. Never post comments using gh commands.

ActionAllowed?Why
gh pr review --comment❌ NEVERPresent findings to the user instead
gh pr comment❌ NEVERPresent findings to the user instead
Analyze and report findings✅ YESThis is the skill's purpose

Only humans control when comments are posted. Your job is to analyze and present findings.


Phase 1: Title & Description

Core Principle: Preserve Quality

Review existing description BEFORE suggesting changes. Many PR authors write excellent, detailed descriptions. Your job is to:

  1. Evaluate first — Is the existing description good? Better than a template?
  2. Preserve quality — Don't replace a thorough description with a generic template
  3. Enhance, don't replace — Add missing required elements (issue links, test info) without rewriting good content
  4. Only rewrite if needed — When description is stale, inaccurate, or missing key information

Usage

bash
# Get current state (no local checkout required)
gh pr view XXXXX --json title,body
gh pr view XXXXX --json files --jq '.files[].path'

# Review commit messages (helpful for squash/merge commit quality)
gh pr view XXXXX --json commits --jq '.commits[].messageHeadline'

# Review actual code changes
gh pr diff XXXXX

# Optional: if the PR branch is checked out locally
git diff origin/main...HEAD

Evaluation Workflow

Step 1: Review Existing Description Quality

Before suggesting changes, evaluate the current description:

Quality IndicatorLook For
StructureClear sections, headers, organized flow
Technical depthFile-by-file changes, specific code references
ScannabilityEasy to find what changed and where
AccuracyMatches actual diff — not stale or incorrect
CompletenessBreaking changes, performance impact, testing info
Step 2: Compare to Template

Ask: "Is the existing description better than what my template would produce?"

  • If YES: Keep existing, only add missing required elements
  • If NO: Suggest improvements or replacement
Step 3: Produce Output
  • Recommended PR title (if change needed)
  • Assessment of existing description
  • Specific additions needed (e.g., "Add issue link", "Mention breaking change")
  • Only full replacement if description is inadequate

Title Requirements

The title becomes the commit message headline. Make it searchable and informative.

RequirementGoodBad
Component prefix (if specific)[Cluster] Fix gossip protocol timeoutFix timeout
Describes behavior, not issue[RESP] ZADD: Support GT/LT flagsFix #123
Captures the "what"[Tsavorite] Reduce lock contention in RMWFix perf bug
Notes breaking change if applicable(breaking)(omitted)
No noise prefixes[Storage] Fix...[PR agent] Fix...
Title Formula
[Component] What changed (breaking if applicable)

Component prefixes (use when change is scoped):

  • [RESP] — RESP command parsing/dispatch (libs/server/Resp/)
  • [Storage] — Storage session/functions (libs/server/Storage/)
  • [Tsavorite] — Tsavorite engine (libs/storage/Tsavorite/)
  • [Cluster] — Cluster/replication/sharding (libs/cluster/)
  • [Objects] — Object types: Hash, List, Set, SortedSet (libs/server/Objects/)
  • [API] — Garnet API surface (libs/server/API/)
  • [Network] — Networking/TLS (libs/common/Networking/)
  • [Config] — Configuration/options (libs/host/Configuration/)
  • [Tests] — Test-only changes
  • [Docs] — Documentation-only changes
  • Omit prefix for cross-cutting changes

Examples:

  • [RESP] ZADD: Support GT/LT flags for conditional updates
  • [Tsavorite] Reduce epoch protection overhead in hot-path RMW
  • [Cluster] Fix replication lag during key migration
  • Add multi-database support for standalone mode

Description Requirements

PR description should:

  1. Link to the GitHub Issue
  2. Describe what changed and why
  3. Match the actual implementation
markdown
### Description of Change

[Must match actual implementation]

### Issues Fixed

Fixes #XXXXX

Content for Future Agents

The title and description become the commit message. Future agents searching git history will use this to understand:

  • What changed and why
  • What patterns to follow or avoid
  • How this change affects related code
Required Elements for Agent Success
ElementPurposeExample
Component in titleScoped search[Tsavorite] ...
Root cause (bug fixes)Understand failure mode"Epoch was not released on error path"
Description of changeWhat code does now"Added GT/LT flag parsing in ZADD handler"
Key types/interfacesAPI surface awarenessIGarnetApi, StorageSession, CustomRawStringFunctions
What NOT to doPrevent repeat mistakes"Don't allocate on RMW hot path"
Show full SKILL.md (468 more words)Show less
ElementWhen to Include
Root causeBug fixes — explain why the bug occurred
Key technical detailsComplex changes — list affected types and interfaces
What NOT to doWhen failed approaches were attempted
Edge casesWhen behavior differs across scenarios
Performance impactWhen change affects hot paths or memory allocation
Breaking changesWhen API or behavior changes affect consumers
Migration guideWhen users/extensions need to update

Description Template (for Inadequate Descriptions)

Use this only when the existing description is stale, inaccurate, or missing key information:

markdown
### Root Cause

[Why the bug occurred — be specific about the code path]

### Description of Change

[What the code now does]

**Key changes:**
- [Change 1]
- [Change 2]

### Key Technical Details

**Affected types/interfaces:**
- `TypeA` — [What it does]
- `TypeB` — [What it does]

### What NOT to Do (for future agents)

- ❌ **Don't [approach 1]** — [Why it fails]
- ❌ **Don't [approach 2]** — [Why it's wrong]

### Edge Cases

| Scenario | Risk | Mitigation |
|----------|------|------------|
| [Case 1] | Low/Medium/High | [How to handle] |

### Issues Fixed

Fixes #XXXXX

Quality Comparison Examples

Good Existing Description (KEEP)
markdown
## Changes

### `libs/server/Resp/Objects/SortedSetCommands.cs`
- Added GT/LT flag parsing in ZADD command handler
- Flag validation against NX (mutually exclusive)

### `libs/server/Objects/SortedSet/SortedSetObjectImpl.cs`
- Implemented conditional update logic in SortedSetAdd
- GT: only update if new score > current; LT: only if new score < current

### `libs/server/Storage/Session/ObjectStore/SortedSetOps.cs`
- Passed flags through ObjectInput to the object implementation

## Tests Added
- `RespSortedSetTests.ZAddWithGTFlag` — verifies GT-only updates
- `RespSortedSetTests.ZAddWithLTFlag` — verifies LT-only updates
- `RespSortedSetTests.ZAddGTNXMutuallyExclusive` — verifies error on GT+NX

Verdict: Excellent — file-by-file breakdown, specific changes, tests listed. Keep it.

Poor Existing Description (REWRITE)
markdown
Fixed the issue mentioned in #456

Verdict: Inadequate — no detail on what changed. Use template.


Phase 2: Code Review

After verifying title/description, perform a code review to catch Garnet-specific issues and general best practice violations before merge.

Review Focus Areas

When reviewing code changes in Garnet, focus on:

  1. Performance and memory safety

    • Unnecessary heap allocations on hot paths (prefer Span<T>, SpanByte, stack allocation)
    • Missing [MethodImpl(MethodImplOptions.AggressiveInlining)] on hot-path methods
    • Missing [MethodImpl(MethodImplOptions.NoInlining)] on cold/exception-throwing methods
    • Blocking calls or unnecessary copies in RESP command handlers
  2. Epoch management

    • LightEpoch acquired but not released on error paths
    • Epoch ownership — only dispose if owned
    • Shared epochs in parallel test scenarios
  3. RESP protocol correctness

    • Argument parsing via parseState.GetArgSliceByRef(i) returning ref PinnedSpanByte
    • Correct RESP response format (using RespWriteUtils helpers)
    • Proper SendAndReset() calls to flush response buffer
    • Command dispatch wired in ProcessBasicCommands/ProcessArrayCommands
  4. Thread safety and concurrency

    • Proper lock usage (TryWriteLock() in spin loops, not CloseLock())
    • Safe concurrent access to shared state
    • Session-local vs shared state boundaries
  5. Test quality

    • TestBase inheritance on test fixtures
    • TestUtils.OnTearDown() called in [TearDown] (checks for leaked epochs)
    • TestUtils.DeleteDirectory(TestUtils.MethodTestDir, wait: true) in [SetUp]
    • Both StackExchange.Redis and LightClient coverage where applicable
  6. Code conventions

    • File header: // Copyright (c) Microsoft Corporation. / // Licensed under the MIT license.
    • TreatWarningsAsErrors — no new warnings introduced
    • XML doc comments on public methods
    • Consistent naming (camelCase private fields, PascalCase constants/statics)
  7. Breaking changes and API surface

    • Changes to IGarnetApi / IGarnetReadApi / IGarnetAdvancedApi
    • Changes to custom extension base classes (CustomRawStringFunctions, CustomObjectBase, etc.)
    • Configuration option changes in GarnetServerOptions
How to Review
bash
# Get the PR diff
gh pr diff XXXXX

# Review specific files
gh pr diff XXXXX -- path/to/file.cs

# Check CI status
gh pr view XXXXX --json statusCheckRollup
Output Format
markdown
## Code Review Findings

### 🔴 Critical Issues

**[Issue Title]**
- **File:** [path/to/file.cs]
- **Problem:** [Description]
- **Recommendation:** [Code fix or approach]

### 🟡 Suggestions

- [Suggestion 1]
- [Suggestion 2]

### ✅ Looks Good

- [Positive observation 1]
- [Positive observation 2]
🚨 CRITICAL: Do NOT Post Comments Directly

The pr-finalize skill is ANALYSIS ONLY. Never post comments using gh pr review or gh pr comment.

ActionAllowed?Why
gh pr review --comment❌ NEVERPresent findings to the user instead
gh pr comment❌ NEVERPresent findings to the user instead
Analyze and report findings✅ YESThis is the skill's purpose

Workflow:

  1. This skill: Analyze PR, produce findings in your response
  2. User asks to post: User decides whether and how to share feedback

The user controls when comments are posted. Your job is to analyze and present findings.


Complete Example

See references/complete-example.md for a full agent-optimized PR description showing all elements above applied to a real Garnet change.

© microsoft, 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 (references) in .github/skills/pr-finalize of microsoft/garnet.

  • SKILL.md
  • references/complete-example.md

Open the folder on GitHubat commit 653bb32

Compare with similar skills

PR Finalize Review 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 Finalize Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PR Finalize Review this skillmicrosoft/garnet12k—~3.1kAutomated safety check: PassMIT
PR Finalizedotnet/maui23k—~3.1kAutomated safety check: PassMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
GitHub Review Iterationprisma/orm48k—~2.2kAutomated safety check: PassApache-2.0
PR Review State Fetchprisma/orm48k—~767Automated safety check: PassApache-2.0
Fastlane Pull Request Reviewfastlane/fastlane42k—~550Automated safety check: PassMIT

Similar skills

  • PR Finalize

    dotnet/maui

    Official

    Checks that a pull request's title and description match its implementation and reviews the code for best practices before merge, without posting anything.

    23k GitHub stars~3.1k tokensUpdated today
    DevelopmentAuto-check passed
  • 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
  • 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 today
    DevelopmentAuto-check passed
  • Official

    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.

    48k GitHub stars~767 tokensUpdated today
    DevelopmentAuto-check passed
  • Reviews a fastlane pull request against its linked issue and the project guides, separating blocking from non-blocking findings and handling vulnerabilities privately.

    42k GitHub stars~550 tokensUpdated today
    DevelopmentAuto-check passed
  • React Router Pull Request Creator

    remix-run/react-router

    Packages finished React Router work into a draft pull request: branch, commit, push, a written PR body and the right GitHub labels.

    57k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed

More from microsoft/garnet

  • Add Garnet RESP Command

    microsoft/garnet

    Official

    Step-by-step guide for adding a new built-in RESP command to Garnet, from the command enum and parser to storage callbacks, command metadata JSON and tests.

    12k GitHub stars~9.7k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about PR Finalize Review

What does PR Finalize Review do?

Checks that a pull request's title and description match its implementation and reviews the code for Garnet best practices, reporting findings without posting them. Two phases run before a merge. The first compares the PR title and description with the actual diff, and the second reviews the code for best practices specific to the Garnet project.

When should I use PR Finalize Review?

PR Finalize Review fits situations like: checking a PR description against the diff before merging; reviewing a commit message or title after the implementation changed; getting a best-practices code review on a Garnet PR.

How do I install PR Finalize Review in Claude Code?

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

How do I install PR Finalize Review in Codex?

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

Can I use PR Finalize Review 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 microsoft/garnet --skill pr-finalize -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-finalize, .gemini/skills/pr-finalize, .github/skills/pr-finalize and .opencode/skills/pr-finalize in your project.

What does PR Finalize Review need to run?

Going by SKILL.md and its folder, PR Finalize Review needs the command-line tools its instructions call (gh and git). Our summary lists: GitHub CLI (`gh`) with access to the pull request.

Does PR Finalize Review access the network?

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

Is PR Finalize Review 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. Review the folder before installing.

What licence does PR Finalize Review use?

PR Finalize Review 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 Finalize Review use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 798 tokens, read only when the agent opens those files.

What are the alternatives to PR Finalize Review?

Skills that share tags, products or a category with PR Finalize Review: PR Finalize (dotnet/maui, 23k stars), PR Babysitter (openinterpreter/openinterpreter, 69k stars), GitHub Review Iteration (prisma/orm, 48k stars) and PR Review State Fetch (prisma/orm, 48k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PR Finalize Review?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/garnet, which has 12,042 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 7, 2026.

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