.agents/skills/review-skia-update/SKILL.md
Analyze a Skia upstream merge PR in mono/skia and produce a structured, schema-validated
review report. Reduces 100K–500K line diffs to focused, human-reviewable artifacts.
A Skia update always involves two PRs that must be reviewed together:
Phase 1: Run orchestrator → Phase 2: Write summaries & build report
Phase 3: Review C# PR → Phase 4: Validate & persist
A single script handles all mechanical work: fetching PR metadata, checking out both PRs, running the generator, checking source integrity, auditing DEPS, and analyzing companion PR files.
python3 .claude/skills/review-skia-update/scripts/run_review.py \
--skia-pr {skia_pr_number} \
--skiasharp-pr {skiasharp_pr_number}
Both parameters are required. A Skia update always has a companion SkiaSharp PR.
Output: raw-results.json in the output directory with all check results, including
mechanically generated file lists and diffs for upstream integrity, interop integrity, DEPS,
and companion PR files.
After this runs, the working tree is checked out to the PR state — you can browse files locally.
⚠️ If the orchestrator fails, report the failure and stop. Do not attempt to run individual scripts manually.
⚠️ NO-RETRY POLICY: Run the orchestrator exactly ONCE. If generation reports FAIL, that is the result. Do NOT re-run to get a different outcome.
Read references/writing-summaries.md for detailed guidance.
raw-results.json from the output directory printed by the orchestratorskia-review-schema.json{output_dir}/{pr_number}.json — the same directory as raw-results.jsonRead references/csharp-review.md for detailed guidance.
The orchestrator already produced the companionPr section with file lists and diffs in
raw-results.json. This phase adds human-oriented review context:
*Api.generated.cs files (already filtered by the orchestrator)relatedFiles cross-links to interop files where applicableThe working tree is checked out to the companion PR, so you can read files directly.
🛑 PHASE GATE: You CANNOT proceed to persist without passing validation. Skipping validation = INVALID review. The task is incomplete.
# Try pwsh first, fall back to python3
pwsh .claude/skills/review-skia-update/scripts/validate-skia-review.ps1 {output_dir}/{pr_number}.json \
|| python3 .claude/skills/review-skia-update/scripts/validate-skia-review.py {output_dir}/{pr_number}.json
⚠️ NEVER hand-roll your own validation. NEVER assume it passes. RUN THE SCRIPT.
🛑 PHASE GATE: The validator MUST have printed ✅ before you reach this step. If you have not run the validation script, GO BACK and run it now.
Copy the validated JSON to output/ai/ for collection.
pwsh .claude/skills/review-skia-update/scripts/persist-skia-review.ps1 {output_dir}/{pr_number}.json
This copies the JSON to output/ai/repos/mono-skia/ai-review/ and generates an HTML report
alongside it. The HTML is a self-contained file (Bootstrap 5 + diff2html) suitable for attaching
to a PR/issue or uploading as a gist.
To push to the data-cache branch separately: pwsh scripts/persist-to-cache.ps1
✅ Review: ai-review/{pr_number}.json
Generated Files: PASS/FAIL
Upstream Integrity: PASS/REVIEW_REQUIRED (Na/Nr/Nc)
Interop Integrity: PASS/REVIEW_REQUIRED (Na/Nc)
DEPS Audit: PASS/REVIEW_REQUIRED (Na/Nc)
Companion PR: PASS/REVIEW_REQUIRED (Na/Nc)
Risk: HIGH/MEDIUM/LOW
After presenting the summary, ask the user if they'd like to open the HTML report in their browser to review the full contents (diffs, recommendations, dependency table, etc.). If yes:
open output/ai/repos/mono-skia/ai-review/{pr_number}.html # macOS
# or: xdg-open ... (Linux) / start ... (Windows)
✅ valid