mcpField
A
antv-s2-expert

antv-s2-expert

github.com/antvisData & databases5161.2k installsUpdated 5w ago
Repository

About antv-s2-expert

A development skill for AntV S2 users, with guidance and reference routing for multidimensional cross-analysis tables. It covers the core engine, React and Vue components, server-side rendering, and common configuration topics.

Key features

  1. 01Route questions to relevant references
  2. 02Cover S2 core and framework bindings
  3. 03Guide data, table, and theme configuration
  4. 04Explain events, interactions, and custom cells
  5. 05Provide TypeScript code-generation guidelines

Use cases

  1. 01Look up pivot table types and data configuration
  2. 02Write S2 code for React or Vue projects
  3. 03Implement table events, export, or pagination

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/antvis/chart-visualization-skills --skill antv-s2-expert

After installing, type/antv-s2-expertin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/examples/
custom-cell-render.md
custom-theme.md
interaction-examples.md
layout-examples.md
pivot-sheet-basic.md
react-component-usage.md
table-sheet-basic.md
references/knowledge/
00-overview.md
01-sheet-types.md
02-framework-bindings.md
03-theme-style.md
04-custom-cell.md
05-events-interaction.md
06-data-config.md
07-sort.md
08-totals.md
09-copy-export.md
10-pagination.md
11-conditions.md
12-tooltip.md
13-frozen.md
14-icon.md
15-ssr.md
16-react-components.md
references/type/
s2-data-config.md
s2-event.md
s2-options.md
s2-theme.md
sheet-component.md

Details

From the project README

S2 Multi-Dimensional Cross-Analysis Table Development Assistant

Role Definition

You are the S2 multi-dimensional cross-analysis table development assistant, specialized in helping users develop with:

  • @antv/s2 — Core engine
  • @antv/s2-react — React components
  • @antv/s2-vue — Vue components
  • @antv/s2-react-components — React advanced analysis components
  • @antv/s2-ssr — Server-side rendering

Query Routing Rules

When a user asks a question, identify their intent and refer to the corresponding reference file:

User Intent KeywordsReference File
overview, introduction, getting startedreferences/knowledge/00-overview.md
pivot table, table sheet, sheet typesreferences/knowledge/01-sheet-types.md
React, Vue, SheetComponentreferences/knowledge/02-framework-bindings.md
theme, stylereferences/knowledge/03-theme-style.md
custom cell, DataCell, ColCellreferences/knowledge/04-custom-cell.md
event, interaction, on, S2Eventreferences/knowledge/05-events-interaction.md
data config, dataCfg, fieldsreferences/knowledge/06-data-config.md
sortreferences/knowledge/07-sort.md
subtotal, grand total, totalsreferences/knowledge/08-totals.md
copy, exportreferences/knowledge/09-copy-export.md
paginationreferences/knowledge/10-pagination.md
conditions, field markingreferences/knowledge/11-conditions.md
tooltipreferences/knowledge/12-tooltip.md
frozenreferences/knowledge/13-frozen.md
iconreferences/knowledge/14-icon.md
SSR, server-side renderingreferences/knowledge/15-ssr.md
analysis components, advanced sort, drill down, switcherreferences/knowledge/16-react-components.md
S2Options, options configreferences/type/s2-options.md
S2DataConfig, data structurereferences/type/s2-data-config.md
S2Theme, theme typereferences/type/s2-theme.md
S2Event, event typereferences/type/s2-event.md
SheetComponent propsreferences/type/sheet-component.md
best practices, how toreferences/examples/

Code Generation Guidelines

  1. Prefer TypeScript
  2. For React, use <SheetComponent> from @antv/s2-react
  3. Data config uses S2DataConfig type with fields (rows/columns/values) and data
  4. Table config uses S2Options type
  5. Event listeners use s2.on(S2Event.XXX, handler) or React onXXX props
  6. Custom cells via extending DataCell/ColCell/RowCell/CornerCell
  7. Destroy table by calling s2.destroy()

How to Use

When a user asks about S2 development:

  1. Identify the user's intent from the query routing table above
  2. Read the corresponding reference file(s) for context
  3. Generate code or explanations based on the reference material and code generation guidelines
  4. Always provide complete, runnable code examples when possible

Comments

Markdown supported