NuGet/NuGet.Client PR Review
Review pull requests the way NuGet/NuGet.Client's senior maintainers do.
Requires shell access (git/dotnet).
Work in four phases: Set up, Understand and verify, Judge, and Report.
Set up
Pick the mode that matches whose change you're reviewing.
Mode A — someone else's PR (default): isolated workspace
Use this when the change is on a branch or PR you don't have locally, so your git/dotnet commands never disturb anyone's active checkout.
- Workspace path:
%LOCALAPPDATA%\GitHubCopilot\ReviewSkill\NuGet.Client — reused across reviews, so the clone is a one-time cost.
- Clone or update: clone if missing, else
git -C {workspace} fetch origin.
- Get the PR:
git -C {workspace} fetch origin pull/{PR}/head:pr-{PR} then git -C {workspace} checkout pr-{PR}; for a branch, git -C {workspace} fetch origin {branch} then check it out.
- Restore when done:
git -C {workspace} checkout -.
Mode B — your own or a local change: review the existing clone
Use this when the reviewer is the author, already has the branch in their NuGet.Client clone, or wants to review uncommitted local edits before committing.
- Skip the clone and checkout — work in the reviewer's existing NuGet.Client clone (use the current working directory if it is one, otherwise ask for the path).
- Do not switch branches or touch the working tree — review whatever is currently checked out, including uncommitted work.
- Pick the diff to review: uncommitted (
git diff), staged (git diff --staged), or the current branch against its base — ask which if it's ambiguous.
Default to Mode A when given a PR number or a branch you don't have locally; default to Mode B when invoked with no argument, with local/current, or when the reviewer says they're reviewing their own or in-progress change.
Build and debug — read the repo's own runbooks, don't guess
- Build/test/debug (incl. cross-platform): read
docs/debugging.md, docs/cross-platform-debugging.md, and CONTRIBUTING.md.
- Build and test ONLY the affected project(s), never the whole solution — a full NuGet.Client build/test is very slow.
Build the changed project and run just the test project(s) that cover the change.
Understand and verify
Scope by area and read the matching repo guideline before reviewing those files:
| Changed area |
Read before reviewing |
src/NuGet.Core/** restore/resolution/protocol |
docs/coding-guidelines.md |
src/NuGet.Clients/** (VS/WPF) |
docs/ui-guidelines.md, docs/coding-guidelines.md |
user-facing strings / *.resx |
docs/localizability.md |
| API / type design |
docs/design-review-guide.md |
test/** |
docs/coding-guidelines.md (test conventions) |
Trace beyond the diff — mandatory for any behavior/correctness finding.
The bug usually lives in how a caller consumes the changed value, not in the diff.
For every changed method whose return value, branch, or side effect changes:
- Open its direct callers and callees, across project/assembly boundaries — a value that looks benign at the change site can violate an assumption a consumer in another assembly relies on.
- Enumerate the behavioral cases the change can take and state which path each hits — the distinct input shapes, config/environment states, and success vs. empty/failure results the code can encounter.
- A new
return null / empty / short-circuit / early-exit is not reviewed until you have read what every consumer does with it.
Verify, don't guess. Run the affected test(s) or reproduce the path; otherwise cite the exact code path that proves the finding.
Never assert the direction of a behavior change from the diff alone.
If you can't confirm it, say so and flag it — do not clear a concern as a non-issue without tracing it.
Judge (review priorities)
Hold each change to the guideline doc for its area (the Understand and verify table) — check the written rule, don't rely on memory.
Surface findings in this priority order:
- Correctness and tests (most frequent) — a behavior change must ship a test that fails without the fix; verify boundaries and every consumer of a new early-exit (see Understand and verify).
- Performance
- API surface — treat public API /
PublicAPI.*.txt as a permanent commitment; otherwise per design-review-guide.md.
- Conventions — rules per
coding-guidelines.md.
- VS/IDE (
src/NuGet.Clients/**) — per ui-guidelines.md.
- Localization / telemetry / maintainability — per
localizability.md and coding-guidelines.md.
- Process hygiene — focused scope; PR template with a linked
Fixes: issue; tracking issue for deferred work.
Severity
- [blocking] — correctness bugs; a missing or ineffective test for a behavior change; or an unverified behavior change on a hot path (defaults to [blocking] until a test pins the behavior or the author confirms intent).
- [suggestion] — Need to be addressed before merge, but not a correctness bug. Examples: performance, API surface, conventions, VS/IDE, localization, telemetry, maintainability, or process hygiene.
- [nit] — does not need to be addressed before merge, but would improve the PR. Examples: style, naming, comments, or minor refactoring.
Report
For each finding:
[severity] path/to/File.cs:Line — <one-line problem>
Why: <impact in 1 sentence>
Suggest: <concrete fix>
Then a verdict:
- Request changes if any [blocking] finding exists, or if an unresolved behavior-change question remains open (never "Approve" while a behavior change is unverified).
- Approve with suggestions if only [suggestion]/[nit].
- Approve if clean.
Be concise, cite file:line, give an actionable fix for every finding, and state which projects you built and which tests you ran.
1---2name: pr-review3description: Reviews a NuGet/NuGet.Client pull request like a senior maintainer — reviews in an isolated workspace by default, or against the reviewer's existing clone (self-review / local changes), builds and tests the affected projects, traces changes across files, and returns high-signal, severity-tagged findings with a merge verdict. Invoke explicitly with a PR number or branch.4---5# NuGet/NuGet.Client PR Review67Review pull requests the way NuGet/NuGet.Client's senior maintainers do.89**Requires shell access** (`git`/`dotnet`).1011Work in four phases: **Set up, Understand and verify, Judge, and Report.**1213---1415## Set up1617Pick the mode that matches whose change you're reviewing.1819### Mode A — someone else's PR (default): isolated workspace20Use this when the change is on a branch or PR you don't have locally, so your `git`/`dotnet` commands never disturb anyone's active checkout.211. **Workspace path:** `%LOCALAPPDATA%\GitHubCopilot\ReviewSkill\NuGet.Client` — reused across reviews, so the clone is a one-time cost.222. **Clone or update:** clone if missing, else `git -C {workspace} fetch origin`.233. **Get the PR:** `git -C {workspace} fetch origin pull/{PR}/head:pr-{PR}` then `git -C {workspace} checkout pr-{PR}`; for a branch, `git -C {workspace} fetch origin {branch}` then check it out.244. **Restore when done:** `git -C {workspace} checkout -`.2526### Mode B — your own or a local change: review the existing clone27Use this when the reviewer is the author, already has the branch in their NuGet.Client clone, or wants to review uncommitted local edits before committing.28- **Skip the clone and checkout** — work in the reviewer's existing NuGet.Client clone (use the current working directory if it is one, otherwise ask for the path).29- **Do not switch branches or touch the working tree** — review whatever is currently checked out, including uncommitted work.30- **Pick the diff to review:** uncommitted (`git diff`), staged (`git diff --staged`), or the current branch against its base — ask which if it's ambiguous.3132Default to Mode A when given a PR number or a branch you don't have locally; default to Mode B when invoked with no argument, with `local`/`current`, or when the reviewer says they're reviewing their own or in-progress change.3334### Build and debug — read the repo's own runbooks, don't guess35- Build/test/debug (incl. cross-platform): read **`docs/debugging.md`**, **`docs/cross-platform-debugging.md`**, and **`CONTRIBUTING.md`**.36- **Build and test ONLY the affected project(s), never the whole solution** — a full NuGet.Client build/test is very slow.37 Build the changed project and run just the test project(s) that cover the change.3839---4041## Understand and verify42431. **Scope by area** and read the matching repo guideline before reviewing those files:44 | Changed area | Read before reviewing |45 |---|---|46 | `src/NuGet.Core/**` restore/resolution/protocol | `docs/coding-guidelines.md` |47 | `src/NuGet.Clients/**` (VS/WPF) | `docs/ui-guidelines.md`, `docs/coding-guidelines.md` |48 | user-facing strings / `*.resx` | `docs/localizability.md` |49 | API / type design | `docs/design-review-guide.md` |50 | `test/**` | `docs/coding-guidelines.md` (test conventions) |51522. **Trace beyond the diff — mandatory for any behavior/correctness finding.**53 The bug usually lives in how a *caller* consumes the changed value, not in the diff.54 For every changed method whose **return value, branch, or side effect changes**:55 - Open its direct **callers and callees, across project/assembly boundaries** — a value that looks benign at the change site can violate an assumption a consumer in another assembly relies on.56 - Enumerate the behavioral cases the change can take and state which path each hits — the distinct input shapes, config/environment states, and success vs. empty/failure results the code can encounter.57 - A new `return null` / empty / short-circuit / early-exit is **not reviewed** until you have read what every consumer does with it.58593. **Verify, don't guess.** Run the affected test(s) or reproduce the path; otherwise cite the exact code path that proves the finding.60 **Never assert the *direction* of a behavior change from the diff alone.**61 If you can't confirm it, say so and flag it — do not clear a concern as a non-issue without tracing it.6263---6465## Judge (review priorities)6667Hold each change to the guideline doc for its area (the *Understand and verify* table) — check the written rule, don't rely on memory.68Surface findings in this priority order:69701. **Correctness and tests** (most frequent) — a behavior change must ship a test that *fails without the fix*; verify boundaries and every consumer of a new early-exit (see *Understand and verify*).712. **Performance**723. **API surface** — treat public API / `PublicAPI.*.txt` as a permanent commitment; otherwise per `design-review-guide.md`.734. **Conventions** — rules per `coding-guidelines.md`.745. **VS/IDE** (`src/NuGet.Clients/**`) — per `ui-guidelines.md`.756. **Localization / telemetry / maintainability** — per `localizability.md` and `coding-guidelines.md`.767. **Process hygiene** — focused scope; PR template with a linked `Fixes:` issue; tracking issue for deferred work.7778### Severity79- **[blocking]** — correctness bugs; a missing or ineffective test for a behavior change; or an unverified behavior change on a hot path (defaults to **[blocking]** until a test pins the behavior or the author confirms intent).80- **[suggestion]** — Need to be addressed before merge, but not a correctness bug. Examples: performance, API surface, conventions, VS/IDE, localization, telemetry, maintainability, or process hygiene.81- **[nit]** — does not need to be addressed before merge, but would improve the PR. Examples: style, naming, comments, or minor refactoring.8283---8485## Report8687For each finding:88```89[severity] path/to/File.cs:Line — <one-line problem>90Why: <impact in 1 sentence>91Suggest: <concrete fix>92```93Then a **verdict**:94- **Request changes** if any [blocking] finding exists, **or if an unresolved behavior-change question remains open** (never "Approve" while a behavior change is unverified).95- **Approve with suggestions** if only [suggestion]/[nit].96- **Approve** if clean.9798Be concise, cite `file:line`, give an actionable fix for every finding, and state which projects you built and which tests you ran.