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.zipInstalls 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)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
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:
- Add mode — implement a new API from scratch, then review it
- Review mode — review an existing PR/diff for API design correctness
Both modes share the same design rules and quality bar.
Detecting Mode
| User says | Mode |
|---|---|
| "add", "expose", "wrap", "create binding" | Add |
| "review", "check API", "look at PR" | Review |
| Issue classified as "New API" | Add |
| Self-review after adding | Review (automatic) |
⚠️ Branch Protection (COMPLIANCE REQUIRED)
🛑 NEVER commit directly to protected branches. This is a policy violation.
| Repository | Protected Branches | Required Action |
|---|---|---|
| SkiaSharp (parent) | main | Create feature branch first |
| externals/skia (submodule) | main, skiasharp | Create feature branch first |
❌ NEVER Do These
| Shortcut | Consequence |
|---|---|
Commit directly to main or skiasharp | Policy violation |
Edit *.generated.cs manually | Overwritten on regenerate |
| Skip native build after C API change | EntryPointNotFoundException |
| Skip tests | Unacceptable |
| Skip tests because they fail | Unacceptable — fix the issue |
| Use default parameters in public APIs | ABI breaking change |
| Invent type names not in upstream Skia | Confusing, wrong naming |
| Add XML doc comments | Inserted by separate process |
| Fabricate test fonts | Use real fonts from known sources |
References
All three references work together:
| File | Purpose | When to read |
|---|---|---|
| references/api-design-rules.md | Naming, properties vs methods, Span patterns, type wrapping, test and sample requirements | Always — before writing or reviewing any API |
| references/add-workflow.md | Step-by-step add workflow with C API patterns, struct conversion, JSON config, gallery samples | Add mode |
| references/review-workflow.md | Structured review checklist, test coverage analysis, sample review, auto-fix mode | Review mode, and as final phase of add mode |
| references/troubleshooting.md | Common errors and fixes | When something goes wrong |
Add Mode
- Read api-design-rules.md
- Follow add-workflow.md phases 1-10
- Run review-workflow.md on your own changes
- Fix any issues identified by the review
- Re-run tests to confirm
Review Mode
- Read api-design-rules.md
- Follow review-workflow.md
- In fix-first mode: auto-fix high-confidence issues, re-run tests
- 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
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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| add-api (this skill) | 6 | 3mo | No flags | Advanced |
| dev_unity_unreal | 0 | 6mo | No flags | Advanced |
| unity-developer | 142 | 4mo | No flags | Advanced |
| game-engine-resources | 14 | 4mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by mono
View all by mono →You might also like
dev_unity_unreal
AllurinsX
dev_unity_unreal — an agent skill by AllurinsX.
unity-developer
sickn33
Build Unity games with optimized C# scripts, efficient rendering, and proper asset management. Masters Unity 6 LTS, URP/HDRP pipelines, and cross-platform deployment. Handles gameplay systems, UI implementation, and platform optimization. Use PROACTIVELY for Unity performance issues, game mechanics, or cross-platform builds.
game-engine-resources
gmh5225
Guide for game engine development resources including engine source code, plugins, and development guides. Use this skill when researching game engines (Unreal, Unity, Godot, custom engines), engine architecture, or game development frameworks.
csharp-developer
zenobi-us
Expert C# developer specializing in modern .NET development, ASP.NET Core, and cloud-native applications. Masters C# 12 features, Blazor, and cross-platform development with emphasis on performance and clean architecture.
unreal-engine-cpp-pro
sickn33
Expert guide for Unreal Engine 5.x C++ development, covering UObject hygiene, performance patterns, and best practices.
add-uint-support
pytorch
Add unsigned integer (uint) type support to PyTorch operators by updating AT_DISPATCH macros. Use when adding support for uint16, uint32, uint64 types to operators, kernels, or when user mentions enabling unsigned types, barebones unsigned types, or uint support.