Agent skill
Guide agents to pick variants, install from the registry, and embed charts.
The skill lives at skills/chartcn/SKILL.md.
It covers:
-
Variant decision table — when to use area vs bar vs line
-
Data shapes for foundation items
-
Install via
npx shadcn@latest add https://chartcn-web.vercel.app/r/<name>.json -
Server MDX / RSC insertion
-
Client json-render component map (
registry item → JSON node type)
Typical agent loop:
pnpm chartcn-search <need> --json
→ pick ready item
→ shadcn add <host>/r/<name>.json
→ MDX component or json-render map entrySee also MDX embedding and json-render.