Skip to content

Commit 23b4d7d

Browse files
committed
docs: update AI skill data output docs
1 parent d90f684 commit 23b4d7d

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

  • packages/document/docs

packages/document/docs/en/guide/start/ai.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@ In the [rstackjs/agent-skills](https://github.com/rstackjs/agent-skills) reposit
1818

1919
- [rsdoctor-analysis](https://github.com/rstackjs/agent-skills#rsdoctor-skills): Use Rsdoctor for build analysis and provide optimization recommendations.
2020

21+
The `rsdoctor-analysis` skill analyzes the data in `rsdoctor-data.json`. You can generate this file by setting `output.mode` to `'brief'` and `output.options.type` to `['json']`:
22+
23+
```js
24+
new RsdoctorRspackPlugin({
25+
output: {
26+
mode: 'brief',
27+
options: {
28+
type: ['json'],
29+
},
30+
},
31+
});
32+
```
33+
34+
You can also set the `RSDOCTOR_OUTPUT='json'` environment variable to output the analysis data as a JSON file. This environment configuration requires `@rsdoctor/*-plugin` version `>= 1.5.11`.
35+
2136
In Coding Agents that support skills, you can use the [skills](https://www.npmjs.com/package/skills) package to install a specific skill with the following command:
2237

2338
<PackageManagerTabs

packages/document/docs/zh/guide/start/ai.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@ Agent Skills 是可安装到 Agent 中的领域知识包,能够让 Agent 在
1818

1919
- [rsdoctor-analysis](https://github.com/rstackjs/agent-skills#rsdoctor-skills):使用 Rsdoctor 进行构建分析并提供优化建议。
2020

21+
`rsdoctor-analysis` Skill 分析的是 `rsdoctor-data.json` 中的数据。你可以通过将 `output.mode` 设置为 `'brief'`,并将 `output.options.type` 设置为 `['json']` 来生成该文件:
22+
23+
```js
24+
new RsdoctorRspackPlugin({
25+
output: {
26+
mode: 'brief',
27+
options: {
28+
type: ['json'],
29+
},
30+
},
31+
});
32+
```
33+
34+
也可以通过设置 `RSDOCTOR_OUTPUT='json'` 环境变量,将分析数据输出为 JSON 文件。这个环境配置需要 `@rsdoctor/*-plugin` `>= 1.5.11`
35+
2136
在支持 Skills 的 Coding Agent 中,可以通过以下命令使用 [skills](https://www.npmjs.com/package/skills) 包安装指定的 Skill:
2237

2338
<PackageManagerTabs

0 commit comments

Comments
 (0)