推荐并生成合适的数据可视化图表,使用 GPT-Vis 库。支持两种输出模式:(1)语法模式——生成 Syntax 或 JSON 配置;(2)代码模式——生成完整的运行代码。支持 26 种图表类型。

MITAuto-check passed

Install Gpt Vis

skills CLI
$ npx skills add antvis/chart-visualization-skills --skill gpt-vis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install antvis/chart-visualization-skills gpt-vis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/antvis/chart-visualization-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/gpt-vis .claude/skills/gpt-vis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gpt-vis
GitHub stars
506
Token cost
~2.5k tokens
SKILL.md length
375 words
Files
2 (incl. references)
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

推荐并生成合适的数据可视化图表,使用 GPT-Vis 库。支持两种输出模式:(1)语法模式——生成 Syntax 或 JSON 配置;(2)代码模式——生成完整的运行代码。支持 26 种图表类型。

  • Works in 3 steps: 意图识别:根据用户意图和数据特征选择图表类型 → 确定输出模式:根据上下文选择语法模式或代码模式 → 生成输出:按所选模式生成内容
  • SKILL.md covers 步骤, 支持的图表类型, 输出模式 and GPTVis API, plus 4 more sections
  • Calls npm; reaches unpkg.com

What it does

Gpt Vis is an agent skill from antvis/chart-visualization-skills. 推荐并生成合适的数据可视化图表,使用 GPT-Vis 库。支持两种输出模式:(1)语法模式——生成 Syntax 或 JSON 配置;(2)代码模式——生成完整的运行代码。支持 26 种图表类型。

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/summary.md`).

The repository describes itself as: ⛏️ Turning data into a visual language for better thinking with Skills. The licence is MIT.

Example prompts

  • “/gpt-vis”

Requirements

  • Node.js

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. 意图识别:根据用户意图和数据特征选择图表类型
  2. 确定输出模式:根据上下文选择语法模式或代码模式
  3. 生成输出:按所选模式生成内容

What it can do on your machine

Read from SKILL.md and the folder at commit a105fa1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • unpkg.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gpt Vis loads about 2.5k tokens when it runs, and up to ~4k if it reads all its reference files. Until then it costs about 27 tokens; SKILL.md has 375 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~27
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from antvis/chart-visualization-skills at commit a105fa1, republished under its MIT licence (© antvis). 375 words, ~2,453 tokens.

Download SKILL.mdSave it as .claude/skills/gpt-vis/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
gpt-vis
description
推荐并生成合适的数据可视化图表,使用 GPT-Vis 库。支持两种输出模式:(1)语法模式——生成 Syntax 或 JSON 配置;(2)代码模式——生成完整的运行代码。支持 26 种图表类型。

GPT-Vis 图表可视化技能

GPT-Vis 是一个 AI 原生的可视化库,专为 LLM 时代设计。它采用框架无关的架构,支持 26 种图表类型,通过简单自然的语法让 LLM 能够轻松生成高质量的可视化图表。

步骤

  1. 意图识别:根据用户意图和数据特征选择图表类型
  2. 确定输出模式:根据上下文选择语法模式或代码模式
  3. 生成输出:按所选模式生成内容

支持的图表类型

type 值适用场景
line时间序列趋势
area时间序列趋势+总量
column分类数据对比
bar分类对比(标签长)
pie部分占整体比例
scatter两变量关系
dual-axes不同量级数据对比
histogram连续数值频次分布
boxplot数据分布与异常值
violin数据分布密度
radar多维度对比
funnel流程转化率
waterfall累计增减变化
liquid百分比/进度
word-cloud词频展示
venn集合交并关系
treemap层级数据占比
sankey流量流向
flow-diagram流程步骤
mindmap层级知识梳理
indented-tree树节点层级/目录
network-graph实体间关联关系
organization-chart组织层级
fishbone-diagram根因分析
table表格数据展示
summary内容总结

输出模式

模式一:语法模式(Syntax / JSON)

用于 LLM 应用集成场景,生成图表配置供 GPTVis.render() 消费。支持两种格式:

  • Syntax 格式:类 Markdown 缩进语法,适合流式输出(LLM 逐 token 生成时可实时渲染)
  • JSON 格式:标准 JSON 对象,适合结构化 API 调用

两种格式等价,GPTVis.render() 均可直接接受。

模式二:代码模式

用于用户需要可直接运行的完整代码场景。生成包含安装说明和完整代码的输出。

GPTVis API

GPTVis 是库的统一入口类,负责创建、渲染和销毁图表。

构造函数
typescript
new GPTVis(options: VisualizationOptions)

VisualizationOptions:

参数类型必填默认值说明
containerstring | HTMLElement是—CSS 选择器或 DOM 元素
widthnumber否—图表宽度(px)
heightnumber否—图表高度(px)
theme'default' | 'light' | 'dark' | 'academy'否'light'主题
wrapperboolean否false是否显示外层 UI 容器(含标签页、下载、复制等)
localestring否'zh-CN'wrapper 内文案语言
方法
render(config: string | object): void

渲染图表。接受两种输入:

  • Syntax 字符串:以 vis [type] 开头的文本,自动解析为配置对象
  • JSON 配置对象:包含 type 字段的对象
  • 纯文本:不以 vis 开头的字符串会被当作 summary 类型渲染

多次调用 render() 会自动销毁前一个图表再渲染新图表。

destroy(): void

销毁当前图表实例,释放资源。

语法模式:JSON 格式

直接输出符合图表 TypeScript 类型的 JSON 对象,GPTVis.render() 可直接消费。

JSON 示例
json
{
  "type": "column",
  "data": [
    { "category": "A产品", "value": 30, "group": "线上" },
    { "category": "B产品", "value": 50, "group": "线上" }
  ],
  "title": "产品销量对比",
  "axisXTitle": "产品",
  "axisYTitle": "销量(万)",
  "stack": true,
  "theme": "academy",
  "style": {
    "palette": ["#5B8FF9", "#61DDAA"]
  }
}

语法模式:Syntax 格式

类 Markdown 缩进语法,支持流式渲染。第一行必须是 vis [type]。

语法规则

基本属性 — key value,每行一个:

title 年度趋势
theme dark

对象数组 — data 下每项用 - 开头,子字段缩进:

{ data: { time: string; value: number; }[]; }

对应:

data
  - time 2020
    value 100
  - time 2021
    value 120

纯值数组 — 每项用 - 开头:

{ data: number[] }

对应:

data
  - 10
  - 20

含空格的字符串值 — 用引号(单引号或双引号)包裹;不含空格时可省略引号:

categories
  - "North America"
  - '东南 亚'
  - 欧洲

嵌套对象 — 对象名占一行,子属性缩进:

{ style?: { backgroundColor?: string; palette?: string[] } }

对应:

style
  backgroundColor #f0f2f5
  palette
    - #5B8FF9
    - #61DDAA

递归树形 — children 数组用 - 缩进:

type TreeData = { name: string; children?: TreeData[] };
{ data: TreeData; }

对应:

data
  name 根节点
  children
    - name 子节点A
      children
        - name 孙节点
    - name 子节点B
Syntax 完整示例
vis column
data
  - category A产品
    value 30
    group 线上
  - category B产品
    value 50
    group 线上
title 产品销量对比
axisXTitle 产品
axisYTitle 销量(万)
stack true
theme academy
style
  palette
    - #5B8FF9
    - #61DDAA
Show full SKILL.md (159 more words)Show less
Markdown 语法

当输出为 Markdown 格式时,使用 GPT-Vis 作为 fenced code block 的语言标记,内容区写入完整的 Syntax 格式:

markdown
```GPT-Vis
vis line
data
  - time 2020
    value 100
```

格式:

```GPT-Vis
<完整的 Syntax 内容,首行 vis <chart-type>>
```

语法规则:

  • 语言标记固定为 GPT-Vis
  • 内容区使用 Syntax 格式规则编写,首行必须包含 vis <chart-type>(完整列表见上方支持的图表类型)
  • 代码块会被 Markdown 插件转换为 <code class="language-gpt-vis">,由浏览器端渲染

注意:Markdown 模式下,内容区必须写首行 vis <type>,与纯 Syntax 模式格式一致。

代码模式

根据目标框架生成完整可运行代码。

安装方式

NPM:

bash
npm install @antv/gpt-vis
javascript
import { GPTVis } from '@antv/gpt-vis';

CDN:

html
<script src="https://unpkg.com/@antv/gpt-vis/dist/umd/index.min.js"></script>

CDN 引入后通过 GPTVis.GPTVis 访问主类。

HTML 完整示例
html
<html>
  <head>
    <script src="https://unpkg.com/@antv/gpt-vis/dist/umd/index.min.js"></script>
  </head>
  <body>
    <div id="container"></div>
    <script>
      const gptVis = new GPTVis.GPTVis({
        container: '#container',
        width: 600,
        height: 400,
      });

      gptVis.render(`
vis line
data
  - time 2020
    value 100
  - time 2021
    value 120
title 年度趋势
`);
    </script>
  </body>
</html>

图表类型配置

通用配置

所有图表均包含以下字段,后续各图表类型定义中省略这些字段。各小节标题即为 type 值(如 line、column),对应上方图表类型表中的 type 列。

{ type: string; title?: string; theme?: 'default' | 'light' | 'dark' | 'academy'; style?: { backgroundColor?: string; palette?: string[] } }
line / area
{ data: { time: string | number; value: number; group?: string }[]; axisXTitle?: string; axisYTitle?: string; stack?: boolean; style?: { lineWidth?: number } }

stack 仅 area 支持。

column / bar
{ data: { category: string; value: number; group?: string }[]; axisXTitle?: string; axisYTitle?: string; stack?: boolean; group?: boolean }
pie

value 不可使用百分比数字。

{ data: { category: string; value: number }[]; innerRadius?: number }

innerRadius 设为 0.6 变为环图。

scatter
{ data: { x: number; y: number; group?: string }[]; axisXTitle?: string; axisYTitle?: string }
dual-axes
{ categories: string[]; series: { type: 'line' | 'column'; data: number[]; axisYTitle?: string }[]; axisXTitle?: string; style?: { startAtZero?: boolean } }
histogram
{ data: number[]; binNumber?: number; axisXTitle?: string; axisYTitle?: string }
boxplot / violin

同一 category 需多条数据以展示分布。

{ data: { category: string; value: number; group?: string }[]; axisXTitle?: string; axisYTitle?: string; style?: { startAtZero?: boolean } }
radar
{ data: { name: string; value: number; group?: string }[]; align?: boolean }

align: 是否对齐各维度比例尺,默认 false(各轴独立缩放);true 时所有轴共享同一最大值,适合多系列绝对数值对比。

funnel
{ data: { category: string; value: number; }[]; }
waterfall

value 可为负数表示减少。palette 为色板数组,顺序为 [正值色, 负值色, 汇总色]。

{ data: { category: string; value: number }[]; axisXTitle?: string; axisYTitle?: string; style?: { palette?: string[] } }
liquid

percent 范围 0~1。

{ percent: number; shape?: 'rect' | 'circle' | 'pin' | 'triangle' }
word-cloud
{ data: { text: string; value: number; }[]; }
venn

交集用逗号分隔集合标识:sets: "A,B"。label 用于显示图表上对应集合的名称

{ data: { sets: string | string[]; value: number; label?: string }[] }
treemap
type TreeNode = { name: string; value: number; children?: TreeNode[] };
{ data: TreeNode[] }
sankey
{ data: { source: string; target: string; value: number }[]; nodeAlign?: 'left' | 'center' | 'right' | 'justify' }
flow-diagram / network-graph

source/target 引用节点的 name。

type GraphData = { nodes: { name: string }[]; edges: { source: string; target: string; name?: string }[] };

// flow-diagram
{ data: GraphData }

// network-graph
{ data: GraphData; layout?: 'force' | 'circular' | 'grid' | 'radial' | 'concentric' | 'dagre' }
mindmap / indented-tree / organization-chart
type TreeData = { name: string; children?: TreeData[] };

// mindmap
{ data: TreeData; direction?: 'H' | 'LR' | 'RL' }

// indented-tree
{ data: TreeData; direction?: 'LR' | 'RL' | 'H' }

// organization-chart
type OrganizationChartData = {
  name: string;
  description?: string;
  children?: OrganizationChartData[];
};

{ data: OrganizationChartData }

mindmap 默认 'H',indented-tree 默认 'LR'。

fishbone-diagram
type FishboneNode = { name: string; children?: FishboneNode[] };
{ data: FishboneNode; style?: { texture?: 'rough' | 'default' } }

texture: 'rough' 为手绘风格。

table
{ data: Record<string, string | number>[]; }
summary

summary 与其他图表类型完全不同:不使用 Syntax/JSON 配置,而是使用 T8 语法(Markdown + 语义标注)。

⚠️ 生成 summary 前必须:先读取 references/summary.md 获取 T8 语法规则、完整实体类型列表、属性字段定义、生成要求和示例,然后再生成内容。跳过此步骤将导致语法错误。

最佳实践

  1. 饼图分类不超过 5 个,超过建议合并为"其它"或改用条形图
  2. 不要用饼图展示趋势,不要用折线图展示无序分类
  3. 数值字段必须是数字类型,分类字段必须是文本类型
  4. 连续数值的分布(如薪资、成绩、年龄)必须用直方图(histogram)
  5. 多维数据字段映射:有两个分类维度时,x 轴维度写 time/category,另一个写 group
  6. 语法模式优先用 Syntax 格式(流式友好)
  7. 代码模式默认生成 HTML + CDN 方案(零安装),用户指定框架时再用 npm 方案

© antvis, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/gpt-vis of antvis/chart-visualization-skills.

  • SKILL.md
  • references/summary.md

Open the folder on GitHubat commit a105fa1

Compare with similar skills

Gpt Vis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gpt Vis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gpt Vis this skillantvis/chart-visualization-skills506—~2.5kAutomated safety check: PassMIT
Gpt Proudecode/plate17k—~1.7kAutomated safety check: PassCustom licence
Gpt Tastesickn33/agentic-awesome-skills47k1 repos~2.3kAutomated safety check: PassMIT
Gpt Reviewdavidondrej/skills4.1k—~394Automated safety check: PassMIT
Inline Visget-bb/bb4.2k—~614Automated safety check: PassMIT
GPT Image Generation CLIwuyoscar/GPT-Image2-Skill5.7k—~2.5kAutomated safety check: NotesMIT

Similar skills

  • Gpt Pro

    udecode/plate

    Create a self-contained GPT Pro or external-review prompt with full repo context, current state, evidence, and pointed review questions because the reviewer has no local file access.

    17k GitHub stars~1.7k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Gpt Taste

    sickn33/agentic-awesome-skills

    A skill your agent uses when generating elite GSAP-heavy frontend pages with strict AIDA structure, wide hero typography, and gapless bento grids.

    47k GitHub starsUsed in 1 repo~2.3k tokens
    Frontend & DesignAuto-check passed
  • Gpt Review

    davidondrej/skills

    Launch an independent GPT code review and return it verbatim.

    4.1k GitHub stars~394 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Inline Vis

    get-bb/bb

    Show a newly created or updated HTML demo, chart, or report, or Markdown plan, summary, or notes from the workspace or thread storage inline in BB chat with the inline-vis directive.

    4.2k GitHub stars~614 tokensUpdated today
    Documents & OfficeAuto-check passed
  • GPT Image Generation CLI

    wuyoscar/GPT-Image2-Skill

    Generates and edits images with GPT Image 2 or 2.5 through a packaged CLI and a prompt gallery, after settling which model fits the request.

    5.7k GitHub stars~2.5k tokensUpdated 9 days ago
    Media & CreativeAuto-check: notes
  • GPT Image 2 Prompt and Generation

    ConardLi/garden-skills

    Generates or edits images with GPT Image 2 through an OpenAI-compatible API, or falls back to writing finished prompts from a library of structured templates.

    13k GitHub stars~4k tokensUpdated 2 mo ago
    Media & CreativeAuto-check: notes

More from antvis/chart-visualization-skills

All 9 skills in this repo
  • Antv G2 Chart

    antvis/chart-visualization-skills

    A skill your agent uses whenever the user wants to create, customize, or troubleshoot G2 v5 chart visualizations.

    506 GitHub stars~2.5k tokensUpdated 17 days ago
    Auto-check passed
  • Antv G6 Graph

    antvis/chart-visualization-skills

    A skill your agent uses whenever the user wants to create, customize, or troubleshoot G6 v5 graph/network visualizations.

    506 GitHub stars~1.8k tokensUpdated 17 days ago
    Auto-check passed
  • Antv Infographic

    antvis/chart-visualization-skills

    Create beautiful infographics based on given text content. An agent skill from antvis/chart-visualization-skills.

    506 GitHub stars~3k tokensUpdated 17 days ago
    Auto-check passed
  • Antv T8 Ntv

    antvis/chart-visualization-skills

    Generate structured narrative text visualizations from data using T8 Syntax.

    506 GitHub stars~4.5k tokensUpdated 17 days ago
    Auto-check passed
  • Antv X6 Editor

    antvis/chart-visualization-skills

    A skill your agent uses whenever the user wants to create, customize, or troubleshoot X6 v3 graph editor diagrams.

    506 GitHub stars~2.9k tokensUpdated 17 days ago
    Auto-check passed
  • Antv Gpt Vis

    antvis/chart-visualization-skills

    Recommend and generate appropriate data visualization charts using the GPT-Vis library.

    506 GitHub stars~3.7k tokensUpdated 17 days ago
    Auto-check passed

Questions about Gpt Vis

What does Gpt Vis do?

推荐并生成合适的数据可视化图表,使用 GPT-Vis 库。支持两种输出模式:(1)语法模式——生成 Syntax 或 JSON 配置;(2)代码模式——生成完整的运行代码。支持 26 种图表类型。. Gpt Vis is an agent skill from antvis/chart-visualization-skills.

How do I install Gpt Vis in Claude Code?

Run `npx skills add antvis/chart-visualization-skills --skill gpt-vis -a claude-code`. Or copy the skill folder (skills/gpt-vis in antvis/chart-visualization-skills) into .claude/skills/gpt-vis in your project. Claude Code loads it when a task matches its description.

How do I install Gpt Vis in Codex?

Run `npx skills add antvis/chart-visualization-skills --skill gpt-vis -a codex`. Or copy the skill folder (skills/gpt-vis in antvis/chart-visualization-skills) into .agents/skills/gpt-vis in your project. Codex loads it when a task matches its description.

Can I use Gpt Vis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add antvis/chart-visualization-skills --skill gpt-vis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gpt-vis, .gemini/skills/gpt-vis, .github/skills/gpt-vis and .opencode/skills/gpt-vis in your project.

What does Gpt Vis need to run?

Going by SKILL.md and its folder, Gpt Vis needs the command-line tools its instructions call (npm). Our summary lists: Node.js.

Does Gpt Vis access the network?

SKILL.md names 1 domain. In commands or code: unpkg.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Gpt Vis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gpt Vis use?

Gpt Vis is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gpt Vis use?

About 2.5k tokens (SKILL.md is roughly 9.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.5k tokens, read only when the agent opens those files.

What are the alternatives to Gpt Vis?

Skills that share tags, products or a category with Gpt Vis: Gpt Pro (udecode/plate, 17k stars), Gpt Taste (sickn33/agentic-awesome-skills, 47k stars), Gpt Review (davidondrej/skills, 4.1k stars) and Inline Vis (get-bb/bb, 4.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gpt Vis?

antvis (a GitHub organization) maintains it in antvis/chart-visualization-skills, which has 506 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on September 22, 2026.

Source: antvis/chart-visualization-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.