Deep code review of PR changes for correctness, safety, and MAUI conventions. Uses independence-first assessment (code before narrative) with 345 lines of maintainer-sourced review rules. Triggers on: "review code for PR", "code review PR", "analyze code changes", "check PR code quality". Do NOT use for: summarizing PRs, describing what changed, general PR questions, running tests, or fixing code.
Standalone skill that evaluates PR code changes for correctness, safety, performance, and consistency with .NET MAUI conventions. Can be invoked directly by users or by other agents/skills.
Trigger phrases: "review code for PR #XXXXX", "code review PR #XXXXX", "review this PR's code", "analyze code changes in PR", "check PR code quality"
Do NOT use for: "what does PR #XXXXX do?", "summarize PR", "describe the changes", or any informational query — just answer those directly without invoking this skill.
How this differs from other skills:
pr-review— End-to-end PR workflow (4 phases: pre-flight, gate, try-fix, report). Use when you want the full pipeline including test verification and fix attempts.pr-finalize— Verifies PR title/description match implementation + light code review. Use before merging.code-review(this skill) — Deep code-only review with MAUI domain rules. Use when you want a thorough code analysis without running tests or modifying the PR.
| Input | Required | Description |
|---|---|---|
| pr_number | Yes | GitHub PR number to review |
| Field | Description |
|---|---|
verdict | LGTM, NEEDS_CHANGES, or NEEDS_DISCUSSION |
confidence | high, medium, or low |
findings | Categorized findings with severity levels |
Do NOT read the PR description or issue yet.
Get the diff:
gh pr diff <PR_NUMBER>
Read full source files for every changed file (not just diff hunks):
gh pr diff <PR_NUMBER> --name-only
# Then read each file in full
Check callers and consumers of changed methods/properties:
findReferences and incomingCalls for modified symbolsReview git history of changed files:
git log --oneline -10 -- <changed-file>
Read .github/skills/code-review/references/review-rules.md. These rules are distilled from real code reviews by senior MAUI maintainers across 142 high-discussion PRs.
Based ONLY on the code (no PR description), answer:
Now read the PR description, linked issue, and comments. Treat these as claims to verify, not facts.
gh pr checks <PR_NUMBER>
Review CI results. Never post ✅ LGTM if any required CI check is failing. If CI is failing:
Before finalizing your verdict:
Then deliver your verdict:
LGTM — Code is correct, safe, and consistent with MAUI patterns. Ready for human approval.NEEDS_CHANGES — Concrete issues found that should be addressed before merge.NEEDS_DISCUSSION — Complex tradeoffs or architectural questions that need human judgment.Apply the rules in references/review-rules.md to each changed file. The rules are distilled from real code reviews across 142 high-discussion PRs and cover 20 categories:
Platform & Lifecycle: Handler lifecycle, platform-specific code, Android, iOS/macCatalyst, Windows Architecture: Memory management, threading, safe area, layout, navigation, CollectionView Code Quality: Error handling, null safety, performance, XAML & bindings, API design Ecosystem: Testing, build & MSBuild, image handling, gestures, accessibility
The rules file also includes a "What NOT to Flag" section — respect it to avoid noise.
When the environment supports multiple models, run the review in parallel for diverse perspectives. Different model families catch different classes of issues.
How:
Timeout: If a sub-agent hasn't completed after 5 minutes, proceed with available results.
Constraints (from Android team's approach):
## Code Review — PR #XXXXX
### Independent Assessment
**What this changes:** [Your understanding from code alone]
**Inferred motivation:** [Why this change seems needed]
### Reconciliation with PR Narrative
**Author claims:** [Summary of PR description]
**Agreement/disagreement:** [Where your assessment matches or differs]
### Findings
#### ❌ Error — [Brief description]
[Explanation with specific file:line references]
#### ⚠️ Warning — [Brief description]
[Explanation with specific file:line references]
#### 💡 Suggestion — [Brief description]
[Explanation]
### Devil's Advocate
[Challenges to your own conclusions]
### Verdict: LGTM / NEEDS_CHANGES / NEEDS_DISCUSSION
**Confidence:** high / medium / low
**Summary:** [2-3 sentences explaining the verdict]
NEEDS_CHANGES. If only ⚠️ Warnings, use judgment but explain.NEEDS_DISCUSSION.--approve or --request-changes on GitHub. Only post comments. Approval is a human decision.gh pr review --comment) unless explicitly asked by the user or orchestrated by another agent. This matches pr-finalize policy.After completing your review, suggest using the Post-CodeReview.ps1 script to format and post the comment. Do NOT post automatically - always let the user decide when to post.
# Save your review to a file, then suggest:
pwsh .github/scripts/Post-CodeReview.ps1 -PRNumber <PR_NUMBER> -ReviewFile /tmp/review.md -DryRun
# User can then post when ready:
pwsh .github/scripts/Post-CodeReview.ps1 -PRNumber <PR_NUMBER> -ReviewFile /tmp/review.md
The script wraps the review in a collapsible <details> section, adds PR metadata (commit SHA, title), and auto-detects the verdict for a colored status dot (🟢 Approved, 🟡 Changes Suggested, 🟠 Discussion Needed).