Commit 8e27f60
authored
[skills] Add android-reviewer skill for PR code reviews (#10918)
Add a Copilot skill that reviews dotnet/android PRs against established
conventions, and a post-mortem document capturing the review knowledge
it's grounded in.
**New files:**
- `.github/skills/android-reviewer/SKILL.md` — Skill definition with
a 7-step workflow: parse PR URL, gather context (read full source files,
not just diffs), form an independent assessment, incorporate the PR
narrative, load review rules, analyze the diff, and submit a batched
review via `gh api`.
- `.github/skills/android-reviewer/references/review-rules.md` — 14
categories of review checks (MSBuild tasks, MSBuild targets, nullable
reference types, formatting, async/cancellation, error handling,
resources/localization, security, performance, code organization,
patterns, native C/C++, testing, AI-specific pitfalls).
- `.github/skills/android-reviewer/scripts/submit_review.cs` — A
.NET file-based program that validates review JSON structure and
submits it as a single batched PR review via `gh api`.
- `docs/CODE_REVIEW_POST_MORTEM.md` — 71 findings distilled from
~170 review comments across 5 PRs.
**Sources:**
Ported from [dotnet/android-tools android-tools-reviewer skill](https://github.com/dotnet/android-tools/tree/main/.github/skills/android-tools-reviewer),
adapted for dotnet/android conventions: MSBuild task patterns
(`AndroidTask`, `XA` error codes), nullable reference types, Mono
formatting style, localization rules, and repo-specific AI pitfalls.
Integrated 25 additional review checks from [dotnet/runtime's code
review skill](https://github.com/dotnet/runtime), including: review
mindset with severity levels, `[DoesNotReturn]` throw helpers,
pre-allocate collections, avoid closures in hot paths, O(n²) detection,
thread safety of shared state, lock ordering, `static_cast`/`nullptr`
for native interop, bool/string marshalling, regression tests for bug
fixes, and the "assess independently before reading PR description"
workflow pattern.
Post-mortem findings from reviews by @jonpryor:
- #2515
- #3992
- #4914
- #5748
- #64271 parent f715c14 commit 8e27f60
4 files changed
Lines changed: 758 additions & 0 deletions
File tree
- .github/skills/android-reviewer
- references
- scripts
- docs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
0 commit comments