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 DuanZGit/D-Hub --skill svg-diagramgit clone --depth 1 https://github.com/DuanZGit/D-HubWrote 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/duanzgit/d-hub/svg-diagram)<a href="https://agentmods.dev/skills/duanzgit/d-hub/svg-diagram"><img src="https://agentmods.dev/badge/skills/duanzgit/d-hub/svg-diagram/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/duanzgit/d-hub/svg-diagram"><img src="https://agentmods.dev/badge/skills/duanzgit/d-hub/svg-diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00073 | $0.07583 |
| Opus 5.5 | $0.00029 | $0.03033 |
| Sonnet 5.5 | $0.00015 | $0.01517 |
| Haiku 4.5 | $0.00007 | $0.00758 |
Grade A, and why
svg-diagram 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 592 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SVG Diagramming Conventions
Output location and referencing
Diagrams go in SVG, never ASCII art. That rule decides whether to draw; this skill covers how, starting with where the file lands.
- Put the file in an
assets/directory next to the document (e.g.docs/foo.md→docs/assets/foo-arch.svg) - Reference it from markdown with a relative path,
. Do not inline SVG XML. - When data in the document changes, the corresponding SVG must be updated too. A figure that contradicts the prose beside it is worse than no figure
Core principles
Get it right on the first pass
The first SVG you generate must already satisfy every item in the verification checklist at the end of this document. Do not rely on user feedback to fix basic layout problems (spacing, padding, alignment, viewBox clipping). After generating, walk the checklist yourself and fix anything you find before showing the result.
No overlapping elements
- Text must not sit on top of boxes or lines
- Lines must not cut through boxes (unless the line is an arrow terminating at that box)
- Keep 10–20px between text and lines
- For spacing between sibling/adjacent boxes see the "Block spacing" section below (single standard: ≥25px, 25–30px recommended)
- Put color-key legends outside the diagram body (bottom or side), never overlapping the content area
<!-- ✅ Correct: label sits beside the line -->
<path d="M35,200 C 35,120 ..." .../>
<text x="55" y="200">Label text</text> <!-- 20px clearance -->
<!-- ❌ Wrong: label sits on the line -->
<text x="35" y="200">Label text</text>
Visual balance
The left and right halves should carry similar visual weight; add or remove annotation boxes to even them out.
Layout rules
Centering
content width = right edge of rightmost element - left edge of leftmost element
left margin = (viewBox width - content width) / 2
Center the title on the content center, not the viewBox center (they differ whenever the content is asymmetric):
What ships with it
60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- .gitignore 323 B
- assets/house-style.svg 3.1 KB
- gallery/01-architecture-skill-loading.svg 6.9 KB
- gallery/02-workflow-svg-authoring.svg 4.7 KB
- gallery/03-sequence-lint-gate.svg 6.2 KB
- gallery/04-dataflow-metrics-to-doc.svg 5.8 KB
- gallery/05-lifecycle-skill-states.svg 4.8 KB
- gallery/06-architecture-repo-layout.svg 5.6 KB
- gallery/07-workflow-install-surfaces.svg 5.7 KB
- gallery/08-reference-cjk-fonts.svg 5.8 KB
- gallery/09-dataflow-tiered-routing.svg 9.0 KB
- gallery/10-workflow-ab-benchmark.svg 8.2 KB
- LICENSE 1.0 KB
- package.json 336 B
- README.md 11 KB
- tools/svg-lint/bin/svg-lint.mjs 3.0 KB runs code
- tools/svg-lint/lib/checks/arrow-marker.mjs 22 KB runs code
- tools/svg-lint/lib/checks/baseline-offset.mjs 6.6 KB runs code
- tools/svg-lint/lib/checks/block-spacing.mjs 16 KB runs code
- tools/svg-lint/lib/checks/box-height.mjs 5.5 KB runs code
- tools/svg-lint/lib/checks/connector-geometry.mjs 29 KB runs code
- tools/svg-lint/lib/checks/font-stack.mjs 6.8 KB runs code
- tools/svg-lint/lib/checks/light-bg-fallback.mjs 7.9 KB runs code
- tools/svg-lint/lib/checks/overlap.mjs 33 KB runs code
- tools/svg-lint/lib/checks/palette-conformance.mjs 12 KB runs code
- tools/svg-lint/lib/checks/text-overflow.mjs 7.2 KB runs code
- tools/svg-lint/lib/checks/viewbox-clipping.mjs 3.9 KB runs code
- tools/svg-lint/lib/checks/xml-escaping.mjs 2.2 KB runs code
- tools/svg-lint/lib/color.mjs 2.1 KB runs code
- tools/svg-lint/lib/document.mjs 49 KB runs code
- tools/svg-lint/lib/format-json.mjs 451 B runs code
- tools/svg-lint/lib/format-text.mjs 1.5 KB runs code
- tools/svg-lint/lib/geometry.mjs 9.6 KB runs code
- tools/svg-lint/lib/lint.mjs 2.4 KB runs code
- tools/svg-lint/lib/palette.mjs 1.4 KB runs code
- tools/svg-lint/lib/panels.mjs 3.9 KB runs code
- tools/svg-lint/lib/parse-svg.mjs 12 KB runs code
- tools/svg-lint/lib/registry.mjs 1.3 KB runs code
- tools/svg-lint/lib/report.mjs 892 B runs code
- tools/svg-lint/lib/text-metrics.mjs 6.4 KB runs code
- tools/svg-lint/README.md 49 KB
- tools/svg-lint/test/checks/arrow-marker.test.mjs 55 KB runs code
- tools/svg-lint/test/checks/baseline-offset.test.mjs 24 KB runs code
- tools/svg-lint/test/checks/block-spacing.test.mjs 36 KB runs code
- tools/svg-lint/test/checks/box-height.test.mjs 21 KB runs code
- tools/svg-lint/test/checks/connector-geometry.test.mjs 54 KB runs code
- tools/svg-lint/test/checks/font-stack.test.mjs 33 KB runs code
- tools/svg-lint/test/checks/light-bg-fallback.test.mjs 15 KB runs code
- tools/svg-lint/test/checks/overlap.test.mjs 84 KB runs code
- tools/svg-lint/test/checks/palette-conformance.test.mjs 31 KB runs code
- tools/svg-lint/test/checks/text-overflow.test.mjs 30 KB runs code
- tools/svg-lint/test/checks/viewbox-clipping.test.mjs 8.7 KB runs code
- tools/svg-lint/test/checks/xml-escaping.test.mjs 8.4 KB runs code
- tools/svg-lint/test/cli.test.mjs 3.7 KB runs code
- tools/svg-lint/test/color.test.mjs 9.1 KB runs code
- tools/svg-lint/test/document.test.mjs 135 KB runs code
- tools/svg-lint/test/fixtures/fail/baseline-off.svg 538 B
- tools/svg-lint/test/fixtures/fail/clipped-bottom.svg 510 B
- tools/svg-lint/test/fixtures/fail/line-cuts-box.svg 702 B
- tools/svg-lint/test/fixtures/fail/marker-units-missing.svg 932 B
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.
- yesterday First seen · 592 lines · 73 tokens per session scan A 0119ef779a41
svg-diagram is a skill published in the GitHub repository DuanZGit/D-Hub (0 stars, last pushed 2d ago), licensed MIT. It adds 73 tokens to every session and 7,583 once invoked, about $0.0003 per session on Opus 5.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-11-06.
svg-diagram compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| svg-diagramDuanZGit/D-Hub | Skill | 0 | 2d ago | MIT | A | 73 | Claude Code |
| diagram-workflowrcarmo/piclaw-addons | Skill | 23 | 2d ago | MIT | A | 20 | Claude Code, Codex |
| diagram-colour-pickerrcarmo/piclaw-addons | Skill | 23 | 2d ago | MIT | A | 21 | Claude Code, Codex |
| piznlgis/opengis-skills | Skill | 78 | 12d ago | MIT | B | 103 | Claude Code, Codex |
| spec-imagerenky1025/agent-skills | Skill | 11 | 29d ago | MIT | A | 286 | Claude Code |
| image-designrenky1025/agent-skills | Skill | 11 | 29d ago | MIT | A | 203 | Claude Code, Codex |
| design-md-extractorrenky1025/agent-skills | Skill | 11 | 29d ago | MIT | A | 193 | Claude Code, Codex |