/moai-domain-svg-infographic
Author editable SVG technical infographics — architecture, flow, comparison, hierarchy — by computing the layout numerically before writing markup, then rendering a 2x PNG via headless Chromium. Carries a CJK-first font stack, a deterministic source lint, and mermaid-vs-SVG
$ npx -y skills add modu-ai/moai-adk --skill moai-domain-svg-infographic --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/moai-domain-svg-infographic
Context preview
The summary Claude sees to decide when to auto-load this skill.
Author editable SVG technical infographics — architecture, flow, comparison, hierarchy — by computing the layout numerically before writing markup, then rendering a 2x PNG via headless Chromium. Carries a CJK-first font stack, a deterministic source lint, and mermaid-vs-SVG
SKILL.md
moai-domain-svg-infographic.SKILL.mdname: moai-domain-svg-infographic
description: >
Author editable SVG technical infographics — architecture, flow, comparison,
hierarchy — by computing the layout numerically before writing markup, then
rendering a 2x PNG via headless Chromium. Carries a CJK-first font stack, a
deterministic source lint, and mermaid-vs-SVG selection rules.
when_to_use: >
Use for a static diagram image bound for slides, email, social, or offline
use, or a freeform architecture infographic needing pixel control or precise
Korean line wrapping. Markdown-embedded diagrams that change often or stay
locale-synced remain mermaid.
license: Apache-2.0
compatibility: Designed for Claude Code
allowed-tools: Read, Write, Edit, Grep, Glob, Bash
user-invocable: true
metadata:
version: "1.0.0"
category: "domain"
status: "active"
updated: "2026-07-24"
modularized: "true"
tags: "svg, infographic, diagram, architecture, flow, png, chromium, cjk, layout"
related-skills: "moai-domain-html-report"
# MoAI Extension: Progressive Disclosure
progressive_disclosure:
enabled: true
level1_tokens: 100
level2_tokens: 5000
SVG Technical Infographic
Produce a hand-editable SVG diagram whose geometry was decided by arithmetic rather than by eye, plus a 2x PNG raster of it. The output is one static image: no animation, no scripting, no external asset at view time.
Step 0 — Decide whether this is an SVG job
This skill is **additive to the mermaid pipeline, never a replacement for it**. Nothing here migrates, rewrites, or deprecates an existing mermaid diagram, and no diagram should ever exist in both forms — that is dual maintenance, and it is the one failure this section exists to prevent.
Route the request before drawing anything:
| Signal | Route to | |--------|----------| | The diagram lives inside a markdown document | mermaid | | It changes often, alongside the prose around it | mermaid | | It is a standard type: flow, sequence, ER, state, class, gantt | mermaid | | Its text labels are kept in sync across locales | mermaid | | The deliverable is an image file for slides, email, social, or offline reading | this skill | | It is a freeform architecture or concept infographic with no standard shape | this skill | | Pixel-level control of position, spacing, or layering is required | this skill | | Korean or other CJK labels must wrap at exact, verified widths | this skill |
When several signals point both ways, mermaid wins: a mermaid block is cheaper to keep correct than an image. Choose this skill only when the routing table gives it an unopposed reason.
**One diagram, one home.** If a mermaid version already exists, either replace it outright (and delete the mermaid block in the same change) or leave it alone. Never ship both.
Runtime prerequisites and degradation
Node 18 or later and a headless Chromium-family browser are needed **only to lint and to render**. Neither is needed to install this skill, to discover it, or to author the editable SVG — authoring is always available.
| Node 18+ | Headless Chromium | What is delivered | |----------|-------------------|-------------------| | present | present | Editable SVG, machine lint report, 2x PNG with the browser executable and version disclosed and PNG header dimensions verified | | present | absent | Editable SVG plus machine lint report. State plainly that no headless browser was found and no PNG was produced | | absent | either | Editable SVG plus the manual checklist result from `references/authoring.md`. Do **not** attach a machine-lint label, and do not claim a render |
Never fabricate a PNG, a pixel dimension, or a lint verdict for a tool that did not run. Say which step was skipped and why.
The workflow
Six steps, in order. Steps 1 through 3 finish before a single SVG element is written; that ordering is the whole method.
1. **Frame.** Write down the message the diagram must land, the target medium (slide, README hero, email, print), the canvas size, and the label language. 2. **Pick an archetype.** Architecture stack, left-to-right flow, side-by-side comparison, or hierarchy tree. Skeletons are in `references/archetypes.md`. 3. **Run the numeric layout pass.** Produce the box table and pass every containment and text-budget check below. Do not proceed on a failing row. 4. **Author the SVG** from the table. Every coordinate is either a table value or a formula over table values. 5. **Lint the source** with `scripts/check-svg.mjs`. Clear every error; triage every warning. 6. **Render and verify** with `scripts/render.mjs`. Confirm the reported PNG dimensions match the requested 2x target, then look at the PNG.
The numeric layout pass
Build one table before authoring. Four owned columns per box — `id`, `x`, `y`, `w`, `h` — and nothing else is typed by hand. Every other number in the file is derived from those.
**Grid.** For canvas width `W`, `n` columns, outer margin `M`, gutter `G`:
colW = (W - 2*M - (n-1)*G) / n
colX(i) = M + i * (colW + G)
If `colW` falls below the archetype's minimum card width, reduce `n` or widen `W`. Do not shrink the margin to rescue a column count.
**Containment.** Check every row, and stop if any fails:
M <= x and x + w <= W - M
M <= y and y + h <= H - M
parent.x + pad <= child.x and child.x + child.w <= parent.x + parent.w - pad
**Derived geometry.** Centers and anchors come from the box, never from a per-language nudge:
cx = x + w/2
cy = y + h/2
iconCenter = (x + pad + iconR, y + h/2)
titleBaseline = y + pad + titleSize
lineBaseline(k) = titleBaseline + titleGap + k*lineHeight
If you find yourself moving an icon down three units "because the Korean text sits low", the formula is wrong. Fix the formula, not the instance. Hand-tuned per-language offsets are exactly the render-fix loop this method removes.
**Connectors.** Endpoints are derived too; the arrowhead length is
Read more
name: moai-domain-svg-infographic description: > Author editable SVG technical infographics — architecture, flow, comparison, hierarchy — by computing the layout numerically before writing markup, then rendering a 2x PNG via headless Chromium. Carries a CJK-first font stack, a deterministic source lint, and mermaid-vs-SVG selection rules. when_to_use: > Use for a static diagram image bound for slides, email, social, or offline use, or a freeform architecture infographic needing pixel control or precise Korean line wrapping. Markdown-embedded diagrams that change often or stay locale-synced remain mermaid. license: Apache-2.0 compatibility: Designed for Claude Code allowed-tools: Read, Write, Edit, Grep, Glob, Bash user-invocable: true metadata: version: "1.0.0" category: "domain" status: "active" updated: "2026-07-24" modularized: "true" tags: "svg, infographic, diagram, architecture, flow, png, chromium, cjk, layout" related-skills: "moai-domain-html-report" # MoAI Extension: Progressive Disclosure progressive_disclosure: enabled: true level1_tokens: 100 level2_tokens: 5000
SVG Technical Infographic
Produce a hand-editable SVG diagram whose geometry was decided by arithmetic rather than by eye, plus a 2x PNG raster of it. The output is one static image: no animation, no scripting, no external asset at view time.
Step 0 — Decide whether this is an SVG job
This skill is **additive to the mermaid pipeline, never a replacement for it**. Nothing here migrates, rewrites, or deprecates an existing mermaid diagram, and no diagram should ever exist in both forms — that is dual maintenance, and it is the one failure this section exists to prevent.
Route the request before drawing anything:
| Signal | Route to | |--------|----------| | The diagram lives inside a markdown document | mermaid | | It changes often, alongside the prose around it | mermaid | | It is a standard type: flow, sequence, ER, state, class, gantt | mermaid | | Its text labels are kept in sync across locales | mermaid | | The deliverable is an image file for slides, email, social, or offline reading | this skill | | It is a freeform architecture or concept infographic with no standard shape | this skill | | Pixel-level control of position, spacing, or layering is required | this skill | | Korean or other CJK labels must wrap at exact, verified widths | this skill |
When several signals point both ways, mermaid wins: a mermaid block is cheaper to keep correct than an image. Choose this skill only when the routing table gives it an unopposed reason.
**One diagram, one home.** If a mermaid version already exists, either replace it outright (and delete the mermaid block in the same change) or leave it alone. Never ship both.
Runtime prerequisites and degradation
Node 18 or later and a headless Chromium-family browser are needed **only to lint and to render**. Neither is needed to install this skill, to discover it, or to author the editable SVG — authoring is always available.
| Node 18+ | Headless Chromium | What is delivered | |----------|-------------------|-------------------| | present | present | Editable SVG, machine lint report, 2x PNG with the browser executable and version disclosed and PNG header dimensions verified | | present | absent | Editable SVG plus machine lint report. State plainly that no headless browser was found and no PNG was produced | | absent | either | Editable SVG plus the manual checklist result from `references/authoring.md`. Do **not** attach a machine-lint label, and do not claim a render |
Never fabricate a PNG, a pixel dimension, or a lint verdict for a tool that did not run. Say which step was skipped and why.
The workflow
Six steps, in order. Steps 1 through 3 finish before a single SVG element is written; that ordering is the whole method.
1. **Frame.** Write down the message the diagram must land, the target medium (slide, README hero, email, print), the canvas size, and the label language. 2. **Pick an archetype.** Architecture stack, left-to-right flow, side-by-side comparison, or hierarchy tree. Skeletons are in `references/archetypes.md`. 3. **Run the numeric layout pass.** Produce the box table and pass every containment and text-budget check below. Do not proceed on a failing row. 4. **Author the SVG** from the table. Every coordinate is either a table value or a formula over table values. 5. **Lint the source** with `scripts/check-svg.mjs`. Clear every error; triage every warning. 6. **Render and verify** with `scripts/render.mjs`. Confirm the reported PNG dimensions match the requested 2x target, then look at the PNG.
The numeric layout pass
Build one table before authoring. Four owned columns per box — `id`, `x`, `y`, `w`, `h` — and nothing else is typed by hand. Every other number in the file is derived from those.
**Grid.** For canvas width `W`, `n` columns, outer margin `M`, gutter `G`:
colW = (W - 2*M - (n-1)*G) / n colX(i) = M + i * (colW + G)
If `colW` falls below the archetype's minimum card width, reduce `n` or widen `W`. Do not shrink the margin to rescue a column count.
**Containment.** Check every row, and stop if any fails:
M <= x and x + w <= W - M M <= y and y + h <= H - M parent.x + pad <= child.x and child.x + child.w <= parent.x + parent.w - pad
**Derived geometry.** Centers and anchors come from the box, never from a per-language nudge:
cx = x + w/2 cy = y + h/2 iconCenter = (x + pad + iconR, y + h/2) titleBaseline = y + pad + titleSize lineBaseline(k) = titleBaseline + titleGap + k*lineHeight
If you find yourself moving an icon down three units "because the Korean text sits low", the formula is wrong. Fix the formula, not the instance. Hand-tuned per-language offsets are exactly the render-fix loop this method removes.
**Connectors.** Endpoints are derived too; the arrowhead length is
Agentic development harness for Claude Code — SPEC-driven plan/run/sync, TRUST 5 quality gates, model+effort routing, and Claude×GLM multi-LLM cost control. Single Go binary, 16 languages, zero deps.
Repo: modu-ai/moai-adk
Other skills on moai-adk.
- /hns-lsel-applier
Local Self-Evolution Loop (LSEL) APPLY engine — the playback-only consumer of approved decision.json records that drives `.moai/hooks/lsel-apply.sh` for the GOOS-local PROPOSE→APPLY seam closure (SPEC-LSEL-LOCAL-EVOLUTION-001 M3). Reads an approved decision.json, validates the
Open skill - /hns-lsel-curator
Local Self-Evolution Loop (LSEL) curator — the CLUSTER + drain engine for the GOOS-local PROPOSE→APPLY seam closure (SPEC-LSEL-LOCAL-EVOLUTION-001). Companion-offset drain of .moai/lessons-inbox.jsonl with a drain-side severity filter that drops the ~65% Bash-timeout/sandbox
Open skill - /hns-moaiadk-best-practices
moai-adk-go best-practices reference for the 4 harness specialists (cli-template-specialist, quality-specialist, workflow-specialist, hook-ci-specialist). Covers TRUST 5 gates, Go test isolation (t.TempDir, no OTEL env in parallel tests), hardcoding-prevention rules (env
Open skill - /hns-moaiadk-dev-reference
moai-adk-go local dev reference — version management/release process (sec 5), shell-script hook development (sec 7), build & dev commands (sec 10). Load only when performing these specific tasks.
Open skill - /hns-moaiadk-patterns
moai-adk-go domain-patterns reference for the 4 harness specialists (cli-template-specialist, quality-specialist, workflow-specialist, hook-ci-specialist). Covers the CLI/template/config/hook/spec subsystem architecture, key source paths, the Pipeline specialist delegation map,
Open skill - /hns-oss-docs-i18n-rules
HARD i18n rules digest for the oss-docs harness specialists working on moai-adk-go README 4-locale set and the docs-site (adk.mo.ai.kr). Covers the canonical-locale chains, the 4-locale same-PR obligation, Mermaid TD-only, the no-emoji + icon-shortcode rule, emphasis-marker
Open skill

