跳到正文
cccskills
免费在 GitHub 公开

diagram-design

Author an editorial HTML+SVG diagram with the Diagram Design kit - choose the visual type, read its reference, start from an example, and satisfy the safety and accessibility contract that diagram_write({kind:"html"}) enforces.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md5.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Diagram Design

The dsh-diagrams plugin vendors the Diagram Design kit: 71 example keys, 204 self-contained HTML+SVG examples, and 62 reference documents, from https://github.com/cathrynlavery/diagram-design (MIT, pinned by commit). This skill is how to use it well. Everything it names is on disk inside the plugin and is reachable through the diagram_kit tool - read it there rather than from memory, because the kit is the authority on its own conventions.

The one-sentence rule

A diagram is a document: one HTML file, one inline SVG, no shadows, no network, no script except the kit's motion controller. If a picture needs a library, a webfont URL or a shadow to work, it is not a diagram in this system.

The workflow, in order

  1. Catalog first — diagram_kit({action:"catalog"}) lists the 71 keys. The 44 marked with * have a written type reference; the rest are named variations of a documented family (bubble is scatter, marimekko is treemap) or importer demos.
  2. Read the shared rules once — diagram_kit({action:"reference", ref:"style-guide"}). It carries the colour tokens, the type scale and the density budget that every type assumes. Then, when the meaning is about behaviour rather than shape, ref:"semantic-patterns" - it maps a trigger ("fan-in with finite capacity", "two policy traces that must show the first divergence") onto the type that carries it.
  3. Read the type's own notes — ref:"<type>", e.g. ref:"sankey" serves references/type-sankey.md.
  4. Look at a finished one — {action:"example", id:"sankey"} (add variant:"animated" where the catalog lists it). Copying a working document and changing its content is the intended path, not cheating.
  5. Either insert it — {action:"insert", id:"sankey"} turns the example into a real diagram in this conversation in one call - or write your own with diagram_write({kind:"html", source}), starting from {action:"example", id:"template"} (and id:"template-motion" when it moves).

insert is a fork: the vendored file is never modified, and the stored copy is recorded as having come from the kit.

What diagram_write({kind:"html"}) will refuse

The check is a port of the kit's own self_check.py, run over every published example. Its findings come in two tiers, and the difference matters:

Refusals (the write does not validate; the panel will not frame it):

  • any remote reference: <link>, <img src>, <use href> to another host, a srcset, a CSS @import, a non-fragment url(), image-set(). The one exception is the kit's own Google Fonts <link>, recognised so the kit's examples pass - the plugin strips it when it serves the frame;
  • <base>, <embed>, <object>, <iframe>, applet, frame, srcdoc;
  • any on* attribute;
  • any script other than the kit's canonical motion controller, byte for byte. One <script data-diagram-controls> whose body hashes to the recorded value; anything else is refused with both hashes in the message.

Warnings (the diagram is valid; these are judgement calls, fix the ones that are right and say which you ignored):

  • no <svg>, or an SVG that is not accessible: it needs role="img", a first-child <title> and a <desc> with ids prefixed by the diagram's name, aria-labelledby="<prefix>-title <prefix>-desc", and non-empty text in both;
  • more than nine top-level marks — above that, the kit's own budget says it is probably two diagrams;
  • no --color-paper / --color-ink / --color-muted / --color-accent declarations, so the panel cannot adapt it to the dark theme;
  • no --font-sans / --font-serif / --font-mono in use, so it will not follow the reader's fonts;
  • motion markup without the canonical controller, or a controlled animation with no prefers-reduced-motion or print fallback.

Craft, from the kit's own philosophy

The highest-quality move is usually deletion. Every node is a distinct idea; two that always travel together are one node. Every connection carries information; if the layout already says it, the line is noise. Accent colour is editorial, not a flag — one or two focal marks per diagram, never five.

Target density is about 4/10, and nine top-level marks is the budget. A diagram is finished when nothing more can be removed, not when everything has been added.

Templates

idwhat it is
templatethe blank page: tokens, frame, heading, one accessible SVG
template-fullthe page with the editorial cards and footer under the picture
template-darkthe dark palette
template-terminalthe terminal/sketchy register
template-motionthe motion page, and the source of the ONE script allowed

Read one with {action:"example", id:"template"}; its bracketed placeholders ([diagram-slug], [Diagram title]) are what you replace first.

Where the files are

Inside the plugin, not in this skill's folder: lib/vendor/design/ — assets/ (the examples and templates), references/ (the 62 documents), catalog.json, and SKILL.md (the upstream selector table). diagram_kit is the supported way to read them; vendor/design/build.mjs --check proves the tree still matches the pinned upstream commit.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Control this machine's Docker or Podman engine through the docker_* tools - read the engine's state first, list containers and images, inspect one, tail its logs, pull an image and start it, then stop, restart or remove what you started. Covers the engine that is asleep behind Docker Desktop and the exact call for each verb, the confirm rule removals obey, and the flags the tools deliberately do not have.

中文简介正在准备中。当前显示原文说明。

vecnode/vn-code102026年10月20日 更新

Drive ffmpeg through the media_run tool as an argv array - remux instead of re-encode, map streams explicitly, trim at keyframes, scale and crop, extract audio and frames, and build GIFs, contact sheets and concatenations. Covers the flags this pack injects, reading a failure from its exit code and last log lines, and the version-dependent spellings to hedge.

中文简介正在准备中。当前显示原文说明。

vecnode/vn-code102026年10月20日 更新

Read a media file's real structure with ffprobe through media_run - the JSON invocation and how to read it, what every family of field means, how to count frames, sample without decoding everything, detect HDR and interlacing, and diagnose a missing duration, a stream with no frames or a container that lies. Covers when media_probe's own report is already enough.

中文简介正在准备中。当前显示原文说明。

vecnode/vn-code102026年10月20日 更新

Use when the user wants to design, redesign, shape, critique, audit, polish, simplify, harden, animate, or otherwise improve a frontend interface: websites, landing pages, dashboards, product UI, components, forms, settings, onboarding, empty states, and native iOS or Android screens. Handles UX review, hierarchy, layout, typography, color, motion, UX copy, accessibility, responsive behavior, edge cases, and capturing or documenting design systems (DESIGN.md, tokens). Also for making bland UI bolder, loud UI quieter, or ambitious visual effects. Not for backend-only or non-UI tasks.

中文简介正在准备中。当前显示原文说明。

vecnode/vn-code102026年10月20日 更新

Author Mermaid diagrams that parse the first time: choose the right diagram type for the question, write syntax the parser accepts, and keep the picture readable in a narrow panel. A bundled reference covers complex, large diagrams.

中文简介正在准备中。当前显示原文说明。

vecnode/vn-code102026年10月20日 更新

The Ollama REST API as it is on this machine - /api/generate and /api/chat with streaming NDJSON, /api/embed vs the older /api/embeddings, /api/tags, /api/ps, /api/show, pull progress, create/copy/delete, the OpenAI-compatible /v1 endpoints, the options map, keep_alive, the error shapes, and the environment variables that change what the daemon does.

中文简介正在准备中。当前显示原文说明。

vecnode/vn-code102026年10月20日 更新

查看 vecnode 的全部技能

报告此技能的问题