infographic-creator
An infographic transforms data, information, and knowledge into perceptible visual language. It combines visual design and data visualization, using intuitive symbols to compress complex information and help the audience quickly understand and remember the 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 the template list, data structures, themes, etc.
Specifications
AntV Infographic Syntax
The AntV Infographic syntax is a custom DSL used to describe the rendering configuration of infographics. It uses indentation to express structure, making it suitable for AI to directly generate and stream output. The core information includes:
- template: Express the information structure using a template.
- data: Infographic data, containing
title,desc, and the main data field. - theme: Theme configuration, containing
palette, fonts, stylization, etc.
For example:
infographic list-row-horizontal-icon-arrow
data
title Title
desc Description
lists
- label Label
value 12.5
desc Explanation
icon document text
theme
palette #3b82f6 #8b5cf6 #f97316
Strict Syntax Rules
- The first line must be
infographic <template-name>. - Only write the template name itself in the template list; when actually outputting, the first line must explicitly write the
infographicprefix. - Use
data/themeblocks, with a uniform two-space indentation within the block. - Key-value pairs are written as
key space value; object arrays use-as an item prefix. iconuses icon keywords, such asstar fill,mingcute/server-line.valueshould try to use pure numbers; numerical units are preferred to be expressed inlabelordesc.paletteis recommended to use inline simple array syntax, such aspalette #4f46e5 #06b6d4 #10b981.- The color values in
paletteare raw values, without quotes and commas. dataonly contains one main data field matching the template, avoid mixinglists,sequences,compares,values,root,nodesat the same time.
Main data field selection rules:
list-*→listssequence-*→sequences, optionalorder asc|descsequence-interaction-*→sequences+relationssequencesrepresents the lane list- Each lane must contain a
label - The
childrenof each lane represent the node list - Every item under
childrenmust be written as an object item and contain alabel - Nodes can optionally have
id,icon,step,desc,value stepis used to represent the time level; the samestepis at the same height
compare-*→comparescompare-binary-*/compare-hierarchy-left-right-*- The first level of
comparesmust and can only have two root nodes, representing the two sides of the comparison respectively - Both root nodes should contain
children - The real comparison items are written under their respective
children - Every item under
childrenmust be written as an object item and contain alabel - Even if each side has only 1 metric, it must be written as an object item inside
children
- The first level of
compare-swotcomparescan directly contain multiple root nodes- Each root node can optionally have
children
compare-quadrant-*comparesdirectly contains 4 quadrant root nodes
hierarchy-structure→itemshierarchy-*→ Singleroot, recursively nested throughchildrenrelation-*→nodes+relations- Simple relationships can also directly use arrow syntax to express relationships
chart-*→valueschart-line-plain-text/chart-bar-plain-text/chart-column-simpleall use a single ordered sequence ofvalues- Each data point uses
labelto represent the category, andvalueto represent the numerical value - The order of line charts is expressed by the arrangement order of items in
values
- When the structure cannot be clearly judged, use
itemsas a fallback
Theme rules:
themeis used for custom themes, such aspalette,base,stylize- Use
theme.base.text.font-familyto specify the font, such as851tegakizatsu - Use
theme.stylizeto select built-in styles and pass parametersrough: hand-drawn effectpattern: pattern filllinear-gradient/radial-gradient: gradient style
- Only output the Infographic syntax itself, do not output JSON, explanatory text, or additional Markdown paragraphs
Data Syntax Examples
Provide concise but complete positive examples by template category:
list-*templates
infographic list-grid-badge-card
data
title Feature List
lists
- label Fast
icon flash fast
- label Secure
icon shield check
sequence-*templates
infographic sequence-ascending-steps
data
title Release Process
sequences
- label Requirement Confirmation
- label Development Implementation
- label Release to Production
order asc
sequence-interaction-*templates
infographic sequence-interaction-compact-animated-badge-card
data
title Login Verification Process
sequences
- label User
children
- label Initiate Login
id user-login
step 0
- label Receive Result
id user-result
step 2
- label Server
children
- label Verify Credentials
id server-verify
step 1
- label Return Result
id server-return
step 2
relations
user-login - Submit Account Password -> server-verify
server-verify - Generate Result -> server-return
server-return - Return Result -> user-result
hierarchy-*templates
infographic hierarchy-tree-curved-line-rounded-rect-node
data
title Organizational Structure
root
label Company
children
- label Product Department
- label Technology Department
compare-swottemplates
infographic compare-swot
data
title Product SWOT
compares
- label Strengths
children
- label High Brand Awareness
- label Weaknesses
children
- label High Cost Pressure
compare-binary-*templates
infographic compare-binary-horizontal-simple-fold
data
title Dining Table Price Comparison
compares
- label Original Price
children
- label Original Price
value 500
icon tag
- label Actual Payment
children
- label Actual Payment
value 450
icon check bold
compare-quadrant-*templates
infographic compare-quadrant-quarter-simple-card
data
title Task Priority
compares
- label High Value Low Cost
- label High Value High Cost
- label Low Value Low Cost
- label Low Value High Cost
chart-line-plain-texttemplates
infographic chart-line-plain-text
data
title Model A Accuracy Change
desc Most obvious improvement in week 4
values
- label Week1
value 86.5
- label Week2
value 87.3
- label Week3
value 89.1
- label Week4
value 91.2
theme
palette #4f46e5 #db2777 #14b8a6
relation-*templates
infographic relation-dagre-flow-tb-simple-circle-node
data
title System Relationship
nodes
- label API
- id db
label DB
relations
API - Read/Write -> db
- Fallback
itemsexamples
infographic list-row-horizontal-icon-arrow
data
title Key Points Summary
items
- label Efficiency First
desc Focus on key actions
- label Results Oriented
desc Output actionable conclusions
Available Templates
- chart-bar-plain-text
- chart-column-simple
- chart-line-plain-text
- chart-pie-compact-card
- chart-pie-donut-pill-badge
- chart-pie-donut-plain-text
- chart-pie-plain-text
- chart-wordcloud
- compare-binary-horizontal-badge-card-arrow
- compare-binary-horizontal-simple-fold
- compare-binary-horizontal-underline-text-vs
- compare-hierarchy-left-right-circle-node-pill-badge
- compare-quadrant-quarter-circular
- compare-quadrant-quarter-simple-card
- compare-swot
- hierarchy-mindmap-branch-gradient-capsule-item
- hierarchy-mindmap-level-gradient-compact-card
- hierarchy-structure
- hierarchy-tree-curved-line-rounded-rect-node
- hierarchy-tree-tech-style-badge-card
- hierarchy-tree-tech-style-capsule-item
- list-column-done-list
- list-column-simple-vertical-arrow
- list-column-vertical-icon-arrow
- list-grid-badge-card
- list-grid-candy-card-lite
- list-grid-ribbon-card
- list-row-horizontal-icon-arrow
- list-sector-plain-text
- list-waterfall-badge-card
- list-waterfall-compact-card
- list-zigzag-down-compact-card
- list-zigzag-down-simple
- list-zigzag-up-compact-card
- list-zigzag-up-simple
- relation-dagre-flow-tb-animated-badge-card
- relation-dagre-flow-tb-animated-simple-circle-node
- relation-dagre-flow-tb-badge-card
- relation-dagre-flow-tb-simple-circle-node
- sequence-ascending-stairs-3d-underline-text
- sequence-ascending-steps
- sequence-circular-simple
- sequence-color-snake-steps-horizontal-icon-line
- sequence-cylinders-3d-simple
- sequence-filter-mesh-simple
- sequence-funnel-simple
- sequence-horizontal-zigzag-underline-text
- sequence-mountain-underline-text
- sequence-pyramid-simple
- sequence-roadmap-vertical-plain-text
- sequence-roadmap-vertical-simple
- sequence-snake-steps-compact-card
- sequence-snake-steps-simple
- sequence-snake-steps-underline-text
- sequence-stairs-front-compact-card
- sequence-stairs-front-pill-badge
- sequence-timeline-rounded-rect-node
- sequence-timeline-simple
- sequence-zigzag-pucks-3d-simple
- sequence-zigzag-steps-underline-text
- sequence-interaction-default-badge-card
- sequence-interaction-default-animated-badge-card
- sequence-interaction-default-compact-card
- sequence-interaction-default-capsule-item
- sequence-interaction-default-rounded-rect-node
Template Selection Suggestions
- Strict sequence, step advancement, stage evolution →
sequence-* - Multi-role or multi-system interaction →
sequence-interaction-* - Parallel key points enumeration →
list-row-*/list-column-*/list-grid-* - Comparison of two sides, plan comparison, before/after comparison →
compare-binary-*- First determine who the two sides are
- Then expand
childrenseparately for the two sides
- SWOT analysis →
compare-swot - Quadrant analysis →
compare-quadrant-* - Hierarchical tree structure →
hierarchy-tree-* - Statistical trends, single sequence changes →
chart-line-plain-text - Statistical comparison, single group numerical comparison →
chart-bar-plain-text/chart-column-simple - Node relationship, process dependency →
relation-* - Word frequency topic display →
chart-wordcloud - Mind map →
hierarchy-mindmap-*
Complete Output Example
infographic list-row-horizontal-icon-arrow
data
title Product Growth Key Points
desc Focus on three stages: acquisition, conversion, and repurchase
lists
- label Acquisition
desc Multi-channel delivery and content reach
icon rocket launch
- label Conversion
desc Optimize path and reduce churn
icon chart line
- label Repurchase
desc Member privileges and tiered operations
icon repeat
theme
palette #3b82f6 #8b5cf6 #f97316
Output Format
Only output a single plain code block, do not add any explanatory text:
infographic list-row-horizontal-icon-arrow
data
title Title
desc Description
lists
- label Item
value 12.5
desc Explanation
icon document text
theme
palette #3b82f6 #8b5cf6 #f97316
Self-Check List
Before outputting, check the following items:
- Is the first line
infographic <template-name>? - Have you only used one main data field matching the template?
- Is
palettean array of raw color values without quotes and commas? - Are the lane nodes of
sequence-interaction-*all written aschildren -> - label ...? - For
compare-binary-*/compare-hierarchy-left-right-*, are there only two root nodes, and is the content of both sides placed under their respectivechildren? - Does every item under
childrenexplicitly contain alabel? - Does
chart-line-plain-textuse a single ordered sequence ofvalues? - Is there no JSON, explanatory text, or extra code blocks in the output?
Generation Process
Step 1: Understand User Needs
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 description of the content, it should be decomposed into a clear and concise structure.
Otherwise, you need to clarify with the user (e.g., "Please provide a clear and concise content description.", "Which template do you want to use?")
- Extract key information structures (title, desc, items, etc.).
- Clarify required data fields (title, desc, items, label, value, icon, etc.).
- Choose an appropriate template.
- Use AntV Infographic syntax to describe the infographic content
{syntax}.
Key Note: You must respect the language input by the user. For example, if the user inputs Chinese, the text in the syntax must also be Chinese.
Step 2: Render Infographic
After obtaining the final AntV Infographic syntax, you can generate a complete HTML file according to the following steps:
- Create a complete HTML file containing the following structure:
- DOCTYPE and HTML meta (charset: utf-8)
- Title:
{title} - Infographic - Include AntV Infographic script:
https://unpkg.com/@antv/infographic@latest/dist/infographic.min.js - Create a container div with id
container - Initialize Infographic (
width: '100%',height: '100%') - Replace
{title}with the actual title - Replace
{syntax}with the actual AntV Infographic syntax - Add SVG export functionality:
const svgDataUrl = await infographic.toDataURL({ type: 'svg' });
Reference HTML template:
<div id="container"></div>
<script src="https://unpkg.com/@antv/infographic@latest/dist/infographic.min.js"></script>
<script>
const infographic = new AntVInfographic.Infographic({
container: '#container',
width: '100%',
height: '100%',
});
infographic.render(`{syntax}`);
document.fonts?.ready.then(() => {
infographic.render(`{syntax}`);
}).catch((error) => console.error('Error waiting for fonts to load:', error));
</script>
-
Use the Write tool to generate an HTML file, named
<title>-infographic.html -
Present it to the user:
- Provide the generated file path and prompt: "Open directly with a browser to view and save SVG"
- Output the syntax and prompt: "Let me know if you need to adjust the template/color scheme/content"
Note: The HTML file must contain:
- SVG export implemented via an export button
- Responsive container with both width and height set to 100%
More from hrdtbs/agent-skills
plan-self-review
Self-evaluate a plan on a 100-point scale after it is created or updated. Make sure to use this skill immediately whenever you create a plan or update a plan, even if the user does not explicitly ask for a review. This skill ensures that the plan is clear, comprehensive, feasible, and consistent before execution.
45create-pull-request
Create a GitHub pull request safely and reliably using project conventions. Make sure to use this skill whenever the user asks to create a PR, submit changes for review, open a pull request, or mentions "PR", "プルリク", or "pull request". It handles commit verification, branch validation, and PR creation using the gh CLI.
40commit
Expert-level commit creation and formatting following Conventional Commits. Make sure to use this skill whenever you need to create a commit message, save changes to git, structure a logical commit history, or when the user mentions 'commit', 'git commit', 'コミット', '変更をコミット', or asks you to push their code.
39mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
3prompt-evaluator
Evaluate and score user-written LLM prompts on a 100-point scale across 5 axes (Clarity, Structure, Information Content, Specificity, Context), providing specific improvement suggestions and a revised prompt. Make sure to use this skill whenever the user asks to evaluate, review, score, or improve a prompt, or when they say things like 'このプロンプトどう?', 'プロンプトを評価して', 'rate my prompt', 'review this prompt', or 'is this prompt good enough?'. This skill focuses on scoring existing prompts, not writing new ones from scratch.
3skill-judge
Evaluate Agent Skill design quality against official specifications and best practices. Use when reviewing, auditing, or improving SKILL.md files and skill packages. Provides multi-dimensional scoring and actionable improvement suggestions.
3