Repository navigation
feat: 增加 Claude Marketplace 集成 - #207
Conversation
Summary of ChangesHello @balabalabalading, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取请求旨在通过集成Claude Marketplace来增强AntV Infographic项目,使其技能更易于发现和安装。通过引入必要的配置文件和更新文档,用户现在可以通过Marketplace便捷地安装Infographic技能,同时项目结构也得到了标准化,以更好地支持Claude插件生态系统。 Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
您好,感谢您的贡献!本次 PR 成功地为项目集成了 Claude Marketplace。
主要反馈点如下:
- 代码重复:新增的
skills目录是/.skills目录的副本,这会带来维护性问题。建议将内容从/.skills迁移到skills并删除旧目录,以避免未来更新时出现不一致。 - 文件格式:新添加的两个 JSON 配置文件(
marketplace.json和plugin.json)末尾缺少换行符,建议添加。
整体来看,这是一个很棒的功能增强。请参考具体的代码审查评论进行修改。
| --- | ||
| name: infographic-creator | ||
| description: 基于给定文字内容创建精美信息图。当用户请求创建信息图时使用。 | ||
| --- |
There was a problem hiding this comment.
There was a problem hiding this comment.
Pull request overview
本 PR 为仓库增加 Claude Marketplace 集成所需的标准清单文件,并在根目录新增 skills/ 目录以满足 Marketplace/Plugin 的期望结构,同时更新 README 的 Claude Code 安装说明以支持 Marketplace 安装方式并保留手动兜底。
Changes:
- 新增
.claude-plugin/marketplace.json与.claude-plugin/plugin.json,提供 Marketplace/Plugin 元数据。 - 新增根目录
skills/(从现有.skills/复制)以适配 Claude Marketplace 的标准结构。 - 更新
README.md与README.zh-CN.md,补充 Marketplace 安装命令并保留手动安装兜底。
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| skills/infographic-template-updater/SKILL.md | Marketplace 目录下的模板更新工作流说明 |
| skills/infographic-syntax-creator/references/prompt.md | 语法生成参考提示词(含模板列表/规则) |
| skills/infographic-syntax-creator/SKILL.md | 语法生成 skill 的简要工作流与硬约束 |
| skills/infographic-structure-creator/references/structure-prompt.md | 结构组件生成参考提示词 |
| skills/infographic-structure-creator/SKILL.md | 结构组件生成 skill 的简要工作流 |
| skills/infographic-item-creator/references/item-prompt.md | Item 组件生成参考提示词 |
| skills/infographic-item-creator/SKILL.md | Item 组件生成 skill 的简要工作流 |
| skills/infographic-creator/SKILL.md | 信息图生成/渲染 skill(语法与 HTML 渲染流程) |
| README.md | 增加 Claude Marketplace 安装方式说明 |
| README.zh-CN.md | 增加 Claude Marketplace 安装方式说明(中文) |
| .claude-plugin/plugin.json | Claude Plugin 元数据(author/homepage/repo 等) |
| .claude-plugin/marketplace.json | Claude Marketplace 清单(owner + plugins 列表) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - Output is a single `plain` code block; no extra text. | ||
| - First line is `infographic <template-name>`. | ||
| - Use two-space indentation; key/value pairs are `key value`; arrays use `-`. | ||
| - Compare templates (`compare-*`) must have exactly two root nodes with children. |
There was a problem hiding this comment.
这里将所有 compare-* 模板都约束为“必须两个根节点且 children 挂载”,这与当前模板集合不符(例如 compare-swot、compare-quadrant-* 都不是二元结构)。建议把约束收窄到 compare-binary-* 与 compare-hierarchy-left-right-*(或直接引用 references/prompt.md 中的更精确规则),避免生成错误语法。
| - Compare templates (`compare-*`) must have exactly two root nodes with children. | |
| - Binary compare templates (`compare-binary-*`, `compare-hierarchy-left-right-*`) must have exactly two root nodes with children; other compare templates must follow the structure rules in `references/prompt.md`. |
| - `hierarchy-structure` → `items`(每一项对应一个独立层级,每一层级可以包含子项,最多可嵌套 3 层) | ||
| - `hierarchy-*` → 单一 `root`(树结构,通过 `children` 嵌套); | ||
| - `relation-*` → `nodes` + `relations`;简单关系图可省略 `nodes`,在 relations 中用箭头语法 | ||
| - `chart-*` → `values`(数值统计,可选 `category`) | ||
| - 不确定时再用 `items` 兜底 | ||
| - `compare-binary-*` / `compare-hierarchy-left-right-*` 二元模板:必须两个根节点,所有对比项挂在这两个根节点的 children | ||
| - `hierarchy-*`:使用单一 `root`,通过 `children` 嵌套(不要重复 `root`) |
There was a problem hiding this comment.
本段把 hierarchy-structure 映射为使用 items 字段,但后文示例却在 infographic hierarchy-structure 下使用 root/children。建议统一规则与示例:要么将示例改为 items,要么把该示例模板名改为某个 hierarchy-tree-*(使用 root),并相应调整文字说明。
| - `hierarchy-structure` → `items`(每一项对应一个独立层级,每一层级可以包含子项,最多可嵌套 3 层) | |
| - `hierarchy-*` → 单一 `root`(树结构,通过 `children` 嵌套); | |
| - `relation-*` → `nodes` + `relations`;简单关系图可省略 `nodes`,在 relations 中用箭头语法 | |
| - `chart-*` → `values`(数值统计,可选 `category`) | |
| - 不确定时再用 `items` 兜底 | |
| - `compare-binary-*` / `compare-hierarchy-left-right-*` 二元模板:必须两个根节点,所有对比项挂在这两个根节点的 children | |
| - `hierarchy-*`:使用单一 `root`,通过 `children` 嵌套(不要重复 `root`) | |
| - `hierarchy-structure` → 单一 `root`(树结构,通过 `children` 嵌套,适用于结构型分层) | |
| - `hierarchy-tree-*` / 其他 `hierarchy-*` → 单一 `root`(树结构,通过 `children` 嵌套); | |
| - `relation-*` → `nodes` + `relations`;简单关系图可省略 `nodes`,在 relations 中用箭头语法 | |
| - `chart-*` → `values`(数值统计,可选 `category`) | |
| - 不确定时再用 `items` 兜底 | |
| - `compare-binary-*` / `compare-hierarchy-left-right-*` 二元模板:必须两个根节点,所有对比项挂在这两个根节点的 children | |
| - `hierarchy-structure` / `hierarchy-tree-*` / 其他 `hierarchy-*`:使用单一 `root`,通过 `children` 嵌套(不要重复 `root`) |
| - SWOT → `compare-swot` | ||
| - 层级结构(树图)→ `hierarchy-tree-*` | ||
| - 数据图表 → `chart-*` | ||
| - 象限分析 → `quadrant-*` |
There was a problem hiding this comment.
这里建议使用 quadrant-*,但仓库里 quadrant-* 命名在代码中已标注为兼容/Deprecated(当前主命名为 compare-quadrant-*)。建议将推荐前缀改为 compare-quadrant-*,并在需要时说明旧 quadrant-* 仅用于兼容。
| - 象限分析 → `quadrant-*` | |
| - 象限分析 → `compare-quadrant-*`(`quadrant-*` 仅为兼容用法) |
| - 主数据字段选择(只用一个,避免混用): | ||
| - `list-*` → `lists` | ||
| - `sequence-*` → `sequences`(可选 `order asc|desc`) | ||
| - `compare-*` → `compares`(支持 `children` 分组对比),可包含多个对比项 | ||
| - `hierarchy-structure` → `items`(每一项对应一个独立层级,每一层级可以包含子项,最多可嵌套 3 层) | ||
| - `hierarchy-*` → 单一 `root`(树结构,通过 `children` 嵌套); | ||
| - `relation-*` → `nodes` + `relations`;简单关系图可省略 `nodes`,在 relations 中用箭头语法 | ||
| - `chart-*` → `values`(数值统计,可选 `category`) | ||
| - 不确定时再用 `items` 兜底 |
There was a problem hiding this comment.
这里同样将 hierarchy-structure 映射为使用 items 字段,但下方“hierarchy-* 模版”示例却用 infographic hierarchy-structure + root/children。建议统一:将该示例的数据字段改为 items,或把示例模板名改为某个 hierarchy-tree-* 并保留 root。
| - `.skills/infographic-creator/SKILL.md` in the "Available Templates" list. | ||
| - `site/src/components/AIPlayground/Prompt.ts` in the template list. | ||
| - `.skills/infographic-syntax-creator/references/prompt.md` in the template list. |
There was a problem hiding this comment.
skills 目录是为 Marketplace 的标准结构新增的,但这里的工作流仍只提示去更新 .skills/... 下的清单文件,容易导致后续只维护隐藏目录而让 Marketplace 使用的 skills/... 逐渐漂移。建议把引用路径改为 skills/...(或明确要求同时更新两个目录,并说明哪个是 source of truth)。
| - `.skills/infographic-creator/SKILL.md` in the "Available Templates" list. | |
| - `site/src/components/AIPlayground/Prompt.ts` in the template list. | |
| - `.skills/infographic-syntax-creator/references/prompt.md` in the template list. | |
| - `skills/infographic-creator/SKILL.md` in the "Available Templates" list. | |
| - `site/src/components/AIPlayground/Prompt.ts` in the template list. | |
| - `skills/infographic-syntax-creator/references/prompt.md` in the template list. |
|
Review 中关于 skills 和 /.skills 文件夹重复的问题,等待项目审查员给出明确建议后再考虑修改方案。 |
|
@balabalabalading 可以直接将 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #207 +/- ##
==========================================
+ Coverage 46.18% 46.20% +0.01%
==========================================
Files 338 338
Lines 27047 27049 +2
Branches 2221 2220 -1
==========================================
+ Hits 12492 12497 +5
+ Misses 14544 14541 -3
Partials 11 11
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
将 .skills 改为了 skills 目录,涉及以下改动点:
|
* feat: add Claude marketplace support and standard skills directory * 为新增的 json 末尾添加了空行;将 README 文件中手动安装的版本提示信息改为 0.2.14 * refactor: rename .skills to skills and remove .skills directory
变更内容
新增 Claude Marketplace 相关清单文件:marketplace.json 与 plugin.json。
使用以下 owner信息:
"owner": {
"name": "AntV Visualization Team",
"email": "pub_antv@antgroup.com"
},
更新文档中的 Claude Code 安装说明,新增 Marketplace 安装方式并保留手动兜底方案:
README.md
README.zh-CN.md
在仓库根目录新增标准 skills 目录,内容由现有 .skills 复制而来,同时保留原有 .skills 不变。
Claude Marketplace/Plugin 的标准结构期望使用项目根目录的 skills 文件夹,但是现有项目中已经将 skills 保存在 /.skills 文件夹中。我不知道这样保存的原因,因此请注意审查这个改动点。
校验结果