home / skills / antvis / infographic / infographic-structure-creator
This skill generates or updates infographic structure components in TypeScript projects, ensuring layout logic, composition, and correct registration per
npx playbooks add skill antvis/infographic --skill infographic-structure-creatorReview the files below or copy the command above to add this skill to your agents.
---
name: infographic-structure-creator
description: Generate or update infographic Structure components for this repo (TypeScript/TSX in src/designs/structures). Use when asked to design, implement, or modify structure layouts (list/compare/sequence/hierarchy/relation/geo/chart), including layout logic, component composition, and registration.
---
# Infographic Structure Creator
## Overview
Generate complete Structure component code for the infographic framework, following the project's component rules, layout constraints, and registration requirements.
## Workflow
1. Read `references/structure-prompt.md` for the full framework rules, allowed components, and output requirements.
2. Clarify minimal requirements if missing: structure category, layout direction, hierarchy depth, and whether add/remove buttons are needed.
3. Choose Item vs Items, compute layout from `getElementBounds`, and plan decor elements under ItemsGroup.
4. Produce a full TypeScript file: imports, Props extends BaseStructureProps, component implementation, and `registerStructure` with accurate `composites`.
5. Self-check against the constraints in the reference (no unlisted components, no SVG cx/cy/r, correct indexes, empty-state handling).
## Notes
- Prefer scanning `src/designs/structures` for similar existing structures to match local patterns when appropriate.
- Keep output concise; avoid React-only features (keys, hooks).
This skill generates or updates TypeScript/TSX Structure components for the infographic framework. It creates complete, runnable component files that follow the project's component rules, layout constraints, and registration patterns. Use it to implement new list/compare/sequence/hierarchy/relation/geo/chart structure layouts or to modify existing ones.
The skill inspects requested structure requirements (category, layout direction, depth, add/remove controls) and scans the repo for local structure patterns to match conventions. It computes element layout using getElementBounds, selects Item vs Items composition, assembles decor under ItemsGroup, and emits a full TypeScript file with imports, Props extending BaseStructureProps, component implementation, and registerStructure with correct composites. It performs a self-check against framework constraints to avoid unlisted components and invalid attributes.
What inputs do you need to generate a structure?
Provide structure category, layout direction, desired depth, whether add/remove buttons are required, and any specific decor or composition constraints.
Will the generated file follow the repo conventions?
Yes. The skill scans existing structures to align imports, naming, Props patterns, and registerStructure usage to match local conventions.