--- name: docs-svg-kit description: > Author SVG figures for Grida docs — diff-able, version-controlled vector diagrams embedded in doc pages instead of screenshots. Provides reusable primitives (selection chrome, size badges, anchor pins, resize cursors, click ripples), color/typography tokens, a starter template, and finished examples to crib from. Canvas user docs (docs/editor/) are the first consumer; the kit is meant to generalize to any product's docs. Use when drawing diagrams that explain UI behaviour — gestures, alignment, before/after states — that a screenshot alone can't capture. Trigger phrases: "svg diagram", "draw a figure", "visual for docs", "explain this gesture visually", "before/after diagram". --- # Docs SVG Kit A snippet library for drawing SVG figures embedded in Grida docs. Canvas user docs are the kit's first consumer; the same primitives and conventions are meant to carry over to any product's docs as they adopt SVG figures. **First consumer / companion:** [`docs-canvas`](../docs-canvas/SKILL.md). Use that skill for the prose, this one for the visuals embedded inside it. ## Why SVG, not a screenshot Screenshots are easy to capture but expensive over time: - **Stale by default.** UI shifts; the screenshot keeps showing the old state until someone re-captures it. There is no diff, no warning, no test that fails. - **Repo weight.** Every re-capture is a new binary blob in git history. WebP at 960 × 960 is ~30–80 KB each; PNG is multiples of that. Across years of captures it compounds, and old blobs never leave history. - **Frozen in time.** A screenshot shows one moment of one configuration. A diagram explains the rule across configurations. So: **when SVG can carry the meaning, prefer SVG.** SVGs are text — diff-able, hand-editable, version-controlled like code. Reserve screenshots for cases where the actual rendered chrome (real fonts, real pixels) is the point. ## When to draw an SVG figure Reach for a custom SVG when a screenshot can't carry the story alone: - A **gesture** (the clickable target isn't visible at rest — double-click, drag, hover). - A **before / after** that needs the two states side-by-side. - A **rule** that hinges on an invisible anchor or pivot (alignment, snapping, hit-testing). If a single screenshot of the editor would communicate the whole point, use a screenshot. Don't redraw real UI in SVG when you don't have to. ## Hard constraints These are baked into the kit. Don't fight them. - **Inline `