gridaco/grida / .agents/skills/docs-svg-kit
docs-svg-kit
VerifiedAuthor 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".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 21.9 KB |
| examples/text-node-auto-size-alignment.svg | other | 14.0 KB |
| examples/text-node-auto-size-edges.svg | other | 11.4 KB |
| snippets/cursors.svg | other | 10.7 KB |
| snippets/handles.svg | other | 4.9 KB |
| snippets/keycap.svg | other | 4.7 KB |
| snippets/meters.svg | other | 4.9 KB |
| snippets/primitives.svg | other | 18.8 KB |
| snippets/template.svg | other | 17.1 KB |
snippets/template.svg
View on GitHub<!-- @generated-by: docs-svg-kit v1 -->
<!--
docs-svg-kit · starter template
Copy this file as a starting point for a new docs figure. All tokens,
filters, markers, and reusable defs are wired up. Compose your figure
inside the "YOUR FIGURE HERE" region.
KEEP the @generated-by comment above and the <metadata> element below
in every figure produced from this template. Both are required by the
kit's watermark contract — see SKILL.md.
Output: 960 × 960 viewport. Inline <style> only. No external <use>.
-->
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 960 960"
width="960"
height="960"
font-family="-apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif">
<metadata>docs-svg-kit/v1</metadata>
<defs>
<style>
/* ============================================================
CANVAS / TYPOGRAPHY TOKENS
============================================================ */
.canvas-bg { fill: #ECECEC; }
.doc-heading { font-size: 26px; fill: #0a0a0a; font-weight: 600; letter-spacing: -0.3px; }
.doc-sub { font-size: 14px; fill: #6b7280; }
.col-title { font-size: 18px; fill: #0a0a0a; font-weight: 600; letter-spacing: -0.2px; }
.step-label { font-size: 11px; fill: #6b7280; font-weight: 500; text-transform: uppercase; letter-spacing: 0.6px; }
.caption { font-size: 13px; fill: #6b7280; }
.label-mono { font-size: 14px; fill: #0a0a0a; font-family: 'SF Mono', Menlo, Consolas, monospace; }
/* ============================================================
SELECTION CHROME (matches editor selection look)
============================================================ */
.sel-outline { fill: none; stroke: #0D99FF; stroke-width: 1; shape-rendering: crispEdges; }
.handle { fill: #ffffff; stroke: #0D99FF; stroke-width: 1; shape-rendering: crispEdges; }
.baseline { stroke: #0D99FF; stroke-width: 0.5; opacity: 0.55; shape-rendering: crispEdges; }
/* ============================================================
GESTURE / INTERACTION
============================================================ */
.edge-hot { stroke: #FF3B30; stroke-width: 2; shape-rendering: crispEdges; }
.ripple { fill: none; stroke: #FF3B30; stroke-width: 1.25; opacity: 0.6; }
.ripple-2 { fill: none; stroke: #FF3B30; stroke-width: 1; opacity: 0.3; }
.cursor { fill: #0a0a0a; stroke: #ffffff; stroke-width: 1.25; stroke-linejoin: round; }
/* hand cursors (grab / grabbing) — white interior + thick black outline,
matching the macOS Tahoe convention. Distinct from .cursor so the
silhouette reads on any background. */
.cursor-hand { fill: #ffffff; stroke: #0a0a0a; stroke-width: 1.5; stroke-linejoin: round; }
/* ============================================================
METER BADGE (variants: size = blue, distance = red)
- size: selection-blue, used for live w × h readouts
- distance: workbench-red (#f44336), used for measurement readouts
Same shape; shared `.badge-text` for the inner text.
Source: editor/grida-canvas-react/ui-config.ts (WorkbenchColors)
============================================================ */
.badge { fill: #0D99FF; } /* size variant */
.badge-distance { fill: #f44336; } /* distance / measurement variant */
.badge-text { font-size: 11px; fill: #ffffff; font-family: 'SF Mono', Menlo, Consolas, monospace; font-weight: 600; letter-spacing: 0.3px; }
/* ============================================================
KEYCAP (modifier-key pill, kbd-style)
Source: editor/components/ui/kbd.tsx
bg-muted, text-muted-foreground, h-5, min-w-5, px-1, rounded-sm, text-xs
============================================================ */
.kbd-bg { fill: #f1f5f9; stroke: #cbd5e1; stroke-width: 1; }
.kbd-text { font-size: 11px; fill: #475569; font-weight: 500; letter-spacing: 0.2px; }
/* ============================================================
TRANSFORM HANDLE — circle variant (free-transform grip)
Source: editor/grida-canvas-react/viewport/ui/surface-image-editor.tsx
"rounded-full border-2", w-4 h-4, cursor-grab
============================================================ */
.handle-circle { fill: #ffffff; stroke: #0D99FF; stroke-width: 1.5; }
/* ============================================================
GHOST / PIN TRACE (showing previous bounds)
============================================================ */
.ghost { fill: none; stroke: #b5b5b5; stroke-width: 1; stroke-dasharray: 3 3; shape-rendering: crispEdges; }
.pin-line { stroke: #FF3B30; stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.6; }
/* ============================================================
ARROWS
============================================================ */
.arrow { stroke: #9ca3af; stroke-width: 1.25; fill: none; }
.arrow-head { fill: #9ca3af; }
.arrow-red { stroke: #FF3B30; stroke-width: 1.25; fill: none; opacity: 0.85; }
.arrow-red-head{ fill: #FF3B30; }
/* ============================================================
NODE TEXT (text rendered inside a sample node)
============================================================ */
.node-text { font-size: 26px; fill: #0a0a0a; letter-spacing: -0.3px; }
/* ============================================================
LEGEND CARD
============================================================ */
.legend-box { fill: #ffffff; stroke: #e5e5e5; stroke-width: 1; }
/* ============================================================
STEP NUMBER PILL
============================================================ */
.step-bg { fill: #0a0a0a; }
.step-num { font-size: 11px; fill: #ffffff; font-weight: 700; }
</style>
<!-- ARROW MARKERS -->
<marker id="ah" viewBox="0 0 10 10" refX="9" refY="5"
markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M 0 0 L 10 5 L 0 10 z" class="arrow-head"/>
</marker>
<marker id="ah-red" viewBox="0 0 10 10" refX="9" refY="5"
markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M 0 0 L 10 5 L 0 10 z" class="arrow-red-head"/>
</marker>
<!-- DROP SHADOWS -->
<filter id="badge-shadow" x="-20%" y="-20%" width="140%" height="200%">
<feGaussianBlur in="SourceAlpha" stdDeviation="1.5"/>
<feOffset dx="0" dy="1" result="offset"/>
<feComponentTransfer><feFuncA type="linear" slope="0.25"/></feComponentTransfer>
<feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge>
</filter>
<filter id="cursor-shadow" x="-20%" y="-20%" width="140%" height="140%">
<feGaussianBlur in="SourceAlpha" stdDeviation="1.2"/>
<feOffset dx="0" dy="1" result="o"/>
<feComponentTransfer><feFuncA type="linear" slope="0.4"/></feComponentTransfer>
<feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge>
</filter>
<filter id="pin-shadow" x="-200%" y="-200%" width="500%" height="500%">
<feGaussianBlur in="SourceAlpha" stdDeviation="1"/>
<feOffset dx="0" dy="0.5" result="o"/>
<feComponentTransfer><feFuncA type="linear" slope="0.4"/></feComponentTransfer>
<feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge>
</filter>
<!-- ANCHOR PIN
Plain <g> (NOT a <symbol> with shifted viewBox) so that
translate(cx, cy) places the dot's centre exactly on (cx, cy). -->
<g id="anchor-pin">
<circle cx="0" cy="0" r="9" fill="#FF3B30" opacity="0.18"/>
<circle cx="0" cy="0" r="5.5" fill="#FF3B30"/>
<circle cx="0" cy="0" r="2" fill="#ffffff"/>
</g>
<!-- ROTATION HANDLE (circle variant of .handle)
Plain <g>, place via <g transform="translate(cx,cy)"><use href="#ft-handle"/></g>
so the dot's centre lands exactly on (cx, cy). -->
<g id="ft-handle">
<circle cx="0" cy="0" r="7" class="handle-circle"/>
</g>
<!-- CURSORS
All cursors use the .cursor class (black fill + white outline).
Aim: placed with <use href="#cursor-X" x="tip-hotspot-adjusted-x" y="..." width="..." height="..."/>
For the axis/arrow cursors the viewBox origin is the tip; for hand cursors the hotspot is the centre. -->
<!-- Resize cursors (used at hot edges) -->
<symbol id="cursor-h" viewBox="0 0 28 16" overflow="visible">
<path d="M 4 8 L 9 4 L 9 6.5 L 19 6.5 L 19 4 L 24 8 L 19 12 L 19 9.5 L 9 9.5 L 9 12 Z" class="cursor"/>
</symbol>
<symbol id="cursor-v" viewBox="0 0 16 28" overflow="visible">
<path d="M 8 4 L 4 9 L 6.5 9 L 6.5 19 L 4 19 L 8 24 L 12 19 L 9.5 19 L 9.5 9 L 12 9 Z" class="cursor"/>
</symbol>
<!-- Standard pointer (arrow tip at top-left, 0,0 hotspot) -->
<symbol id="cursor-pointer" viewBox="0 0 14 18" overflow="visible">
<path d="M 1 1 L 1 15 L 5 11.5 L 7.5 17 L 9.5 16 L 7 10.8 L 12 10.8 Z" class="cursor"/>
</symbol>
<!-- 4-direction move -->
<symbol id="cursor-move" viewBox="0 0 24 24" overflow="visible">
<path d="M 12 2 L 16 6 L 14 6 L 14 10 L 18 10 L 18 8 L 22 12 L 18 16 L 18 14 L 14 14 L 14 18 L 16 18 L 12 22 L 8 18 L 10 18 L 10 14 L 6 14 L 6 16 L 2 12 L 6 8 L 6 10 L 10 10 L 10 6 L 8 6 Z" class="cursor"/>
</symbol>
<!-- Open hand (grab) — macOS Tahoe-style hand silhouette.
White interior, thick black outline. -->
<symbol id="cursor-grab" viewBox="0 0 16 18" overflow="visible">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M8.6 17.5Q7 17.5 6 17q-1.2-.5-2-1.5t-1.6-2.6L.6 8.2v-1q0-.4.7-.6H2q.4.3.6.7l1.6 2.9.2.2h.3V10l-1-7q-.1-.7.1-1a1 1 0 0 1 1-.5 1 1 0 0 1 1.1 1l1.1 5.2v-6q0-.6.4-1 .3-.3.9-.3a1.2 1.2 0 0 1 1.2 1.2v6l1-5.2a1 1 0 0 1 1-1h.3q.5 0 .8.5l.2 1-.9 5.3 1.2-3.5q.2-.5.5-.7a1 1 0 0 1 1.6.3q.3.3.2.9l-1.2 6.5a8 8 0 0 1-1.8 4.2q-1.4 1.5-4 1.5Z"
class="cursor-hand"/>
</symbol>
<!-- Closed hand (grabbing) — macOS Tahoe-style closed fist. -->
<symbol id="cursor-grabbing" viewBox="0 0 14 13" overflow="visible">
<path d="M6.71.5q.39 0 .73.2l.09.06a1 1 0 0 1 .43.83v.66q.1.05.18.03l.01-.03v-.01l.16-.54.05-.15a1 1 0 0 1 .82-.63q.59-.1 1.06.27.26.18.38.5.1.3.04.6l-.15.88-.01.1q.04.04.13.04h.05l.24-.39V2.9q.3-.4.76-.46.4-.05.74.14l.1.06q.42.32.43.83 0 .84-.13 1.63-.12.77-.35 1.74l-.05.27a8 8 0 0 1-1.05 2.67q-.7 1.11-1.89 1.67-1.18.56-2.8.56-1.85 0-3.28-.92a6 6 0 0 1-1.96-2.16l-.2-.4A8.5 8.5 0 0 1 .5 4.93c0-.51.11-1 .41-1.36a1.5 1.5 0 0 1 1.06-.58q.28-.02.5.04l.15.05.27.1.05.27.25 1.27.02.07v.01h.01l.03.01.02-.01v-.05L2.75 2.3q-.08-.3.03-.61.11-.32.37-.5.48-.36 1.07-.27.31.04.56.26.19.17.27.39l.05.14.15.53v.01l.01.02.05.01q.07 0 .14-.03v-.66a1 1 0 0 1 .42-.83q.38-.27.83-.26Z"
class="cursor-hand"/>
</symbol>
<!-- Crosshair (solid plus, arms meet at centre) — CSS `cursor: crosshair`.
Used for vector drawing / point picking. Hot spot is (10, 10). -->
<symbol id="cursor-crosshair" viewBox="0 0 20 20" overflow="visible">
<path d="M 9 0 H 11 V 9 H 20 V 11 H 11 V 20 H 9 V 11 H 0 V 9 H 9 Z" class="cursor"/>
</symbol>
<!-- Text (I-beam) — CSS `cursor: text`.
Hot spot is the centre (4, 10). -->
<symbol id="cursor-text" viewBox="0 0 8 20" overflow="visible">
<path d="M 0 0 H 8 V 2 H 5 V 18 H 8 V 20 H 0 V 18 H 3 V 2 H 0 Z" class="cursor"/>
</symbol>
<!-- Rotation (curved double-arrow).
Lifted from editor/components/cursor/cursor-data.ts (template_rotate_svg, angle=0).
Use with transform="rotate(θ, 13, 12)" on the <use> wrapper to orient it. -->
<symbol id="cursor-rotate" viewBox="0 0 26 24" overflow="visible">
<path fill="#000000" fill-rule="evenodd" clip-rule="evenodd"
d="M23 15.5h-6.43l2.65-2.79A7.72 7.72 0 0 0 13 9.5a7.72 7.72 0 0 0-6.22 3.21l2.65 2.79H3V8.75l1.74 1.83A10.5 10.5 0 0 1 13 6.5c3.32 0 6.3 1.59 8.26 4.08L23 8.75v6.75Z"/>
<path fill="none" stroke="#ffffff" stroke-width="0.75"
d="M23 15.88h.38V7.8l-.65.68-1.45 1.52A10.85 10.85 0 0 0 13 6.13c-3.3 0-6.25 1.5-8.28 3.88L3.27 8.5l-.64-.68v8.07h7.67l-.6-.64-2.43-2.55A7.32 7.32 0 0 1 13 9.88c2.3 0 4.36 1.08 5.73 2.8l-2.43 2.56-.6.63H23Z"/>
</symbol>
</defs>
<rect class="canvas-bg" width="960" height="960"/>
<!-- ============================================================
YOUR FIGURE HERE
Heading
============================================================ -->
<text x="480" y="60" class="doc-heading" text-anchor="middle">Figure title</text>
<text x="480" y="86" class="doc-sub" text-anchor="middle">Optional one-line subtitle.</text>
<!-- Compose the figure below.
Quick-start patterns:
┌─ Selection chrome (place inside a <g transform="translate(x,y)">) ─┐
│ <rect x="0.5" y="0.5" width="279" height="89" class="sel-outline"/>
│ <line x1="0.5" y1="64.5" x2="279.5" y2="64.5" class="baseline"/>
│ <rect x="-3.5" y="-3.5" width="7" height="7" class="handle"/>
│ <rect x="276.5" y="-3.5" width="7" height="7" class="handle"/>
│ <rect x="-3.5" y="86.5" width="7" height="7" class="handle"/>
│ <rect x="276.5" y="86.5" width="7" height="7" class="handle"/>
└────────────────────────────────────────────────────────────────────┘
┌─ Size badge ─┐
│ <g transform="translate(103, 100)" filter="url(#badge-shadow)">
│ <rect x="0" y="0" width="74" height="20" rx="4" class="badge"/>
│ <text x="37" y="14" class="badge-text" text-anchor="middle">280 × 90</text>
│ </g>
└──────────────┘
┌─ Anchor pin (centre lands exactly on cx, cy) ─┐
│ <g transform="translate(140, 45)" filter="url(#pin-shadow)">
│ <use href="#anchor-pin"/>
│ </g>
└────────────────────────────────────────────────┘
┌─ Resize cursor at hot edge ─┐
│ <use href="#cursor-h" x="-32" y="52" width="28" height="16" filter="url(#cursor-shadow)"/>
└─────────────────────────────┘
┌─ Click ripple ─┐
│ <circle cx="0" cy="60" r="10" class="ripple"/>
│ <circle cx="0" cy="60" r="16" class="ripple-2"/>
└────────────────┘
┌─ Distance meter (red variant of size badge) ─┐
│ <g transform="translate(280, 200)" filter="url(#badge-shadow)">
│ <rect x="0" y="0" width="74" height="20" rx="4" class="badge-distance"/>
│ <text x="37" y="14" class="badge-text" text-anchor="middle">120 px</text>
│ </g>
└──────────────────────────────────────────────┘
┌─ Keycap (modifier-key pill, kbd-style) ─┐
│ <g transform="translate(400, 300)">
│ <rect x="0" y="0" width="32" height="20" rx="3" class="kbd-bg"/>
│ <text x="16" y="14" class="kbd-text" text-anchor="middle">Alt</text>
│ </g>
└────────────────────────────────────────────┘
┌─ Free-transform handle (circle) ─┐
│ <g transform="translate(140, 45)">
│ <use href="#ft-handle"/>
│ </g>
└────────────────────────────┘
┌─ Cursors (pointer / move / grab / grabbing / rotate) ─┐
│ <use href="#cursor-pointer" x="100" y="100" width="14" height="18" filter="url(#cursor-shadow)"/>
│ <use href="#cursor-move" x="200" y="100" width="24" height="24" filter="url(#cursor-shadow)"/>
│ <use href="#cursor-grab" x="300" y="100" width="22" height="22" filter="url(#cursor-shadow)"/>
│ <use href="#cursor-grabbing" x="400" y="100" width="22" height="22" filter="url(#cursor-shadow)"/>
│ <use href="#cursor-rotate" x="500" y="100" width="26" height="24" filter="url(#cursor-shadow)"/>
│ ::: For an angled rotate cursor, wrap in a rotated group:
│ <g transform="translate(500, 200) rotate(45)">
│ <use href="#cursor-rotate" x="-13" y="-12" width="26" height="24" filter="url(#cursor-shadow)"/>
│ </g>
└────────────────────────────────────────────────────────┘
-->
</svg>
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |