/nanlabs-design:architecture-diagramfrom nanlabs-design
Build an interactive, Lucidchart-style architecture diagram of a deployed system as one self-contained HTML page: nested containers (cloud, cluster, namespaces), service boxes with brand icons, numbered flows people can select (user access, operator access over a VPN or tailnet, CI/GitOps deploy, secrets, observability, data), hover details, an inventory table and a 'not there yet' list. Built from the real source of truth (Terraform, Helm, Argo CD, Kubernetes manifests, docker-compose, runbooks), never from guesses. Also exports Mermaid, D2, draw.io, SVG or PNG when the user asks for another format. Use when asked for an architecture diagram, deployment diagram, infrastructure map, 'what is deployed where', network or access flow diagram, or an explainer of an environment for a client, a new engineer or a DevOps handover.
Ships in nanlabs-design. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Turn a deployed system into a diagram that a client, a new engineer or an incoming DevOps can read in five minutes, and that an operator can still trust in detail.
The default output is one self-contained .html file: an SVG canvas drawn from a JSON model, flow buttons that highlight one path at a time, hover cards per component, and explanatory sections below. If the user asks for another format, build the same model and export it (see references/other-formats.md).
Not for: UI mockups (use ui-ux-pro-max), Figma work (use the figma* skills), or a diagram of a system that does not exist yet (draw it, but label every box as planned).
| Item | Default |
|---|---|
| Format | One .html file, no build step for the reader, works offline except web fonts |
| Language | The language the audience reads (ask if the audience differs from the requester) |
| Location | Where the user asks; otherwise a non-tracked folder (never commit it to a client repo unasked) |
| Content | Diagram + flows step by step + inventory + "not there yet" + source line |
| Safety | No IP addresses, account/project IDs, hostnames that are not public, secrets or personal data |
Read, do not assume. In order of authority:
docker-compose, serverless configs.kubectl get applications, kubectl get ns). Say in the page footer whether it reflects desired state (git) or live state, and the date.Write down for every component: name, what it does in one sentence, how it is reached, and the file that defines it. Those become the hover card.
Correct the request when the facts disagree. If the user says "show the user going through the VPN" and the config shows users on public HTTPS while only operators use the VPN, draw what is true, show both paths, and put a "Read this first" callout at the top explaining the difference. Tell the user in your reply too.
Copy assets/example-model.json and edit it. The schema is in references/model-schema.md. In short:
Pick flows that answer real questions: "how does a user get in", "how does an operator get in", "how does code get deployed", "where do secrets come from", "where do I look when it breaks", "where does data live".
Follow references/layout-and-routing.md. The rules that matter most:
python3 scripts/build.py model.json -o diagram.html
build.py validates the model (unknown ids, overlapping boxes, text that will overflow its box, edges with an unknown flow), downloads the brand icons it needs from Simple Icons at a pinned version, inlines them, and writes one HTML file. Without network it falls back to letter monograms and says so. Fix every warning before you continue.
Icons: si:<slug>|<hex> uses a Simple Icons slug (kubernetes, argo, grafana, postgresql, tailscale, terraform, githubactions...). g:<name>|<hex> uses a built-in glyph (user, laptop, db, bucket, key, shield, gear, globe, wave, folder, net, lb, clock, box, cpu, bell, code, lock, queue). m:<letters>|<hex> draws a monogram for brands Simple Icons does not carry.
Render and read the screenshot before you hand it over:
bash scripts/render.sh diagram.html shots/ # all flows + one PNG per flow
Check: no text leaves its box, no label pill sits on a box, every flow's arrows end on the right component, faded nodes in a flow view are really not part of it, dark mode is readable. Iterate on the model, not on the generated HTML.
In your reply: where the file is, what each flow shows, what the diagram is built from (git vs live, date), and any correction you made to the request. Offer a translation or another format. Do not publish the page anywhere without the user's go-ahead.
<ip>, <account> placeholders.| File | Purpose |
|---|---|
assets/engine.html | Page template and renderer (DOM-safe, no innerHTML) |
assets/example-model.json | Complete example: web app on managed Kubernetes with SSO, tailnet operator access, GitOps and observability |
scripts/build.py | Validate a model, fetch icons, write the HTML |
scripts/render.sh | Headless Chromium screenshots of every flow |
references/model-schema.md | Every field of the model |
references/layout-and-routing.md | Grid, lanes, label placement, common mistakes |
references/other-formats.md | Mermaid, D2, draw.io, SVG and PNG exports from the same model |
assets/engine.html (opens in a new tab)assets/example-model.json (opens in a new tab)references/layout-and-routing.md (opens in a new tab)references/model-schema.md (opens in a new tab)references/other-formats.md (opens in a new tab)scripts/build.py (opens in a new tab)scripts/render.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub nanlabs/agent-toolkit --plugin nanlabs-design7 skills in this plugin
/figmaUse the Figma MCP server to fetch design context, screenshots, variables, and assets, and to translate Figma nodes into production code. Trigger when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting./figma-code-connect-componentsConnects Figma design components to code components using Code Connect mapping tools. Use when user says "code connect", "connect this component to code", "map this component", "link component to code", "create code connect mapping", or wants to establish mappings between Figma designs and code implementations. For canvas writes (Plugin API), install the opt-in `figma-use` pack documented in `docs/SKILLS.md`./figma-create-design-system-rulesGenerates custom design system rules for the user's codebase. Use when user says "create design system rules", "generate rules for my project", "set up design rules", "customize design system guidelines", or wants to establish project-specific conventions for Figma-to-code workflows. Requires Figma MCP server connection./figma-create-new-fileCreate a new blank Figma file. Use when the user wants to create a new Figma design or FigJam file, or when you need a new file before calling use_figma. Handles plan resolution via whoami if needed. Usage — /figma-create-new-file [editorType] [fileName] (e.g. /figma-create-new-file figjam My Whiteboard)/figma-implement-designTranslates Figma designs into production-ready application code with 1:1 visual fidelity. Use when implementing UI code from Figma files, when user mentions "implement design", "generate code", "implement component", provides Figma URLs, or asks to build components matching Figma specs. For Figma canvas writes (Plugin API), see the opt-in `figma-use` pack documented in `docs/SKILLS.md`./ui-ux-pro-maxUI/UX design intelligence. 67 styles, 96 palettes, 57 font pairings, 25 charts, 13 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient. Integrations: shadcn/ui MCP for component search and examples.