npm.io
1.3.0 • Published yesterday

apextree-skill

Licence
MIT
Version
1.3.0
Deps
0
Size
33 kB
Vulns
0
Weekly
0

ApexTree AI Skill

AI coding skill for building ApexTree organizational / hierarchical SVG tree charts. Works with Claude Code, Cursor, GitHub Copilot, and any AI coding assistant.

Separate skill — one of the ApexCharts ecosystem skills. This is the dedicated skill for ApexTree (apextree), shipped as its own apextree-skill package and repo — distinct from the core apexcharts-skill and the other product skills. Each product has its own library and skill; use the one that matches yours:

Product npm library Skill package & repo
ApexCharts — charts apexcharts apexcharts-skill
ApexGantt — Gantt / timeline apexgantt apexgantt-skill
ApexTree — hierarchy / org charts · this skill apextree apextree-skill
ApexSankey — flow / Sankey apexsankey apexsankey-skill
Apex Grid — data grid apex-grid apexgrid-skill

What This Does

AI models routinely get tree-chart code wrong: passing data to the constructor, missing children: [] on leaves, treating enableSelection as a boolean, hand-rolling org-card markup when the built-in template covers it. This skill ships structured reference files so the assistant generates correct ApexTree code on the first try.

Coverage

  • NestedNode data shapeid / name / children rules, recursive children, per-node options
  • Org-card modecontentKey: 'data' and the built-in avatar / title / badge template
  • Custom nodeTemplate — receiving the value at contentKey
  • LifecyclesetLicense(), construct, render(), the returned Graph, destroy()
  • Graph API — collapse/expand, layout direction, search, breadcrumb, selection, exporting
  • Framework wrappers: react-apextree, vue-apextree, ngx-apextree

Installation

Claude Code
mkdir -p .claude/skills
cd .claude/skills
git clone https://github.com/apexcharts/apextree-skill.git
Cursor / Windsurf
curl -o .cursorrules https://raw.githubusercontent.com/apexcharts/apextree-skill/main/.cursorrules
GitHub Copilot

Reference SKILL.md in Copilot Chat: @workspace #file:SKILL.md, or paste the contents of .cursorrules into Copilot's custom instructions.

As an npm dependency
npm install apextree-skill
import { skillFile, referencePath } from 'apextree-skill';
import { readFile } from 'node:fs/promises';

const skill = await readFile(skillFile, 'utf8');
const api   = await readFile(referencePath('graph-api.md'), 'utf8');

Repository Structure

├── SKILL.md                         # Main entry point
├── .cursorrules                     # Self-contained Cursor / Windsurf version
├── references/
│   ├── data-format.md               # NestedNode, org-card, nodeTemplate
│   ├── graph-api.md                 # collapse/expand, search, selection, layout
│   └── framework-wrappers.md        # React, Vue, Angular
└── install/
    ├── claude-code.md
    ├── cursor.md
    └── copilot.md

License

MIT

Keywords