infographic-syntax
Author infographics with the AntV declarative DSL — pick a template, fill a small indented data tree, and save as an artifact (kind=infographic) that renders to crisp SVG and streams as you write it. Load when the user wants an infographic, a visual summary, a comparison/steps/hierarchy/stats graphic, or "make this look like a poster/diagram".
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-05
- Stars
- ★ 212
- Forks
- 33
01 前言 Front Matter
- name
- infographic-syntax
- triggers
- infographic, visual summary, poster, data storytelling, steps graphic, comparison graphic, swot, mind map, hierarchy diagram, stat cards, process diagram, timeline graphic, make it visual, turn this into a graphic
- description
- Author infographics with the AntV declarative DSL — pick a template, fill a small indented data tree, and save as an artifact (kind=infographic) that renders to crisp SVG and streams as you write it. Load when the user wants an infographic, a visual summary, a comparison/steps/hierarchy/stats graphic, or "make this look like a poster/diagram".
03 SKILL.md 正文
Infographic Syntax
Gideon renders infographics from a compact, declarative DSL (powered by the AntV Infographic engine). You write a few indented lines — a template name plus a small data tree — and the system renders professional SVG. The syntax is highly fault-tolerant, so it renders as you stream it.
Save an infographic as an artifact with kind=infographic; the body is the DSL
source (NOT HTML, NOT a widget). The Artifacts/Files viewer renders it live and
lets the user edit the DSL with a side-by-side preview.
When to use this vs a widget
- Infographic — structured information design: steps, comparisons, hierarchies, SWOT, stat cards, mind maps, process flows. Pick this when the shape of the information is the point and you want a polished, print-quality result fast.
- Widget (see the
visual-outputskill) — bespoke interactive HTML, custom charts, dashboards, tables, or anything needing live behavior/JS. - Mermaid (a ```mermaid fenced block) — flowcharts/sequence/ER graphs.
Format
The body is plain text: the first line is the template, then a data block with
an indented tree. Indentation (2 spaces) defines nesting; - starts a list item.
infographic list-row-simple-horizontal-arrow
data
title Onboarding in three steps
lists
- label Sign up
desc Create your account
- label Connect
desc Link your data sources
- label Ship
desc Launch your first workflow
- First token after
infographicis the template id (below). Omit it (or usedefault) and the engine picks a sensible layout for the data shape. dataholds the content. Common keys:title,desc,lists(the items),label/descper item, and template-specific keys (e.g. comparison sides).- Keep labels short — infographics are glanceable, not paragraphs.
Picking a template
Choose by the relationship you're showing (≈200 templates ship; these are the workhorses):
| Intent | Template family |
|---|---|
| Ordered steps / process | list-row-simple-horizontal-arrow, list-column-simple-vertical-arrow, horizontal-icon-arrow |
| Stat / KPI cards | list-grid-badge-card, list-grid-compact-card, indexed-card, circular-progress |
| Two-way comparison | compare-binary-horizontal-*-vs, compare-swot |
| Hierarchy / mind map | hierarchy-mindmap, hierarchy-structure, compare-hierarchy-left-right |
| Simple charts | chart-bar, chart-column, chart-line, chart-pie |
| Generic / let it choose | default |
If unsure, start with default or a list-* template and iterate — the user can
nudge the template in the editor and re-render instantly.
Streaming
Because the syntax tolerates partial input, emit the artifact body top-to-bottom
and it paints progressively. Lead with the infographic <template> line and the
title, then stream the list items — the user sees the structure form in real time.
Workflow
- Decide infographic is the right format (structured info-design, not interactive).
- Pick a template by relationship (table above).
artifact_save(kind="infographic", name="…", content=<DSL>)— the body is the DSL source. (Checkartifact_listfirst if iterating on an existing one, per theartifactsskill — thenartifact_update.)- The viewer renders it; the user can edit the DSL with live preview, or comment.
Pitfalls
- Don't wrap the DSL in a
<widget>tag or HTML —kind=infographicis its own type. Wrapping it makes it render as raw text. - Don't write prose paragraphs as labels — keep each item to a few words.
- Indentation is significant (2 spaces per level). Mixed tabs/spaces break nesting.
- One infographic per artifact.
04 同仓库更多 Skills
web-verify
Verify a built web page or app actually renders and works — drive it in a real browser, check the console and network, confirm the thing you changed is the thing being served, and capture evidence. Use before claiming a frontend change works.
visual-output
Emit rich visual output in chat via <widget> tags — styled HTML cards, charts, tables, interactive tools, and drawn SVG/canvas diagrams, illustrations, and animations — theme-aware, centered, and responsive instead of clashing or cramped.
task-and-project
Track work as Tasks (the /api/tasks CRUD + native task provider), and decompose larger projects into independent, verifiable units — fanning parallel investigation out to subagents while keeping one coherent plan; hand open-ended goal-driven work to a goal loop.
research-campaign
Run a multi-cycle research campaign — grill the question, decompose it into answerable sub-questions, investigate each against sources, then synthesize with confidence and gaps stated. Use for open questions that need real investigation rather than one lookup.
memory-discipline
When and how to persist durable memory — save genuine user preferences, facts, and corrections; NEVER persist transient environment failures (a failed command, a flaky network call, a one-off tool error) as lessons; recall before re-asking.
loop-worker
Per-cycle protocol for an autonomous goal loop worker — the unified autonomous goal engine that runs one self-directed cycle per turn until its goal is met, then self-retires. Drives one cycle against a loop's file interface (status.json gate, brief.md goal, guidance.txt nudges, findings/cycle_NNN.json, FINDINGS.md, the type-appropriate deliverable, STOP sentinel). The worker produces work and reports evidence; a deterministic check or a separate judge — never the worker — decides done-ness.