SVG Diagram Generation

SVG Diagram Generation is a skill for Claude Code from CopilotKit/OpenGenerativeUI. It costs 22 tokens per session (3,360 once invoked), scanned A, original, MIT.

A guide for generating inline SVG diagrams—scalable drawings made from code—to explain systems, processes, architectures, and abstract ideas.

In plain words
What is it for?
Use it for flowcharts, system diagrams, data flows, architecture drawings, algorithms, and other explanatory visuals.
Why use it?
It provides a structured way to show relationships and steps that can be harder to understand from prose alone.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it for flowcharts, system diagrams, data flows, architecture drawings, algorithms, and other explanatory visuals.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/copilotkit/opengenerativeui/svg-diagrams
About the project

CopilotKit/OpenGenerativeUI is an open-source showcase for AI-generated user interfaces, where an agent creates live interactive HTML and SVG visualizations instead of returning only text. It is used to build algorithm demonstrations, 3D scenes, charts, diagrams, forms, simulations, and mathematical plots rendered in sandboxed iframes. The catalogue skills and instruction support working with this generative UI project.

CopilotKit/OpenGenerativeUI · 1,543 stars · on GitHub · opengenerativeui.copilotkit.ai

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add CopilotKit/OpenGenerativeUI --skill svg-diagrams
Clone the repo
git clone --depth 1 https://github.com/CopilotKit/OpenGenerativeUI

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for SVG Diagram Generation

README.md
[![agentmods](https://agentmods.dev/badge/skills/copilotkit/opengenerativeui/svg-diagrams.svg)](https://agentmods.dev/skills/copilotkit/opengenerativeui/svg-diagrams)
Your own site
<a href="https://agentmods.dev/skills/copilotkit/opengenerativeui/svg-diagrams"><img src="https://agentmods.dev/badge/skills/copilotkit/opengenerativeui/svg-diagrams.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,360 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 39
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.03360
Opus 5 $0.00011 $0.01680
Sonnet 5 $0.00004 $0.00672
Haiku 4.5 $0.00002 $0.00336

Measured 8d ago against content hash 0322bedd0e80, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

SVG Diagram Generation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

apps/agent/skills/svg-diagrams/SKILL.md · 258 lines

How it starts

The opening of the file, as written. The whole thing — 258 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SVG Diagram Generation Skill

You can generate rich, inline SVG diagrams to visually explain concepts. Use this skill whenever a visual would help the user understand a system, process, architecture, or mechanism better than text alone.


Delivery

Diagrams ship through the generateSandboxedUi tool: the SVG markup goes in the html parameter, where it streams to the user element by element. SVG presentation attributes (fill, stroke, font-size) carry all styling here — if a diagram needs CSS animation classes, declare them in the css parameter, never in a <style> block inside html. Static diagrams need no jsFunctions or jsExpressions.


When to Use

  • Explaining how something works (load paths, circuits, pipelines, algorithms)
  • Showing architecture or structure (system diagrams, component layouts)
  • Illustrating processes or flows (flowcharts, data flow, decision trees)
  • Building intuition for abstract concepts (attention mechanisms, gradient descent, recursion)

SVG Setup

Always use this template:

<svg width="100%" viewBox="0 0 680 H" xmlns="http://www.w3.org/2000/svg">
  <defs>
    <marker id="arrow" viewBox="0 0 10 10" refX="8" refY="5"
            markerWidth="6" markerHeight="6" orient="auto-start-reverse">
      <path d="M2 1L8 5L2 9" fill="none" stroke="context-stroke"
            stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
    </marker>
  </defs>
  <!-- Content here -->
</svg>
  • Width is always 680px via viewBox. Set width="100%" so it scales responsively.
  • H (height) = bottom-most element's y + height + 40px padding. Don't guess — compute it.
  • Safe content area: x=40 to x=640, y=40 to y=(H-40).
  • No wrapping divs, no <html>, <head>, <body>, or DOCTYPE.
  • Background is transparent — the host provides the background.

Core Design Rules

Typography

  • Two sizes only: 14px for titles/labels, 12px for subtitles/descriptions.
  • Two weights only: 400 (regular), 500 (medium/bold). Never use 600 or 700.
  • Font: Use font-family="system-ui, -apple-system, sans-serif" or inherit from host.
  • Always set text-anchor="middle" and dominant-baseline="central" for centered text in boxes.
  • Sentence case always. Never Title Case or ALL CAPS.

Read the full file on GitHub · 258 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 258 lines · 22 tokens per session scan A 0322bedd0e80

Subscribe to this mod's changes

SVG Diagram Generation is a skill published in the GitHub repository CopilotKit/OpenGenerativeUI (1,543 stars, last pushed 2mo ago), licensed MIT. It adds 22 tokens to every session and 3,360 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

Advanced Visualization Techniques

UI mockups, dashboards, advanced interactivity, generative art, simulations, math visualizations, and design system rules for producing rich HTML widget output.

bubba2koldd-design/OpenGenerativeUI · 35 tokens

SVG Diagram Generation

Generating rich inline SVG diagrams to visually explain systems, processes, architectures, and abstract concepts.

bubba2koldd-design/OpenGenerativeUI · 22 tokens

Master Agent Playbook

Philosophy, decision-making framework, and technical skills for delivering visual, interactive, and educational AI responses.

bubba2koldd-design/OpenGenerativeUI · 27 tokens

brand-landingpage

Brand-first landing page designer — runs a brand-identity interview (colors, typography, shape language), then generates and iterates on a polished landing page via Stitch with deployment-ready HTML. Use when the user asks to create, design, or build a landing page, homepage, or marketing page and has no established…

wshobson/agents · 112 tokens

wcag-audit-patterns

Conduct WCAG 2.2 accessibility audits with automated testing, manual verification, and remediation guidance. Use when auditing websites for accessibility, fixing WCAG violations, or implementing accessible design patterns.

wshobson/agents · 45 tokens

sage-review

Deep, platform-neutral code review for PRs and CRs in ONE thorough single pass — design reasoning (Problem Worth Solving & Solution Fit) as one dimension alongside the 9 code-level dimensions, with chain-of-consequences, self-critique, and draft-only comments. The single app-owned source of truth.

kirodotdev/KiroCrew · 68 tokens