antv-x6-editor

Generates X6 v3 graph editor code for flowcharts, DAGs, and ER diagrams.

Updated Aug 2, 2026
One-click install
npx skills add https://github.com/lvhuanid/ai-streaming-backend --skill antv-x6-editor-lvhuanid
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: antv-x6-editor
Source: https://github.com/lvhuanid/ai-streaming-backend/tree/main/.trae/skills/antv-x6-editor
Command: npx skills add https://github.com/lvhuanid/ai-streaming-backend --skill antv-x6-editor-lvhuanid

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @antv/x6.

What problem does it solve? Building interactive node-edge diagram editors with AntV X6 v3 requires navigating an imperative API, 11 plugin classes, and strict v3 conventions that differ sharply from v2 and from G6, leading to frequent errors like calling nonexistent methods or misusing constructor options. ## Core Features & Use Cases - Correct X6 v3 Code Generation: Produces pure JavaScript using graph.addNode(), graph.addEdge(), and graph.use() with mandatory rules such as string-literal containers, plugin registration before use, and graph.centerContent() after additions. - Diagram Type Coverage: Supports flowcharts, DAG pipelines, ER diagrams, lineage graphs, org charts, UML class diagrams, and network topology editors with stencil drag-and-drop. - On-Demand Reference Retrieval: Fetches in-depth X6 documentation via the AntV context retrieval API (/api/v1/context/retrieve) for topics like ports, routers, serialization, and HTML shape nodes. - Use Case: A developer asks for an ER diagram editor with drag-and-drop stencil and port connections; the skill generates working X6 v3 code with Selection, Stencil, and Snapline plugins correctly registered. ## Quick Start Ask the assistant to create an X6 flowchart editor with a stencil panel and port-based edge connections.

Frequently Asked Questions about antv-x6-editor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a flowchart editor with AntV X6?▼

Create a Graph instance with a string-literal container and background color, then call graph.addNode() and graph.addEdge() to build the diagram. Register plugins like Stencil and Selection via graph.use() before calling their methods, and finish with graph.centerContent().

What is the difference between X6, G6, and G2 in AntV?▼

X6 is the diagram editing engine for interactive node-edge editors like flowcharts and ER diagrams, using an imperative API. G6 targets graph visualization and analysis, while G2 handles statistical charts; X6 has no graph.render() method unlike G6.

Why does graph.toPNG() or graph.select() throw a method not found error in X6?▼

These methods come from plugins that must be registered first. Import Export or Selection from @antv/x6 and call graph.use(new Export()) or graph.use(new Selection()) before invoking their methods.

Does X6 v3 support HTML nodes and custom shapes?▼

Yes, X6 v3 registers HTML nodes via Shape.HTML.register with an effect array and an html render function. The v2 class-based pattern of extending Node is no longer used in v3.

How do I migrate X6 v2 code to v3?▼

Replace class-based node definitions with Shape.HTML.register, ensure all used classes appear in import statements, and treat options like embedding, panning, and mousewheel as Graph constructor options rather than plugins. Only 11 plugin classes exist in v3.