Skip to content

docs: add readme for cli usage#39

Merged
lxfu1 merged 4 commits into
chore/g2-skillsfrom
docs-readme
Apr 9, 2026
Merged

docs: add readme for cli usage#39
lxfu1 merged 4 commits into
chore/g2-skillsfrom
docs-readme

Conversation

@hustcc

@hustcc hustcc commented Apr 9, 2026

Copy link
Copy Markdown
Member

CLI Usage

We also provide a CLI tool for easy usage in your terminal, Install globally:

npm install -g chart-visualization-skills

Retrieve or list skills by query:

# Retrieve skills by query
chart-visualization-cli retrieve "bar chart" --library g2 --topk 10

# List all available skills
chart-visualization-cli list --library g2 --category core

Usage for the command:

Usage: chart-visualization-cli [options] [command]

CLI tool for AntV chart visualization skills retrieval

Options:
  -V, --version               output the version number
  -h, --help                  display help for command

Commands:
  retrieve [options] <query>  Search for skills matching a query
  list [options]              List all available skills
  help [command]              display help for command

API Usage

import { retrieve } from 'chart-visualization-skills';

const skills = retrieve('bar chart', 'g2', 5);
Parameter Type Default Description
query string Search query
library string 'g2' Library filter (g2 or g6)
topk number 7 Number of results

@lxfu1
lxfu1 merged commit b03204f into chore/g2-skills Apr 9, 2026
4 checks passed
@lxfu1
lxfu1 deleted the docs-readme branch April 9, 2026 12:30

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the README.md file. It renames 'g2-chart' to 'antv-g2-chart' for consistency and introduces new sections detailing CLI and API usage, complete with installation instructions, command examples, and an API example with a parameter table. The review feedback suggests minor improvements to the README.md for clarity and best practices, including refining a markdown heading, adding a language identifier to a code block, simplifying an API usage example to leverage default parameters, and ensuring the file ends with a newline character.

Comment thread README.md
chart-visualization-cli list --library g2 --category core
```

**Usage for the command**:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There's a leading space in this markdown heading which should be removed. Also, the title Usage for the command is a bit vague. Consider changing it to something more descriptive like Command Help Output to clarify that the following block shows the output of the help command.

Suggested change
**Usage for the command**:
**Command Help Output**:

Comment thread README.md

**Usage for the command**:

```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better syntax highlighting and accessibility, it's good practice to add a language identifier to fenced code blocks. For this block, which contains command-line help text, text would be appropriate.

Suggested change
```
```text

Comment thread README.md
```typescript
import { retrieve } from 'chart-visualization-skills';

const skills = retrieve('bar chart', 'g2', 5);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The current API usage example retrieve('bar chart', 'g2', 5) is correct, but since 'g2' is the default library, the example could be simplified to better showcase the use of default parameters. Using retrieve('bar chart') would be a more concise example that relies on both default library and topk values, which are documented in the table below.

Suggested change
const skills = retrieve('bar chart', 'g2', 5);
const skills = retrieve('bar chart');

Comment thread README.md

## License

MIT License - see the [LICENSE](LICENSE) file for details. No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The file is missing a newline character at the end. It's a common convention to end files with a newline to prevent issues with file concatenation and some command-line tools.

Suggested change
MIT License - see the [LICENSE](LICENSE) file for details.
MIT License - see the [LICENSE](LICENSE) file for details.

hustcc added a commit that referenced this pull request Apr 14, 2026
* chore: 新增 g2 skills

* chore: add performance part

* fix: test

* fix: Ai CR

* chore: user invocable

* chore: AI SDK 优化

* chore:  add harness

* fix: path error

* chore: 补充参考文档

* chore: 新增 grep 兜底检索

* chore: eval 自检更新

* chore: 删除无效scripts

* chore: skill 优化

* chore: add worktree

* chore: add kimi model

* chore: override env

* fix: 修复 data 格式错误

* chore: 目录结构调整

* chore: 补充评测数据

* chore: 删除 common 模块

* chore: 优化 scale skill

* chore: skill tool 移动到 cli 下

* chore: add playground

* refactor: skill cli (#37)

Co-authored-by: 逍为 <xiaowei.wzw@antgroup.com>
Co-authored-by: Joel Alan <31396322+lxfu1@users.noreply.github.com>

* test: fix ci workflow (#38)

Co-authored-by: 逍为 <xiaowei.wzw@antgroup.com>

* docs: add readme for cli usage (#39)

* docs: add readme for cli usage

* docs: fix skill typo

* docs: update

* test: fix ci

---------

Co-authored-by: 逍为 <xiaowei.wzw@antgroup.com>

* refactor: playground for cli and skill (#40)

* chore: 补全 playground libs

* fix: ts

* fix: resolve conversation

* chore: 代码优化

* fix: 修复由于 nextjs 加载源码导致 __dirname 异常 (#44)

* chore: 添加 claude plugin (#43)

* refactor: eval logic (#42)

* chore: 优化 harness 逻辑 (#48)

* chore: 优化 harness 逻辑

* chore: 优化 harness 流程

* fix: result count

* feat: 新增 retrieveWithContent (#49)

* feat: 新增 retrieveWithContent

* fix: test

* chore: loadSkillContent 目录约束

* fix: 修复 work tree 模式下 __dirname 不一致导致的优化异常

* chore: 新增 harness 优化 skill 后的基线对比逻辑 (#51)

* chore: cli 重命名 (#52)

* chore: cli 重命名

* fix: tests

* refactor: antv cli (#53)

* 精简索引构建输出并优化检索链路(移除 indexDir、使用 gray-matter 解析元数据、简化 includeContent,并统一 index 到 src/index→dist/index) (#56)

* Refactor playground AI flow to Vercel AI SDK with Skill/CLI mode tool assembly and token usage visibility (#54)

* Initial plan

* refactor(playground): migrate chat flow to vercel ai sdk

Agent-Logs-Url: https://github.com/antvis/chart-visualization-skills/sessions/60eb740b-946b-4dbc-8065-b2143da12fa4

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>

* fix(playground): harden skill path handling and restore temperature

Agent-Logs-Url: https://github.com/antvis/chart-visualization-skills/sessions/60eb740b-946b-4dbc-8065-b2143da12fa4

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>

* refactor(playground): split skill tools into separate modules

Agent-Logs-Url: https://github.com/antvis/chart-visualization-skills/sessions/bcdb3e77-18a5-4b73-8c9d-4ae97f87510a

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>

* feat(playground): redesign dual-mode ai tools workflow

Agent-Logs-Url: https://github.com/antvis/chart-visualization-skills/sessions/dd7b7fe2-54a4-4e8c-ac4d-531df443ff31

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>

* fix(playground): normalize library naming in prompts

Agent-Logs-Url: https://github.com/antvis/chart-visualization-skills/sessions/dd7b7fe2-54a4-4e8c-ac4d-531df443ff31

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>

* fix(playground): tighten tool input limits and constants

Agent-Logs-Url: https://github.com/antvis/chart-visualization-skills/sessions/dd7b7fe2-54a4-4e8c-ac4d-531df443ff31

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>

* fix(playground): simplify read-file validation fallback naming

Agent-Logs-Url: https://github.com/antvis/chart-visualization-skills/sessions/dd7b7fe2-54a4-4e8c-ac4d-531df443ff31

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>

* refactor(playground): use explicit step constants and schemas

Agent-Logs-Url: https://github.com/antvis/chart-visualization-skills/sessions/dd7b7fe2-54a4-4e8c-ac4d-531df443ff31

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>

* refactor(playground): rename modes to skill/cli and unify tools directory

Agent-Logs-Url: https://github.com/antvis/chart-visualization-skills/sessions/69d26ddf-26a6-43dd-bdca-32bb851ea746

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>

* fix(playground): harden tools path handling and naming

Agent-Logs-Url: https://github.com/antvis/chart-visualization-skills/sessions/69d26ddf-26a6-43dd-bdca-32bb851ea746

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>

* fix(playground): tighten tool path validation guards

Agent-Logs-Url: https://github.com/antvis/chart-visualization-skills/sessions/69d26ddf-26a6-43dd-bdca-32bb851ea746

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>

* refactor(playground): move mode entry files above tools directory

Agent-Logs-Url: https://github.com/antvis/chart-visualization-skills/sessions/e4438102-2cd2-42ac-b772-a29fa11c5a20

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>

* fix(playground): adapt retrieve tool to updated retrieve api

Agent-Logs-Url: https://github.com/antvis/chart-visualization-skills/sessions/8d505619-d6d9-48dd-85a5-af7c42bc73b7

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>

* refactor(playground): remove retrieve content fallback path

Agent-Logs-Url: https://github.com/antvis/chart-visualization-skills/sessions/c8187137-e11b-480a-9abf-ed20f30bb6f7

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>

* refactor(playground): use gray-matter in list references tool

Agent-Logs-Url: https://github.com/antvis/chart-visualization-skills/sessions/23696116-a1cb-402e-954e-06b426ddc4b2

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>

* chore: opt cli command

* refactor: playground

* feat: fix style

* feat: update website meta info

* fix: tool call error

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
Co-authored-by: hustcc <i@hust.cc>
Co-authored-by: 逍为 <xiaowei.wzw@antgroup.com>

* refactor: 重构 g2-chart skill (#57)

* refactor: 重构 g2-chart skill

* chore: resolve skill

* chore: 去掉 eval 中 list refercnces 逻辑

* chore: playground 模块支持加载外层 env (#58)

* chore: playground 模块支持加载外层 env

* Apply suggestions from code review

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: hustcc <i@hust.cc>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* docs: add agent.md (#60)

* docs: add agent.md

* chore: fix typo

---------

Co-authored-by: 逍为 <xiaowei.wzw@antgroup.com>

* chore: 修改 env 示例 (#59)

* chore: 修改 env 示例

* chore: 新增 VL Model 配置示例

* refactor: playground (#61)

* refactor: playground

* Update playground/src/libs/cli-mode.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update playground/src/libs/skill-mode.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update playground/src/app/api/generate/route.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: 逍为 <xiaowei.wzw@antgroup.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: hustcc <i@hust.cc>
Co-authored-by: 逍为 <xiaowei.wzw@antgroup.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
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