chartcn

Agent skill

Guide agents to pick variants, install from the registry, and embed charts.

The skill lives at skills/chartcn/SKILL.md.

It covers:

  1. Variant decision table — when to use area vs bar vs line

  2. Data shapes for foundation items

  3. Install via npx shadcn@latest add https://chartcn-web.vercel.app/r/<name>.json

  4. Server MDX / RSC insertion

  5. 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 entry

See also MDX embedding and json-render.