Expand API design docs and rename add-api skill to api-add-review#3749
Merged
Conversation
Contributor
📦 Try the packages from this PRWarning Do not run these scripts without first reviewing the code in this PR. Step 1 — Download the packages bash / macOS / Linux: curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 3749PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 3749"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-3749/packages --name skiasharp-pr-3749More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-3749 |
…arnings Significantly expand documentation/dev/adding-apis.md with: - C API struct conversion patterns (DEF_MAP macros, layout-compatible vs manual) - Generator configuration (libSkiaSharp.json type aliases, struct options, param overrides) - GPU-specific patterns (prefix conventions, C API guards, platform conditionals) - Additional common mistakes (externals-download after C API changes, missing static_asserts) Expand documentation/dev/api-design.md with: - Span overloads pattern (array property + count + Span fill method) - Properties vs methods decision guide - Type wrapping for uint32_t typedefs (SKFourByteTag pattern) - Ref struct parameter bags for complex APIs - Test patterns (exact values, Span equivalence, round-trip, static font, negative index) - XML documentation and file convention guidelines Restructure add-api skill from monolithic SKILL.md into: - SKILL.md: mode detection (add vs review), concise rules table - references/add-workflow.md: step-by-step add phases with struct conversion examples - references/api-design-rules.md: quick-reference checklist - references/review-workflow.md: structured review with auto-fix capability - Remove old references/checklists.md (superseded by above) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mattleibow
force-pushed
the
dev/improve-api-docs
branch
from
April 26, 2026 01:34
ac9aea5 to
4f209be
Compare
Rename reflects both modes (add new APIs + review existing PRs) and broader applicability beyond just P/Invoke bindings to all C# library code in source/. Updated all 9 references across 7 files: - AGENTS.md (slash command + classification tables) - documentation/dev/issue-pipeline.md (pipeline routing) - .agents/skills/issue-fix/SKILL.md (cross-reference) - .agents/skills/skia-feature-scout/SKILL.md (suggestion prompt) - .agents/skills/skia-feature-scout/references/schema-cheatsheet.md (3x skillToUse) - .agents/skills/api-add-review/SKILL.md (name field) - Directory: .agents/skills/add-api/ → .agents/skills/api-add-review/ Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Captures patterns and learnings from the variable font PR (#3703) into the developer documentation, restructures the API skill, and renames it from
add-apitoapi-add-reviewto reflect both modes (add + review) and broader applicability beyond P/Invoke bindings.No code changes — documentation and skill files only.
documentation/dev/api-design.mduint32_ttypedefs (SKFourByteTagpattern)SKFontArgumentspattern)documentation/dev/adding-apis.mdDEF_MAPmacro variants with when-to-use guidestatic_assertinsk_structs.cppfor ABI verificationsk_fourbytetag_t→SKFourByteTag)libSkiaSharp.jsonconfiguration: type aliases, member renames, function parameter overrides, struct optionsGR*prefix,#if SK_GANESH/SK_VULKANguards, internal native structsSkill restructure:
add-api→api-add-reviewchecklists.mdintoadd-workflow.md(9-phase) andreview-workflow.mdapi-design-rules.mdquick-referenceSKILL.mdnow dispatches between add mode and review mode