Review code changes in dotnet/runtime for correctness, performance, and consistency with project conventions. Use when reviewing PRs or code changes.
70
85%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Review code changes against conventions and patterns established by dotnet/runtime maintainers. These rules were extracted from 43,000+ maintainer review comments across 6,600+ PRs and represent the actual standards enforced in practice.
Reviewer mindset: Be polite but very skeptical. Your job is to help speed the review process for maintainers, which includes not only finding problems the PR author may have missed but also questioning the value of the PR in its entirety. Treat the PR description and linked issues as claims to verify, not facts to accept. Question the stated direction, probe edge cases, and don't hesitate to flag concerns even when unsure.
Use this skill when:
Before analyzing anything, load any and all instructions under .github/instructions that are relevant to the code changes, as indicated by the frontmatter. If conflict arises between said custom instructions and the instructions in this skill, the custom instructions supersede instructions in this skill.
Before analyzing anything, collect as much relevant code context as you can. Critically, do NOT read the PR description, linked issues, or existing review comments yet. You must form your own independent assessment of what the code does, why it might be needed, what problems it has, and whether the approach is sound — before being exposed to the author's framing. Reading the author's narrative first anchors your judgment and makes you less likely to find real problems.
git log --oneline -20 -- <file>). Look for related recent changes, reverts, or prior attempts to fix the same problem. This reveals whether the area is actively churning, whether a similar fix was tried and reverted, or whether the current change conflicts with recent work.ref/ assembly source files (the strongest signal — these define the public API contract)public members (methods, properties, types, enum values) in src/ files.github/skills/code-review/api-approval-check.md (relative to the repository root) and follow its instructions. Do not skip this step — it is blocking..github/agents. Their yaml frontmatter descriptions tell when they apply.Vector64/Vector128/Vector256/Vector512, Vector<T>, or any System.Runtime.Intrinsics.*
namespace usage, also apply the vectorization skill's review checklist (correctness vs. the scalar
contract, remainder handling, memory safety, cross-platform consistency, and BoundedMemory
test coverage). This holds regardless of which folder the change lives in.Based only on the code context gathered above (without the PR description or issue), answer these questions:
Write down your independent assessment before proceeding. You must produce a holistic assessment (using the criteria from the applicable .github/instructions/*.instructions.md files for the diff) at this stage.
Now read the PR description, labels, linked issues (in full), author information, existing review comments, and any related open issues in the same area. Treat all of this as claims to verify, not facts to accept.
.github/skills/code-review/api-approval-check.md (relative to the repository root) and execute the full procedure described there. Use the view tool, cat, or equivalent to read the file contents into your context, then follow every step. This is a blocking gate — if any check in that procedure fails, the review verdict must be ❌ Reject or ❌ Needs Changes regardless of other findings. Do not proceed without completing this step when new public API is detected. If the file cannot be loaded for any reason, report ❌ error — "Unable to load API approval verification procedure; cannot verify new public API surface" — and set the verdict to ❌ Needs Changes.When the environment supports launching sub-agents with different models (e.g., the task tool with a model parameter), run the review in parallel across multiple model families to get diverse perspectives. Different models catch different classes of issues. If the environment does not support this, proceed with a single-model review.
How to execute (when supported):
gpt-5.4 — it has known reliability issues causing sub-agent timeouts in >90% of affected runs. For the OpenAI/GPT family, prefer gpt-5.3-codex if it is explicitly listed as available; otherwise, fall back to the highest-version non-blocked GPT model that satisfies the other rules here.When presenting the final review (whether as a PR comment or as output to the user), use the following structure. This ensures consistency across reviews and makes the output easy to scan.
📝 AI-generated content disclosure: When posting review content to GitHub (PR review comments, PR comments) under a user's credentials — i.e., the account is not a dedicated "copilot" or "bot" account/app (e.g.,
github-actions[bot],copilot) — you MUST include a concise, visible note (e.g. a> [!NOTE]alert) at the bottom of the content indicating the content was AI/Copilot-generated. Skip this if the user explicitly asks you to omit it.
## Holistic Review
**Motivation**: <1-2 sentences on whether the PR is justified and the problem is real>
**Approach**: <1-2 sentences on whether the fix/change takes the right approach>
**Summary**: <✅ LGTM / ⚠️ Needs Human Review / ⚠️ Needs Changes / ❌ Reject>. <2-3 sentence summary of the overall verdict and key points. If "Needs Human Review," explicitly state which findings you are uncertain about and what a human reviewer should focus on.>
---
### Detailed Findings
#### ✅/⚠️/❌ <Category Name> — <Brief description>
<Explanation with specifics. Reference code, line numbers, interleavings, etc.>
(Repeat for each finding category. Group related findings under a single heading.)
<!-- AI disclosure note: place any AI-generated content disclosure below this line. -->
<!-- Example: > [!NOTE] This review was created by GitHub Copilot. -->## Holistic Review, immediately followed by the
**Motivation**:, **Approach**:, and **Summary**: fields in that order. Do not
add a ### Holistic Assessment subheading, substitute a Verdict field, or rename
those fields.The summary verdict must be consistent with the findings in the body. Follow these rules:
The verdict must reflect your most severe finding. If you have any ⚠️ findings, the verdict cannot be "LGTM." Use "Needs Human Review" or "Needs Changes" instead. Only use "LGTM" when all findings are ✅ or 💡 and you are confident the change is correct and complete.
When uncertain, always escalate to human review. If you are unsure whether a concern is valid, whether the approach is sufficient, or whether you have enough context to judge, the verdict must be "Needs Human Review" — not LGTM. Your job is to surface concerns for human judgment, not to give approval when uncertain. A false LGTM is far worse than an unnecessary escalation.
Separate code correctness from approach completeness. A change can be correct code that is an incomplete approach. If you believe the code is right for what it does but the approach is insufficient (e.g., treats symptoms without investigating root cause, silently masks errors that should be diagnosed, fixes one instance but not others), the verdict must reflect the gap — do not let "the code itself looks fine" collapse into LGTM.
Classify each ⚠️ and ❌ finding as merge-blocking or advisory. Before writing your summary, decide for each finding: "Would I be comfortable if this merged as-is?" If any answer is "no," the verdict must be "Needs Changes." If any answer is "I'm not sure," the verdict must be "Needs Human Review."
Devil's advocate check before finalizing. Re-read all your ⚠️ findings. For each one, ask: does this represent an unresolved concern about the approach, scope, or risk of masking deeper issues? If so, the verdict must reflect that tension. Do not default to optimism because the diff is small or the code is obviously correct at a syntactic level.
The detailed review rules -- correctness, performance, API design, style, testing,
documentation, native/interop, and the Holistic PR Assessment criteria -- are maintained
as path-specific instruction files under .github/instructions/ so that the built-in
Copilot code reviewer and this skill share a single source of truth. You MUST load the
files whose applyTo paths match the diff and treat them as the rule set for this
review, in addition to the process above.
Load, based on the paths in the diff:
src/** changed: .github/instructions/review-all-src.instructions.md -- reviewer mindset, the Holistic PR Assessment criteria (Motivation, Evidence, Approach, Cost-Benefit, Scope, Risk, Codebase Fit), correctness philosophy, PR hygiene, consistency, and documentation. Use these criteria to write the Motivation, Approach, and Summary fields in your output.**/*.cs changed: .github/instructions/review-csharp.instructions.md -- C# error handling, thread safety, security, correctness, performance/allocation, API design, and style rules.*.c / *.cpp / *.h / *.inc / *.S / *.asm) changed: .github/instructions/review-native.instructions.md -- C++ style, VM/JIT contracts, GC protection, platform defines, and interop/marshalling rules.**/tests/**, src/tests/**) changed: .github/instructions/review-all-tests.instructions.md -- testing conventions and regression-test requirements..github/instructions/ (for example .github/instructions/review-core-runtime.instructions.md, .github/instructions/jit.instructions.md, .github/instructions/system-net-*.instructions.md, .github/instructions/extensions-*.instructions.md, .github/instructions/compression.instructions.md, .github/instructions/cdac.instructions.md). These stack on top of the language rules. An area instruction file does not imply that a corresponding agent exists; invoke an area agent under .github/agents/ only when it actually exists and applies, as described in Step 2.Vector128/Vector256/Vector512, Vector<T>, or System.Runtime.Intrinsics.* anywhere, apply the vectorization skill in addition to the above. SIMD code appears in arbitrary library files, so this trigger is keyed on content, not folder.If a rule in a more specific file conflicts with a general one, the more specific file wins. If any required instruction file cannot be loaded, note it in the review and fall back to a careful first-principles review of that area.
ba10a6e
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.