Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 31, 2025

Created structured knowledge base to help AI assistants understand and work with the G2 codebase effectively.

Changes

Added 7 Skills files in .github/skills/ covering G2's architecture:

  • g2-overview.md - Library system (litelib/corelib/plotlib/etc), API structure, file organization, core patterns
  • working-with-marks.md - 35+ mark types (interval/line/point/treemap/sankey/etc), channels, shapes, operations
  • transforms-and-data.md - Data transforms (fetch/filter/map/kde) and mark transforms (stackY/dodgeX/binX/groupX)
  • scales-coordinates-encoding.md - Scale types (linear/log/ordinal/band), coordinate systems (polar/theta/radar/helix), visual encoding
  • interactions-animations.md - Interactions (highlight/select/filter/brush/tooltip) and animations (fadeIn/scaleIn/morphing)
  • api-usage-extension.md - Fluent vs Spec API, Chart/Mark/Composition classes, register() extension system, custom components
  • components-compositions-themes.md - UI components (axes/legends/sliders), compositions (layer/facet/matrix), theme system
  • README.md - Skills overview and usage guide

Structure

Each skill includes:

  • Source file references (src/mark/interval.ts)
  • TypeScript code examples
  • Common patterns and usage
  • Performance considerations

Example

// Skills document how to extend G2
import { register } from '@antv/g2';

register('mark.custom', customMark);
register('transform.custom', customTransform);

chart.custom().transform({ type: 'custom' });

Skills enable AI assistants to navigate G2's grammar-of-graphics architecture, understand the library/mark/transform/scale system, and follow extension patterns.

Original prompt

仔细阅读 G2 源码,提供 Skills ,以便扩展 Claude 的能力。


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: lxfu1 <31396322+lxfu1@users.noreply.github.com>
Copilot AI changed the title [WIP] Add skills from G2 source code for Claude enhancement Add comprehensive Skills documentation for G2 visualization library Dec 31, 2025
Copilot AI requested a review from lxfu1 December 31, 2025 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants