Antv G6 Graph logo

Antv G6 Graph

Organization
antvis
antv-g6-graph

Use this skill whenever the user wants to create, customize, or troubleshoot G6 v5 graph/network visualizations. Triggers include: any mention of 'G6', 'antv g6', '@antv/g6', 'G6 graph', 'G6 图', '网络图', '关系图', '拓扑图', '树形图', '流程图', '思维导图', '鱼骨图', '力导向图', 'force graph', 'network visualization', 'node-edge diagram', 'graph layout', 'tree layout', 'dagre layout', 'mindmap', 'social network', or requests about G6 node styles, edge types, behaviors, plugins, layouts, combos, or data structures. Also use when debugging G6 rendering errors, v4→v5 migration, or graph interaction issues. Do NOT use for G2 statistical charts, X6 editor diagrams, or S2 pivot tables.

Overview

Publisherantvis
Repositorychart-visualization-skills
Skill nameantv-g6-graph
Stars
494
Forks
38
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by antvis on GitHub. Read the source before you install it.

Installation

Install the Antv G6 Graph AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/antvis/chart-visualization-skills.git /tmp/chart-visualization-skills
mkdir -p .claude/skills
cp -r /tmp/chart-visualization-skills/skills/antv-g6-graph .claude/skills/antv-g6-graph
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Antv G6 Graph in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Antv G6 Graph on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Antv G6 Graph is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

G6 v5 Graph Visualization

Overview

G6 v5 is AntV's graph visualization engine for network diagrams, tree graphs, and relationship visualizations. It uses a declarative configuration style where new Graph({...}) defines all nodes, edges, layouts, behaviors, and plugins in one constructor call.

javascript
import { Graph } from '@antv/g6';

const graph = new Graph({
  container: 'container',
  data: {
    nodes: [{ id: 'node-1', style: { labelText: 'Node 1' } }],
    edges: [{ source: 'node-1', target: 'node-2' }],
  },
  layout: { type: 'force' },
  behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],
});

await graph.render();

CDN Usage

html
<script src="https://unpkg.com/@antv/g6@5/dist/g6.min.js"></script>
<script>
  const graph = new G6.Graph({
    container: 'container',
    data: {
      nodes: [{ id: 'node-1', style: { labelText: 'Node 1' } }],
      edges: [{ source: 'node-1', target: 'node-2' }],
    },
    layout: { type: 'force' },
    behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],
  });
  graph.render();
</script>

Content Retrieval Service

When using AntV G6 for data visualization, if you need to understand the concepts, usage, API, examples, and other aspects of G6 v5, you can use the provided context retrieval service. When using the skill, content is retrieved via an antv HTTP API server using GET requests.

  • Host: https://sive.antv.antgroup.com
  • Endpoint: /api/v1/context/retrieve
  • Method: GET
  • Parameters: query, library, topK, content, maxTokens

Retrieve skills by query (hybrid search = FTS + vector + RRF fusion). Constraints docs are indexed as regular skill documents and will appear in search results naturally.

ParameterTypeRequiredDescription
querystringSearch keywords, e.g. force layout node
librarystringLibrary name: g2, g6, x6
topKnumberNumber of results to return (default: 5)
contentbooleanReturn full reference doc markdown (default: true)
maxTokensnumberMax tokens per result (default: unlimited)
bash
curl "https://sive.antv.antgroup.com/api/v1/context/retrieve?query=force+layout+node+style&library=g6"

Critical Rules

MUST: Use new Graph({...}) — NOT v4 new G6.Graph()

javascript
// ❌ WRONG — v4 constructor
new G6.Graph({ container: 'container', ... });

// ✅ CORRECT — v5 constructor
import { Graph } from '@antv/g6';
new Graph({ container: 'container', ... });

MUST: All config in one constructor call, await graph.render()

javascript
// ❌ WRONG — v4 separate data method
graph.data(data);
graph.render();

// ✅ CORRECT — v5 declarative config + async render
const graph = new Graph({
  container: 'container',
  data: { nodes: [...], edges: [...] },
  layout: { type: 'force' },
  behaviors: ['drag-canvas', 'zoom-canvas'],
});
await graph.render();

MUST: Data format with id, source, target

javascript
// ❌ WRONG — missing node id, missing edge endpoints
const data = { nodes: [{ label: 'A' }], edges: [{ from: 'A', to: 'B' }] };

// ✅ CORRECT — each node has unique id, each edge has source/target
const data = {
  nodes: [{ id: 'node-1', style: { labelText: 'A' } }],
  edges: [{ source: 'node-1', target: 'node-2' }],
};

MUST: Use style.labelText for labels — NOT label or labelCfg

javascript
// ❌ WRONG — v4 label config
node: { labelCfg: { text: 'Node 1' } }

// ✅ CORRECT — v5 style.labelText
node: { style: { labelText: 'Node 1' } }

MUST: nodeStrength must be ≥ 0 in force layout

javascript
// ❌ WRONG — negative nodeStrength causes unpredictable behavior
layout: { type: 'force', nodeStrength: -300 }

// ✅ CORRECT — non-negative value
layout: { type: 'force', nodeStrength: 300 }

MUST: force layout does NOT support preventOverlap / nodeSize

javascript
// ❌ WRONG — v4 params silently ignored in v5
layout: { type: 'force', preventOverlap: true, nodeSize: 30 }

// ✅ CORRECT — use d3-force collide for overlap prevention
layout: { type: 'd3-force', collide: { radius: 30 } }

MUST: No Mode concept — behaviors are flat array

javascript
// ❌ WRONG — v4 mode-based behavior config
modes: { default: ['drag-canvas', 'zoom-canvas'] }

// ✅ CORRECT — v5 flat behavior array
behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element']

MUST: container is mandatory, default 'container'

javascript
// ❌ WRONG — no container specified
const graph = new Graph({ data });

// ✅ CORRECT
const graph = new Graph({ container: 'container', data, ... });

Quick Reference

User IntentRetrieve Query
Graph initialization, container, renderGET /api/v1/context/retrieve?query=graph+init+render&library=g6
Network / force graphGET /api/v1/context/retrieve?query=network+force+layout&library=g6
Tree / mindmap / fishboneGET /api/v1/context/retrieve?query=tree+mindmap+fishbone+layout&library=g6
Dagre / hierarchy / flow chartGET /api/v1/context/retrieve?query=dagre+hierarchy+flow+chart&library=g6
Circular / radial / grid layoutGET /api/v1/context/retrieve?query=circular+radial+grid+layout&library=g6
Node styles (rect, circle, diamond, html)GET /api/v1/context/retrieve?query=node+style+rect+circle+diamond+html&library=g6
Edge types (line, cubic, polyline, loop)GET /api/v1/context/retrieve?query=edge+line+cubic+polyline+loop&library=g6
Combo / group nodesGET /api/v1/context/retrieve?query=combo+group+node&library=g6
Custom node / edgeGET /api/v1/context/retrieve?query=custom+node+edge+element&library=g6
Behaviors (drag, zoom, click-select, hover)GET /api/v1/context/retrieve?query=behavior+drag+zoom+click-select+hover&library=g6
Plugins (minimap, tooltip, toolbar, legend)GET /api/v1/context/retrieve?query=plugin+minimap+tooltip+toolbar+legend&library=g6
Events systemGET /api/v1/context/retrieve?query=events+system+click+mouse&library=g6
State / style animationGET /api/v1/context/retrieve?query=state+animation+transform&library=g6
Data structure / transformsGET /api/v1/context/retrieve?query=data+structure+transforms&library=g6
Theme / backgroundGET /api/v1/context/retrieve?query=theme+background+style&library=g6
Lasso select / collapse-expandGET /api/v1/context/retrieve?query=lasso+collapse+expand+select&library=g6

Dependencies

  • @antv/g6 — G6 v5 graph visualization engine

Frequently asked questions

What does the Antv G6 Graph AI skill do?

Use this skill whenever the user wants to create, customize, or troubleshoot G6 v5 graph/network visualizations. Triggers include: any mention of 'G6', 'antv g6', '@antv/g6', 'G6 graph', 'G6 图', '网络图', '关系图', '拓扑图', '树形图', '流程图', '思维导图', '鱼骨图', '力导向图', 'force graph', 'network visualization', 'node-edge diagram', 'graph layout', 'tree layout', 'dagre layout', 'mindmap', 'social network', or requests about G6 node styles, edge types, behaviors, plugins, layouts, combos, or data structures. Also use when debugging G6 rendering errors, v4→v5 migration, or graph interaction issues. Do NOT use fo...

Why use Antv G6 Graph on TypingMind?

Because you install it once and use it with any model. Antv G6 Graph is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Antv G6 Graph in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/antvis/chart-visualization-skills/tree/master/skills/antv-g6-graph. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Antv G6 Graph?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Antv G6 Graph?

As many as you like. As long as a model supports skills, you can use Antv G6 Graph with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Antv G6 Graph AI skill free?

Yes. It is published on GitHub by antvis under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇