.agents/skills/api-add-review/references/api-design-rules.md
Full docs: documentation/dev/api-design.md and documentation/dev/adding-apis.md.
Read those first. This file highlights the key points for quick reference during the add and review workflows.
SK prefix for core, GR for GPU, GRGl/GRVk/GRMtl/GRD3D for backendsSetVariationCoordsDesign, not SetVarCoordsDesign)VariationAxisInfos, GlyphCount)GetVariationAxisInfos(Span<>))Every array API needs three members:
T[] Property — convenient, allocatesint PropertyCount — for pre-allocating Spanint GetProperty(Span<T>) — allocation-freeReadOnlySpan<T> not T[] — accepts arrays, spans, stackallocref struct parameter bag for many optional paramsDEF_MAP for layout-compatible structs, manual converter for othersstatic_assert in sk_structs.cpp for every DEF_MAP#include the C header in sk_types_priv.h before DEF_MAPlibSkiaSharp.jsonArgumentOutOfRangeException#nullable disable unless neededsamples/Gallery/Shared/Samples/SampleMediausing or OnDestroy)