.agents/skills/review-skia-update/references/csharp-review.md
The orchestrator mechanically generates the companionPr section in raw-results.json
with file lists, diffs, and categories (added/changed). Your job is to:
summary to each file item (same as upstream/interop summaries)relatedFiles cross-links to interop files where applicable*Api.generated.cs files — already filtered out by check_companion.pyFiles in binding/SkiaSharp/ (excluding generated). Check:
null on failure, constructors throwArgumentNullException before P/Invoke callsSKObject.GetObject() for owned objects, owns: false for borrowedSubset(), ToRasterImage() may return this
// ✅ Required pattern for same-instance returns
var result = source.Subset(bounds);
if (result != source)
source.Dispose();
SkiaSharp maintains stable ABI. Flag any:
[Obsolete] instead)New overloads are safe and expected. Verify:
camelCase)SK prefix on new types/enumsSkia updates often change platform behavior. Check:
*.targets, *.props)Check tests/Tests/ for:
Add a companionPr section to the JSON report using the same sourceFile structure
as upstream/interop integrity sections:
{
"companionPr": {
"prNumber": 3560,
"status": "REVIEW_REQUIRED",
"summary": "Brief overview of C# changes...",
"recommendations": ["Action item 1", "..."],
"added": [
{
"path": "binding/SkiaSharp/SKFoo.cs",
"summary": "New wrapper for sk_foo_bar API — creates SKFoo with factory method",
"diff": "--- a/dev/null\n+++ b/binding/SkiaSharp/SKFoo.cs\n...",
"relatedFiles": [
{ "path": "src/c/sk_foo.cpp", "relationship": "C API implementation" }
]
}
],
"changed": [
{
"path": "binding/SkiaSharp/SKSurface.cs",
"summary": "New DrawSurface overload with SKSamplingOptions parameter",
"diff": "...",
"oldDiff": "...",
"newDiff": "...",
"patchDiff": "..."
}
],
"unchanged": 4
}
}
Categories:
added — new C# files (new wrappers, new test files)changed — modified C# files (updated wrappers, new overloads, signature changes)unchanged — count of reviewed files with no changes requiring attention (skipped generated files)Use relatedFiles to cross-link companion PR files to their interop counterparts
(e.g., a C# wrapper → its C API implementation in the interop section).