This generates G6 v5 visualization code for networks, trees, flowcharts, and more. It's built around the core gotcha that G6 v5 broke API compatibility with v4, so if you're migrating or copy-pasting old examples you'll hit silent failures and white screens. The skill enforces constructor-based initialization, corrects data structure mistakes like putting labels at the top level instead of in the data field, and handles the removed Mode concept. Useful constraints include catching the autoFit white screen bug with async force layouts and blocking negative nodeStrength values that break physics. Ships with layout recommendations, a full table of built-in node types and behaviors, and error patterns to avoid.

skills.sh installs
1.2K
GitHub stars
530
last updated
Aug 21, 2026

Install

$ npx -y skills add antvis/chart-visualization-skills --skill antv-g6-graph --agent claude-code

Installs into .claude/skills of the current project.

Files

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.

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

<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

Sponsors

Details

Repository
github.com/antvis/chart-visualization-skills
Categories
Frontend Development, Backend & APIs, Data Science & ML, Debugging, Design & UI/UX
First seen
Jun 3, 2026

More from antvis/chart-visualization-skills

All 8
1uniswap avatarv4-security-foundationsuniswap/uniswap-aiSecurity-first Uniswap v4 hook development. Use when user mentions "v4 hooks", "hook security", "PoolManager", "beforeSwap", "afterSwap", or asks about V4 hook 1.2Kskills.sh installs
2yeachan-heo avatarhudyeachan-heo/oh-my-claudecodeConfigure HUD display options (layout, presets, display elements)1.2Kskills.sh installs
3wshuyi avatartranslate-pdfwshuyi/translate-pdf-skillTranslate PDF documents to any language while preserving original structure, layout, and styling (colors, backgrounds, positions). Use when user wants to: (1) t1.2Kskills.sh installs
4zsyggg avatarpaper-analyzerzsyggg/paper-craft-skills将学术论文转化为深度HTML长文。6轮强制工作流、代码仓库搜索、公式渲染、Mermaid图表。 3种写作风格,输出可直接分享的精美HTML页面。1.2Kskills.sh installs
5index-how avatarvocabularyindex-how/vocabularyThe precise design and UI vocabulary used on index.how/to/articulate — covering typography, color, iconography, layout, interaction, motion, accessibility, info1.2Kskills.sh installs
6mcollina avatarlinting-neostandard-eslint9mcollina/skillsConfigures ESLint v9 flat config and neostandard for JavaScript and TypeScript projects, including migrating from legacy `.eslintrc*` files or the `standard` pa1.2Kskills.sh installs