npx skills add ...
npx skills add antvis/chart-visualization-skills --skill infographic-creator
Create beautiful infographics based on given text content. Use when users request to create infographics.
npx skills add antvis/chart-visualization-skills --skill infographic-creator
Infographics convert data, information, and knowledge into perceptible visual language. They combine visual design with data visualization, compressing complex information with intuitive symbols to help audiences quickly understand and remember key points.
Infographic = Information Structure + Visual Expression
This task uses AntV Infographic to create visual infographics.
Before starting the task, you need to understand the AntV Infographic syntax specifications, including template list, data structure, themes, etc.
AntV Infographic syntax is a custom DSL used to describe infographic rendering configurations. It uses indentation to describe information, has strong robustness, and is convenient for AI streaming output and infographic rendering. It mainly contains the following information:
For example:
The first line must be infographic <template-name>, template selected from the list below (see "Available Templates" section).
Use data / theme blocks, with two-space indentation within blocks.
Key-value pairs use "key space value"; arrays use - as entry prefix.
icon uses icon keywords (e.g., star fill).
data should contain title/desc + template-specific main data field (not necessarily items).
Main data field selection (use only one, avoid mixing):
list-* → listssequence-* → sequences (optional order asc|desc)compare-* → compares (supports children for grouped comparisons), can contain multiple comparison itemshierarchy-structure → items (each item corresponds to an independent hierarchy, each level can contain sub-items, can be nested up to 3 levels)hierarchy-* → single root (tree structure, nested through children);relation-* → nodes + relations; simple relation diagrams can omit nodes, using arrow syntax in relationschart-* → values (numeric statistics, optional category)items as fallback when uncertaincompare-binary-* / compare-hierarchy-left-right-* binary templates: must have two root nodes, all comparison items hang under these two root nodes' children
hierarchy-*: use single root, nested through children (do not repeat root)
theme is used to customize themes (palette, font, etc.)
For example: dark theme + custom color scheme
Use theme.base.text.font-family to specify font, such as handwriting style 851tegakizatsu
Use theme.stylize to select built-in styles and pass parameters
Common styles:
rough: hand-drawn effectpattern: pattern filllinear-gradient / radial-gradient: linear/radial gradientFor example: hand-drawn style (rough)
Do not output JSON, Markdown, or explanatory text
Data syntax examples by template category (use corresponding fields, avoid adding items simultaneously):
list-* templatessequence-* templateshierarchy-* templatescompare-* templatesQuadrant diagram
chart-* templatesrelation-* templatesEdge label syntax: A -label-> B or A -->|label| B
items exampleTemplate Selection Recommendations:
sequence-*
sequence-timeline-*sequence-stairs-*sequence-roadmap-vertical-*sequence-zigzag-*sequence-circular-simplesequence-color-snake-steps-*sequence-pyramid-simplelist-row-* or list-column-*compare-binary-*compare-swothierarchy-tree-*chart-*compare-quadrant-*list-grid-*relation-*chart-wordcloudhierarchy-mindmap-*Creating an Internet technology evolution infographic
Before creating an infographic, first understand the user's needs and the information they want to express, in order to determine the template and data structure.
If the user provides a clear content description, it should be broken down into a clear and concise structure.
Otherwise, clarification from the user is needed (e.g., "Please provide a clear and concise content description.", "Which template do you want to use?")
{syntax}.Key Note: Must respect the language of user input. For example, if the user inputs in Chinese, the text in the syntax must also be in Chinese.
When you have the final AntV Infographic syntax, you can generate a complete HTML file following these steps:
{title} - Infographichttps://unpkg.com/@antv/infographic@latest/dist/infographic.min.jscontainerwidth: '100%', height: '100%'){title} with actual title{syntax} with actual AntV Infographic syntaxconst svgDataUrl = await infographic.toDataURL({ type: 'svg' });Reference HTML template:
Use the Write tool to generate HTML file, named as <title>-infographic.html
Show to user:
Note: The HTML file must include: