简介
Mindchart
原始描述
Create exquisite infographics from user-uploaded files or given text. Used when user requests to create an infographic.
通过你的 Agent 添加
安装目录:mindchart/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: mindchart description: Create exquisite infographics from user-uploaded files or given text. Used when user requests to create an infographic. requirements: Requires node or bun environment, install the following dependencies:@antv/infographic, opentype.js, sharp
Infographics transform data, information, and knowledge into perceptible visual language. They combine visual design with data visualization, using intuitive symbols to compress complex information, helping audiences quickly understand and remember key points.
Before starting the task, you need to understand the AntV Infographic syntax specification, including template list, data structure, theme, etc.
Strictly follow the generation workflow without any deviation
Specifications
AntV Infographic Syntax
AntV Infographic syntax is a custom DSL for describing infographic rendering configuration. It uses indentation to express structure, suitable for AI to directly generate and stream output. Core information includes:
- template: Expresses information structure using templates.
- data: Infographic data, containing
title,desc, and main data fields. - theme: Theme configuration, containing
palette, fonts, stylization, etc.
Mandatory Syntax Rules
- The first line must be
infographic <template-name>.
- Template list only contains the template name itself; when actually outputting, the first line must explicitly write the
infographic prefix.
- Use
data / theme blocks, with uniform two-space indentation within blocks.
- Key-value pairs use
key space value; object arrays use - as item prefix.
icon uses icon keywords, e.g., star fill, mingcute/server-line.
value should preferably use pure numeric values; numeric units should preferably be expressed in label or desc.
palette recommends using inline simple array syntax, e.g., palette #4f46e5 #06b6d4 #10b981.
- Color values in
palette are bare values, no quotes, no commas.
data should contain only one main data field matching the template, avoid mixing lists, sequences, compares, values, root, nodes simultaneously.
infographic <template-name>.infographic prefix.data / theme blocks, with uniform two-space indentation within blocks.key space value; object arrays use - as item prefix.icon uses icon keywords, e.g., star fill, mingcute/server-line.value should preferably use pure numeric values; numeric units should preferably be expressed in label or desc.palette recommends using inline simple array syntax, e.g., palette #4f46e5 #06b6d4 #10b981.palette are bare values, no quotes, no commas.data should contain only one main data field matching the template, avoid mixing lists, sequences, compares, values, root, nodes simultaneously.Main data field selection rules:
list-*→listssequence-*→sequences, optionalorder asc|descsequence-interaction-*→sequences+relationssequencesrepresents swimlane list- Each swimlane must contain
label childrenof each swimlane represents node list- Each item under
childrenmust be written as an object entry and containlabel - Nodes optionally have
id,icon,step,desc,value stepis used to indicate time hierarchy; samestepis at the same height
compare-*→comparescompare-binary-*/compare-hierarchy-left-right-*- The first layer of
comparesmust have exactly two root nodes, representing the two parties being compared - Both root nodes should contain
children - The actual comparison items are written under their respective
children - Each item under
childrenmust be written as an object entry and containlabel - Even if each side has only 1 metric, write it as 1 object entry inside
children
- The first layer of
compare-swotcomparescan directly contain multiple root nodes- Each root node optionally has
children
compare-quadrant-*comparesdirectly contains 4 quadrant root nodes
hierarchy-structure→itemshierarchy-*→ singleroot, recursively nested throughchildrenrelation-*→nodes+relations- Simple relations can also directly use arrow syntax to express relationships
chart-*→valueschart-line-plain-text/chart-bar-plain-text/chart-column-simpleall use single orderedvalues- Each data point uses
labelfor category, usesvaluefor numeric value - Line chart order is expressed by the order of entries in
values
- When structure cannot be clearly determined, use
itemsas fallback
Theme rules:
themeis used for custom themes, e.g.,palette,base,stylize- Use
theme.base.text.font-familyto specify font, e.g.,851tegakizatsu - Use
theme.stylizeto select built-in styles and pass parametersrough: hand-drawn effectpattern: pattern filllinear-gradient/radial-gradient: gradient style
- Only output Infographic syntax itself, do not output JSON, explanatory text, or additional Markdown paragraphs
Template Selection Guidelines
- Strict sequence, step progression, stage evolution →
sequence-*
- Multi-role or multi-system interaction →
sequence-interaction-*
- Parallel point enumeration →
list-row-* / list-column-* / list-grid-*
- Two-party comparison, plan comparison, before/after comparison →
compare-binary-*
- First determine who the two parties are
- Then expand
children for each party respectively
- 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 numeric comparison →
chart-bar-plain-text / chart-column-simple
- Node relationships, process dependencies →
relation-*
- Word frequency theme display →
chart-wordcloud
- Mind map →
hierarchy-mindmap-*
Output Format
sequence-*sequence-interaction-*list-row-* / list-column-* / list-grid-*compare-binary-*
- First determine who the two parties are
- Then expand
childrenfor each party respectively
compare-swotcompare-quadrant-*hierarchy-tree-*chart-line-plain-textchart-bar-plain-text / chart-column-simplerelation-*chart-wordcloudhierarchy-mindmap-*Only output one plain code block, without any explanatory text:
infographic list-row-horizontal-icon-arrow
data
title Title
desc Description
lists
- label Item
value 12.5
desc Description
icon document text
theme
palette #3b82f6 #8b5cf6 #f97316
Generation Workflow
Step 1: Understand User Requirements and Select Suitable Template
Deeply think and understand user requirements, select one appropriate template according to the Template Selection Guidelines above.
Template directory: mindchart/templates/
Step 2: Generate Infographic Syntax File
Generate infographic syntax file according to template syntax and the Specifications above.
- Syntax file format:
{title}.md - Ensure the generated infographic displays with white background and black text and icons
- Ensure the length of
descfield is less than 17 tokens
Self-Check Checklist
Before outputting, check the following:
- Is the first line
infographic <template-name>? - Is only one main data field matching the template used?
- Is
paletteusing bare color values without quotes and commas? - Are swimlane nodes of
sequence-interaction-*all written aschildren -> - label ...? - Do
compare-binary-*/compare-hierarchy-left-right-*have only two root nodes, with content on both sides placed under their respectivechildren? - Does each item under
childrenexplicitly containlabel? - Does
chart-line-plain-textuse single orderedvalues? - Is there no JSON, explanatory text, or extra code blocks in the output?
Step 3: Generate SVG File
node mindchart/scripts/ifgc2svg {title}.md {title}.svg
Step 4: Convert to PNG File
node mindchart/scripts/svg2png {title}.svg {title}.png
Step 5: Return PNG File
- If user is using openclaw or other bot, send png as a image to the user
- In other cases, save svg and png to the specified directory or project directory
node mindchart/scripts/ifgc2svg {title}.md {title}.svg
node mindchart/scripts/svg2png {title}.svg {title}.png
Step 5: Return PNG File
- If user is using openclaw or other bot, send png as a image to the user
- In other cases, save svg and png to the specified directory or project directory
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。