svg
Draw a picture as inline SVG when it is not a chart: a schema, a timeline, a state board, an annotated shape. Use when the exact placement, labels and colours…
от hyper-code-harness★ 22 звезды на GitHub
Установить svg в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
svg
Takes SVG markup, strips everything that makes it more than a picture, and returns a figure that behaves in a chat column. Rendering needs no layout engine or headless browser: the markup you write is the markup that renders.
Interaction diagrams now live in diagrams
Prefer ctx.fns.diagrams.scenarioHelpers, scenarioDiagram, scenarioValidate and sequenceDiagram; corresponding types.diagrams models own their implementations. The old SVG names/types remain compatibility forwarding for saved fences and require the official diagrams plugin. See plugins/diagrams/SKILL.md for helper-first examples and precise moved scope. SVG still owns flow/ER/state/architecture/Gantt and low-level geometry; diagrams has no dependency back on SVG.
flowDiagram now also accepts theme: 'ibm-inspired': pre-layout 8px size increments, 16px padding, 14/18 node text, 12/16 labels, 1px borders and 8px rounded corners. Interaction renderers accept the same theme with geometry-aware actor/action padding. Inspired by official IBM technical-diagram guidance, not copied assets or exact grid compliance; font fallback/estimated metrics and unconstrained ELK coordinates remain. Default and d2-inspired flow behavior are preserved.
Typed JSON diagram helpers
Use these instead of inventing a diagram language or generating Mermaid source.
Each returns standalone svg, width, height and typed geometry. Call from a
trusted svg tsx fence and return result.svg. Inspect current function docs for
full schemas and limits before calling.
| Function | Input and supported scope |
|---|---|
svg.erDiagram |
entities: [{id,label?,fields:[{id,name,type?,pk?,fk?}]}], relationships: [{id,from,to,fromCardinality,toCardinality,label?}]. Cardinalities: 1, 0..1, 0..*, 1..*, displayed explicitly (not crow-foot glyphs). PK/FK flags are caller-supplied, never inferred. |
svg.sequenceDiagram |
Ordered participants: [{id,label}], messages: [{id,from,to,label,dashed?}]. Lifelines, self-messages and dashed returns; no activation bars or fragments. |
svg.stateDiagram |
`nodes: [{id,label,kind?: 'state' |
svg.architectureDiagram |
nodes: [{id,label,group?}], edges: [{id,from,to,label?}], optional groups: [{id,label}]. One-level service groups, not nested architecture/C4 semantics. |
svg.gantt |
tasks: [{id,label,start,end,dependencies?,progress?}]. Dates YYYY-MM-DD in UTC; end-exclusive intervals; equal dates are milestones. Progress 0–1. Dependencies are visual links, not automatic scheduling; dependency cycles rejected. Optional width 720–2400 (default 1100). |
All accept optional title. ER, State and Architecture accept direction: 'right' (default) | 'down' and use the pinned local ELK dependency. Sequence uses input
order; Gantt uses dates. The initial style is a fixed restrained light palette,
inspired by beautiful-mermaid (not a runtime dependency). Text wrapping uses
estimated metrics. Dense graphs can still have crossings or shared segments.
ER additionally accepts layout: 'elk' | 'aca' (default 'elk') and returns
engine: 'elk-layered' | 'aca'. ACA runs actual native Adaptagrams incremental
alignment (svg.layoutIncremental), then svg.routeEdges for orthogonal paths.
It requires hola-graph==0.1.5 in ~/.hyper/deps/svg/hola-graph-0.1.5; missing
installation errors include commands, and there is no silent ELK fallback.
ACA supports at most 60 entities and rejects self-links and parallel undirected
links (including reversed pairs). direction and layerGap are ELK-only and
ignored by ACA. nodeGap is minimum same-layer spacing for ELK (default 90),
or box inflation/separation for ACA (default 32; increased if needed for routing).
edgeGap defaults to 40 for ELK and 12 for ACA; ACA uses at least 1 pixel.
layerGap defaults to 140. Entity widths follow content in both layouts;
fields: [] produces a compact names-only box. ACA may retain some seed alignment;
its routes can cross/share segments, and label placement is not collision-aware.
The five helpers expose stable input-derived elementId values and escaped
data-node-id / data-edge-id attributes, plus geometry for a future interactive
renderer. IDs must be queried within each SVG, not globally across the document.
They are static pictures, not animation implementations. The existing
flowDiagram has its own simpler geometry contract; do not assume identical
route fields across helpers. SVG sanitization may remove custom attributes;
inspect the sanitized representation before building interaction on it.
Typed interaction scenarios
Author scenarios with svg.scenarioHelpers({}), not raw step objects or a fluent
DSL. Await the factory once; its positional constructors are ordinary synchronous
functions. Actor and Step are exported global types (types.diagrams.Actor and
`type
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- bun.lock
- package.json
- scripts/force_layout.ts
- scripts/hola_layout.py
- src/svg/$canvas_drawing.ts
- src/svg/$fence_svg.ts
- src/svg/$migration_20260216_icon_cache.ts
- src/svg/$setting_allowEval.ts
- src/svg/$style_svg.css
- src/svg/Actor.ts
- src/svg/FlexLayoutResult.ts
- src/svg/FlexNode.ts
- src/svg/FlowConstructors.ts
- src/svg/FlowEdge.ts
- src/svg/FlowNode.ts
- src/svg/GraphLayoutResult.ts
- src/svg/Node.ts
- src/svg/Scenario.ts
- src/svg/ScenarioConstructors.ts
- src/svg/Step.ts
- src/svg/anchor.ts
- src/svg/architectureDiagram.test.ts
- src/svg/architectureDiagram.ts
- src/svg/bbox.ts
- src/svg/compactLayout.test.ts
- src/svg/compactLayout.ts
- src/svg/connect.ts
- src/svg/debug.ts
- src/svg/element.ts
- src/svg/erDiagram.test.ts
- src/svg/erDiagram.ts
- src/svg/fitText.ts
- src/svg/flexLayout.test.ts
- src/svg/flexLayout.ts
- src/svg/flowDiagram.test.ts
- src/svg/flowDiagram.ts
- src/svg/flowHelpers.test.ts
- src/svg/flowHelpers.ts
- src/svg/gantt.test.ts
- src/svg/gantt.ts
FAQ
Что делает скилл svg?
Draw a picture as inline SVG when it is not a chart: a schema, a timeline, a state board, an annotated shape. Use when the exact placement, labels and colours carry the meaning and mermaid's auto-layout or a Vega-Lite chart does not fit — write a ```svg fence with the markup, or ```svg tsx to compute the drawing from data in TSX.
Как установить скилл svg?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл svg запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…