architecture-diagram-react
БесплатноБез исполняемых скриптовНе проверенUse when the user wants to embed an architecture diagram directly inside a React/Vite site as inline SVG (no html2canvas, no external scripts, no separate…
от sergio-bershadsky★ 15 звёзд на GitHubОб этом скилле
Architecture Diagram — React/Inline-SVG Embedding
This is the embedded counterpart to the architecture-diagram skill. The parent skill ships a self-contained .html file with its own toolbar, html2canvas/jsPDF CDN scripts, summary cards, and footer. This skill produces a leaner artifact suited for direct embedding inside a React-rendered markdown page: a fenced markdown block whose body is inline <svg> augmented with <lucide-icon> placeholders.
The runtime renderer lives in the consumer repo (see "Consumer contract" below). The React component provides the chrome (frame, FIG label, copy/save toolbar, slate-950 grid background, JetBrains Mono surface) — so the SVG you emit must contain only the diagram itself, not the chrome.
What triggers this skill
- "Embed this diagram inside the blog post"
- "Generate the SVG for an
arch-diagramblock" - "Make a React-embedded version of the architecture diagram"
- Any request where the user wants the diagram inline in a page, not as a downloadable HTML file
- Follow-on to the
architecture-diagramskill when the user says "now put this on the site"
If the user wants a shareable standalone artifact (Slack, PDF, slides), use the parent architecture-diagram skill instead.
Workflow
- Read the parent skill's
design-system.mdandlabel-placement.md. Every rule there still applies: semantic colors, JetBrains Mono sizes, halos, label-placement priority, 40 px minimum gaps, 100–200 px between bands. None of those rules are duplicated here. - Produce the SVG following those rules —
viewBox, component rects, arrows, halos, leader lines. - Convert to embedded form — strip everything that belongs to the standalone HTML chrome (see "What to strip" below).
- Add the metadata comment —
<!-- fig: ... | title: ... | label: ... -->as the first line inside the fence. - Promote icons to
<lucide-icon>placeholders wherever a component box would benefit from a recognisable glyph (see "Lucide icon promotion" below). - Run the audit if available —
audit-labels.pyworks on raw SVG too; pipe the fenced-block body to it. - Output as a single fenced markdown block tagged
arch-diagram.
Output contract — the fenced block
```arch-diagram
<!-- fig: 2.1 | title: REQUEST FLOW | label: SYSTEM -->
<svg viewBox="0 0 1000 400" xmlns="http://www.w3.org/2000/svg">
...everything from <defs> through every <rect>, <path>, <text>, <lucide-icon>...
</svg>
```
- Fence language:
arch-diagram— the React renderer keys off this exact tag. - Metadata comment is the first line inside the fence. Fields are pipe-separated
key: value. Recognised keys:fig— appears asFIG {fig}in the chrome (e.g.,2.1,A,3)title— uppercase title shown afterFIG x //label— small right-aligned tag (e.g.,SYSTEM,CONTROL_PLANE,AUTH)- All three are optional; defaults are
A/ARCHITECTURE/ARCH_V2.
- Body must start with
<svg>(after the metadata comment). The renderer's auto-detection looks for<svgafter the comment. If the body doesn't begin with<svg, the renderer treats it as ordinary code.
What to strip from a standalone-HTML diagram
When converting output of the parent skill to embedded form, remove:
| Strip | Why |
|---|---|
<!DOCTYPE html>, <html>, <head>, <body> |
Renderer is inside a React tree |
Google Fonts <link> |
Surface already loads JetBrains Mono via font-family |
html2canvas + jspdf <script> tags |
Renderer provides Copy/Save via React |
.toolbar, .toolbar-toggle, .toolbar-actions markup + CSS |
Chrome is the React component's job |
.container, .header, .header-row, .pulse-dot, .subtitle |
Chrome — frame + FIG label come from React |
.summary-cards, .card, footer divs |
Embedded diagrams have no info-cards / footer |
copyAsImage(), downloadPNG(), downloadPDF() scripts |
Replaced by React Copy/Save |
@media print { ... } |
Not applicable inside an SPA page |
Page-level body { padding: 2rem; ... } styles |
Renderer controls outer padding |
Keep:
- The whole
<svg>block:<defs>,<pattern>,<marker>, all<rect>/<path>/<line>/<polyline>/<text>elements, arrow leader lines, halo styles inlined as SVG attributes. - Halos must move from CSS into inline SVG attrs since the renderer doesn't ship the global
svg text { paint-order: stroke fill; ... }selector. Each<text>that needs a halo must carry its ownpaint-order="stroke fill",stroke="rgba(2, 6, 23, 0.75)",stroke-width="1". The renderer adds nothing to text — what you emit is what renders. - Background grid pattern is optional — the renderer surface already paints a slate-950 + 40 px grid. If the SVG also draws one, it just doubles up; usually safe to omit.
Chip-rect bac
Установить architecture-diagram-react в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл architecture-diagram-react?
Use when the user wants to embed an architecture diagram directly inside a React/Vite site as inline SVG (no html2canvas, no external scripts, no separate HTML file). Produces an `arch-diagram` fenced markdown block that the site's React renderer expands — including `<lucide-icon>` placeholders for semantic icons. Companion to the `architecture-diagram` skill, which produces standalone HTML.
Как установить скилл architecture-diagram-react?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл architecture-diagram-react запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic