AD

It guides the wrapping of Skia C++ functions into C# APIs for SkiaSharp through a structured six-phase process.

Install

mkdir -p .claude/skills/add-api && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2293" && unzip -o skill.zip -d .claude/skills/add-api && rm skill.zip

Installs to .claude/skills/add-api

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Add new C# APIs to SkiaSharp by wrapping Skia C++ functionality, or review existing API PRs for correctness and style. Two workflows: (1) Add: C++ analysis → C API → bindings → C# wrapper → tests → review (2) Review: check naming, Span overloads, properties, tests, interop safety. Triggers: - "add DrawFoo method", "expose SkSurface::draw", "wrap sk_foo_bar" - "add API", "expose function", "wrap method", "create binding for" - "review this API", "check the API surface", "review PR #NNN for API design" - Issue classified as "New API" (after fetching and classification)
573 charsno explicit “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

Key capabilities

  • Analyze Skia C++ functionality for C# wrapping
  • Generate C API bindings for SkiaSharp
  • Implement C# wrappers for native functions
  • Review API design for naming and safety
  • Run tests for new API implementations

How it works

The skill follows a 6-phase workflow covering analysis, C API creation, binding generation, C# wrapping, and testing to expand SkiaSharp.

Inputs & outputs

You give it
Skia C++ function or API design request
You get back
C# API wrapper and associated tests

When to use add-api

  • Wrap new Skia C++ functions in C#
  • Generate bindings for SkiaSharp
  • Add new API endpoints to SkiaSharp
  • Test SkiaSharp API wrappers

About this skill

Add / Review API Skill

This skill has two modes:

  1. Add mode — implement a new API from scratch, then review it
  2. Review mode — review an existing PR/diff for API design correctness

Both modes share the same design rules and quality bar.

Detecting Mode

User saysMode
"add", "expose", "wrap", "create binding"Add
"review", "check API", "look at PR"Review
Issue classified as "New API"Add
Self-review after addingReview (automatic)

⚠️ Branch Protection (COMPLIANCE REQUIRED)

🛑 NEVER commit directly to protected branches. This is a policy violation.

RepositoryProtected BranchesRequired Action
SkiaSharp (parent)mainCreate feature branch first
externals/skia (submodule)main, skiasharpCreate feature branch first

❌ NEVER Do These

ShortcutConsequence
Commit directly to main or skiasharpPolicy violation
Edit *.generated.cs manuallyOverwritten on regenerate
Skip native build after C API changeEntryPointNotFoundException
Skip testsUnacceptable
Skip tests because they failUnacceptable — fix the issue
Use default parameters in public APIsABI breaking change
Invent type names not in upstream SkiaConfusing, wrong naming
Add XML doc commentsInserted by separate process
Fabricate test fontsUse real fonts from known sources

References

All three references work together:

FilePurposeWhen to read
references/api-design-rules.mdNaming, properties vs methods, Span patterns, type wrapping, test and sample requirementsAlways — before writing or reviewing any API
references/add-workflow.mdStep-by-step add workflow with C API patterns, struct conversion, JSON config, gallery samplesAdd mode
references/review-workflow.mdStructured review checklist, test coverage analysis, sample review, auto-fix modeReview mode, and as final phase of add mode
references/troubleshooting.mdCommon errors and fixesWhen something goes wrong

Add Mode

  1. Read api-design-rules.md
  2. Follow add-workflow.md phases 1-10
  3. Run review-workflow.md on your own changes
  4. Fix any issues identified by the review
  5. Re-run tests to confirm

Review Mode

  1. Read api-design-rules.md
  2. Follow review-workflow.md
  3. In fix-first mode: auto-fix high-confidence issues, re-run tests
  4. In review-only mode: produce structured feedback report

When not to use it

  • When committing directly to protected branches
  • When manually editing generated code files

Prerequisites

SkiaSharp development environment

Limitations

  • Cannot use default parameters in public APIs
  • Manual edits to generated files are overwritten
  • Native build required after C API changes

How it compares

It enforces a strict, multi-phase compliance workflow for API expansion, ensuring consistency and safety compared to ad-hoc implementation.

Compared to similar skills

add-api side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
add-api (this skill)63moNo flagsAdvanced
dev_unity_unreal06moNo flagsAdvanced
unity-developer1424moNo flagsAdvanced
game-engine-resources144moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

bug-fix

mono

Fix bugs in SkiaSharp C# bindings. Structured workflow for investigating, fixing, and testing bug reports. Triggers: Crash, exception, AccessViolationException, incorrect output, wrong behavior, memory leak, disposal issues, "fails", "broken", "doesn't work", "investigate issue", "fix issue", "look at #NNNN", any GitHub issue number referencing a bug. For adding new APIs, use `add-api` skill instead.

426

api-docs

mono

Write and review XML API documentation for SkiaSharp following .NET guidelines. Triggers: "document class", "add XML docs", "write XML documentation", "add triple-slash comments", "review documentation quality", "check docs for errors", "fix doc issues", "fill in missing docs", "remove To be added placeholders", API documentation requests.

110

native-dependency-update

mono

Update native dependencies (libpng, libexpat, zlib, libwebp, harfbuzz, freetype, libjpeg-turbo, etc.) in SkiaSharp's Skia fork. Handles security CVE fixes, bug fixes, and version bumps. Use when user asks to: - Bump/update a native dependency (libpng, zlib, expat, webp, etc.) - Fix a CVE or security vulnerability in a native library - Update Skia's DEPS file - Check what version of a dependency is currently used - Analyze breaking changes between dependency versions Triggers: "bump libpng", "update zlib", "fix CVE in expat", "update native deps", "what version of libpng", "check for breaking changes". For security audits (finding CVEs, checking PR coverage), use the `security-audit` skill instead.

11

release-branch

mono

Create a release branch for SkiaSharp. Use when user says "release X", "start release X", "create release branch for X", "I want to release", or "release now". This is the FIRST step of releasing - creates branch and pushes to trigger CI. Can auto-detect next preview version from main branch.

12

release-publish

mono

Publish SkiaSharp packages and finalize the release. Use when user says "publish X", "finalize X", "tag X", or "finish release X". This is the FINAL step - after release-testing passes. Publishes to NuGet.org, creates tag, GitHub release, and closes milestone. Triggers: "publish the release", "push to nuget", "create github release", "tag the release", "close the milestone", "annotate release notes", "testing passed what's next", "finalize 3.119.2", "release is ready".

19

release-testing

mono

Run integration tests to verify SkiaSharp NuGet packages work correctly before publishing. Use when user asks to: - Test/verify packages before release - Run integration tests - Test on specific device (iPad, iPhone, Android emulator, Mac, Windows) - Verify SkiaSharp rendering works - Check if packages are ready for publishing - Run smoke/console/blazor/maui tests - Continue with release - Test version X Triggers: "test the release", "verify packages", "run tests on iPad", "check ios tests", "test mac catalyst", "run android tests", "continue", "test 3.119.2-preview.2".

14

Search skills

Search the agent skills registry