Skip to content

Commit 21e029f

Browse files
authored
chore: optimize skills (#136)
* chore: optimize skills add more information about hierarchy structure * chore: fix template updater skill
1 parent 74b1343 commit 21e029f

4 files changed

Lines changed: 41 additions & 14 deletions

File tree

.skills/infographic-creator/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ theme
4747
- `data` should contain title/desc/items (which can be omitted according to semantics)
4848
- `data.items` should contain label(string)/value(number)/desc(string)/icon(string)/children(object), where children represents the hierarchical structure
4949
- For comparison templates (template names starting with `compare-`), construct exactly two root nodes and place every comparison item under them as children to keep the hierarchy clear
50+
- For `hierarchy-structure`, `data.items` renders top-to-bottom (first item at the top) and supports up to 3 levels (root -> group -> item)
5051
- `theme` field is for customizing the theme of the infographic, including palette, font, etc.
5152
e.g. dark theme with custom palette:
5253
```plain

.skills/infographic-syntax-creator/references/prompt.md

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
- `data.items` 常见字段:
3535
- `label`(string) / `value`(number) / `desc`(string) / `icon`(string) / `children`(array)
3636
- 对比类模板(名称以 `compare-` 开头)必须构建两个根节点,所有对比项作为这两个根节点的 children
37+
- `hierarchy-structure` 模板最多支持 3 层(根层 → 分组 → 子项),且 `data.items` 顺序即从上到下的层级顺序(第 1 个在最上)
3738
- `theme` 可用 `theme <theme-name>`,或使用 block 自定义 `palette` 等;不写即默认主题,可选主题名:`dark``hand-drawn`
3839
- icon 直接使用图标名(如 `mdi/chart-line`
3940
- 禁止输出 JSON、Markdown 或解释性文字
@@ -50,41 +51,64 @@
5051
- 关系 → `relation-*`
5152

5253
**可用模板**
54+
5355
- sequence-zigzag-steps-underline-text
5456
- sequence-horizontal-zigzag-underline-text
57+
- sequence-horizontal-zigzag-simple-illus
5558
- sequence-circular-simple
5659
- sequence-filter-mesh-simple
5760
- sequence-mountain-underline-text
5861
- sequence-cylinders-3d-simple
59-
- compare-binary-horizontal-simple-fold
60-
- compare-hierarchy-left-right-circle-node-pill-badge
61-
- quadrant-quarter-simple-card
62-
- quadrant-quarter-circular
63-
- list-grid-badge-card
64-
- list-grid-candy-card-lite
65-
- list-grid-ribbon-card
66-
- list-row-horizontal-icon-arrow
67-
- relation-circle-icon-badge
68-
- sequence-ascending-steps
69-
- compare-swot
7062
- sequence-color-snake-steps-horizontal-icon-line
7163
- sequence-pyramid-simple
72-
- list-sector-plain-text
7364
- sequence-roadmap-vertical-simple
65+
- sequence-roadmap-vertical-plain-text
7466
- sequence-zigzag-pucks-3d-simple
67+
- sequence-ascending-steps
7568
- sequence-ascending-stairs-3d-underline-text
69+
- sequence-snake-steps-compact-card
70+
- sequence-snake-steps-underline-text
71+
- sequence-snake-steps-simple
72+
- sequence-stairs-front-compact-card
73+
- sequence-stairs-front-pill-badge
74+
- sequence-timeline-simple
75+
- sequence-timeline-rounded-rect-node
76+
- sequence-timeline-simple-illus
77+
- compare-binary-horizontal-simple-fold
78+
- compare-hierarchy-left-right-circle-node-pill-badge
79+
- compare-swot
80+
- quadrant-quarter-simple-card
81+
- quadrant-quarter-circular
82+
- quadrant-simple-illus
83+
- relation-circle-icon-badge
84+
- relation-circle-circular-progress
7685
- compare-binary-horizontal-badge-card-arrow
7786
- compare-binary-horizontal-underline-text-vs
7887
- hierarchy-tree-tech-style-capsule-item
7988
- hierarchy-tree-curved-line-rounded-rect-node
8089
- hierarchy-tree-tech-style-badge-card
90+
- hierarchy-structure
8191
- chart-column-simple
8292
- chart-bar-plain-text
8393
- chart-line-plain-text
8494
- chart-pie-plain-text
8595
- chart-pie-compact-card
8696
- chart-pie-donut-plain-text
8797
- chart-pie-donut-pill-badge
98+
- chart-wordcloud
99+
- list-grid-badge-card
100+
- list-grid-candy-card-lite
101+
- list-grid-ribbon-card
102+
- list-row-horizontal-icon-arrow
103+
- list-row-simple-illus
104+
- list-sector-plain-text
105+
- list-column-done-list
106+
- list-column-vertical-icon-arrow
107+
- list-column-simple-vertical-arrow
108+
- list-zigzag-down-compact-card
109+
- list-zigzag-down-simple
110+
- list-zigzag-up-compact-card
111+
- list-zigzag-up-simple
88112

89113
## 生成流程
90114

.skills/infographic-template-updater/SKILL.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ Update public template lists and gallery mappings when new templates are added i
1414
1. Collect new template names from the added `src/templates/*.ts` file (object keys).
1515
- If templates are composed via spreads (e.g. `...listZigzagTemplates`), also confirm the final keys in `src/templates/built-in.ts`.
1616
2. Update template lists:
17-
- `SKILL.md` in the "Available Templates" list.
17+
- `.skills/infographic-creator/SKILL.md` in the "Available Templates" list.
1818
- `site/src/components/AIPlayground/Prompt.ts` in the template list.
19+
- `.skills/infographic-syntax-creator/references/prompt.md` in the template list.
1920
Keep existing ordering/grouping; add new `list-*` entries near other list templates.
20-
3. Sanity check with `rg -n "<template-name>"` across the three files to confirm presence.
21+
3. Sanity check with `rg -n "<template-name>"` across the above files to confirm presence.
2122

2223
## Notes
2324

site/src/components/AIPlayground/Prompt.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ theme
3636
- data 应包含 title/desc/items(根据语义可省略不必要字段)
3737
- data.items 可包含 label(string)/value(number)/desc(string)/icon(string)/children(array) 等字段,children 表示层级结构
3838
- 对比类模板(名称以 \`compare-\` 开头)应构建两个根节点,所有对比项作为这两个根节点的 children,确保结构清晰
39+
- hierarchy-structure 模板最多支持 3 层(根层 → 分组 → 子项),且 data.items 顺序即从上到下的层级顺序(第 1 个在最上)
3940
- theme 可用 \`theme <theme-name>\`,或使用 block 自定义 palette 等;不写即默认主题,可选:dark、hand-drawn
4041
- 根据语义选择模板:列表用 list-*,顺序用 sequence-*,对比用 compare-*,层级用 hierarchy-*,统计用 chart-*,象限用 quadrant-*,关系用 relation-*
4142
- 严禁输出 JSON、Markdown、解释或额外文本

0 commit comments

Comments
 (0)