.agents/skills/skia-analyst/SKILL.md
You analyze Skia features for SkiaSharp from two angles simultaneously:
Every run produces both. Output is structured JSON and rendered GitHub-flavored Markdown.
This skill always runs in a SkiaSharp checkout. It uses:
externals/skia/ submodule for the C API (our fork at mono/skia)binding/SkiaSharp/SkiaApi.generated.cs for the C API reflected as P/Invoke externsbinding/SkiaSharp/*.cs for the C# wrappersgoogle/skia headers fetched via GitHub for hidden API comparisonThe user may specify anything — infer the scan mode:
| User says | Mode | What to do |
|---|---|---|
| Nothing, "scan everything" | full | All milestones, full gap analysis |
| "what's new since m133" | windowed | milestoneFrom=133, milestoneTo=current |
| "between m133 and m147" | windowed | milestoneFrom=133, milestoneTo=147 |
| "diff v3.119.4..origin/main" | diff | Git diff + milestone analysis |
| "what changed in v4.147.0" | diff | Auto-detect previous tag, diff |
If unclear, ask. But try to infer first.
Phase 1: Setup (determine scan range, prepare sources)
Phase 2: Launch dual-model agents (Opus + GPT in parallel)
Phase 3: Synthesize — merge findings, dedupe, both lenses
Phase 4: Generate outputs (JSON → validate → Markdown)
Phase 5: Present results
1a. Determine scan range
Based on user input, establish:
scanMode: full, windowed, or diffmilestoneFrom and milestoneTorefFrom and refTo (resolve SHAs, dates, commit count)1b. Determine current milestone
cat externals/skia/include/core/SkMilestone.h
Or check commit messages for the latest Skia bump PR.
1c. Fetch Skia release notes
Fetch RELEASE_NOTES.md from google/skia using the GitHub MCP tool or gh api:
gh api repos/google/skia/contents/RELEASE_NOTES.md -H "Accept: application/vnd.github.raw" > skia-release-notes.md
Save to a file in the working directory for agents to reference.
1d. Prepare upstream headers for hidden API scan
Agents will fetch upstream C++ headers directly from GitHub during their scan:
github-mcp-server-get_file_contents owner=google repo=skia path=include/core/SkImage.h
1e. Locate binding sources
The C API is reflected in binding/SkiaSharp/SkiaApi.generated.cs as P/Invoke extern methods.
The C# wrappers are in binding/SkiaSharp/*.cs. Both are in the worktree.
For the C API headers (our fork), check externals/skia/include/c/ and externals/skia/src/c/.
If the submodule isn't checked out, agents can grep SkiaApi.generated.cs for sk_* and gr_*
extern function names — this reflects the full C API surface.
Launch two background agents simultaneously on different models:
task agent_type=general-purpose mode=background model=claude-opus-4.7 name=analyst-opus:
task agent_type=general-purpose mode=background model=gpt-5.4 name=analyst-gpt:
Each agent does the complete job independently:
google/skia, compare against
binding/SkiaSharp/SkiaApi.generated.cs for P/Invoke externs and binding/SkiaSharp/*.cs for wrappersFor EVERY finding, classify with BOTH lenses:
changeType + importancebindingStatus + impact + priority + effortWhen both agents complete, merge their findings:
4a. Generate JSON
Save to skia-analyst-report.json in the working directory.
4b. Validate
python3 .agents/skills/skia-analyst/scripts/validate-skia-analyst.py skia-analyst-report.json
4c. Render Markdown
python3 .agents/skills/skia-analyst/scripts/render-skia-analyst.py skia-analyst-report.json skia-analyst-report.md
This produces a GitHub-flavored Markdown file with collapsible details, suitable for pasting into a GitHub issue or sharing as a gist.
Show highlights inline:
importance: breakingThen offer next steps: