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.
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.
npx skills add CopilotKit/OpenGenerativeUI --skill svg-diagramsgit clone --depth 1 https://github.com/CopilotKit/OpenGenerativeUIWrote 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.
[](https://agentmods.dev/skills/copilotkit/opengenerativeui/svg-diagrams)<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>- NVIDIA SkillSpector warn
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.
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.
| Model | Per session | Once 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 |
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.
Copies of this mod
1 near-identical copy found in the catalogue:
- SVG Diagram Generation — 94% identical, 6 lines differ
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"anddominant-baseline="central"for centered text in boxes. - Sentence case always. Never Title Case or ALL CAPS.
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.
- 8d ago First seen · 258 lines · 22 tokens per session scan A 0322bedd0e80
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.
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.
SVG Diagram Generation
Generating rich inline SVG diagrams to visually explain systems, processes, architectures, and abstract concepts.
Master Agent Playbook
Philosophy, decision-making framework, and technical skills for delivering visual, interactive, and educational AI responses.
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…
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.
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.