Skip to content

Commit ade26b9

Browse files
authored
feat: ship the CLI docs skill with rstack (#664)
1 parent 8dd119e commit ade26b9

5 files changed

Lines changed: 18 additions & 2 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ node_modules
88
dist/
99
dist-*/
1010
/packages/rstack/docs/
11+
/packages/rstack/skills/
1112
test-results
1213
doc_build
1314

‎packages/rstack/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"binding.d.cts",
4343
"dist",
4444
"docs",
45+
"skills",
4546
"types",
4647
"THIRD_PARTY_NOTICES.md"
4748
],

‎packages/rstack/rslib.config.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { resolve } from 'node:path';
12
import { defineConfig } from '@rslib/core';
23
import prettierPkgJson from 'prettier/package.json' with { type: 'json' };
34
import pkgJson from './package.json' with { type: 'json' };
@@ -40,6 +41,15 @@ export default defineConfig({
4041
},
4142
},
4243
output: {
44+
copy: [
45+
{
46+
from: resolve(
47+
import.meta.dirname,
48+
'../../.agents/skills/rstack-cli-docs',
49+
),
50+
to: resolve(import.meta.dirname, 'skills/rstack-cli-docs'),
51+
},
52+
],
4353
// Rstack always passes an explicit config object to lint-staged, so its
4454
// optional YAML config loader is not used.
4555
externals: ['jiti', 'yaml'],

‎website/docs/en/guide/ai.mdx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ Rstack CLI provides domain-specific Agent Skills that help coding agents give mo
3737

3838
The [rstack-cli-docs](https://github.com/rstackjs/rstack-cli/tree/main/.agents/skills/rstack-cli-docs) Skill helps coding agents consult version-matched documentation for Rstack CLI commands, configuration, and public APIs.
3939

40-
Install it with the [skills](https://www.npmjs.com/package/skills) package:
40+
This Skill ships with the `rstack` npm package. If you use pnpm 12.11.0 or later, run `pnpm approve` and select `rstack`. pnpm then links the Skill into your project's agent skills directory. See [Agent Skills in pnpm](https://pnpm.io/agent-skills) for details.
41+
42+
You can also install it with the [skills](https://www.npmjs.com/package/skills) package:
4143

4244
<PackageManagerTabs
4345
command="skills add rstackjs/rstack-cli --skill rstack-cli-docs"

‎website/docs/zh/guide/ai.mdx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ Rstack CLI 提供面向特定领域的 Agent Skills,帮助 Coding Agent 更准
3737

3838
[rstack-cli-docs](https://github.com/rstackjs/rstack-cli/tree/main/.agents/skills/rstack-cli-docs) Skill 帮助 Coding Agent 查阅与当前版本匹配的 Rstack CLI 命令、配置和公共 API 文档。
3939

40-
使用 [skills](https://www.npmjs.com/package/skills) 包安装该 Skill:
40+
`rstack` npm 包已内置这个 Skill。如果你使用 pnpm 12.11.0 或更高版本,可以在项目中运行 `pnpm approve`,选择 `rstack` 即可启用它。有关 Skill 的链接方式和目录设置,请参阅 [pnpm 的 Agent Skills 文档](https://pnpm.io/agent-skills)。
41+
42+
也可以使用 [skills](https://www.npmjs.com/package/skills) 包安装该 Skill:
4143

4244
<PackageManagerTabs
4345
command="skills add rstackjs/rstack-cli --skill rstack-cli-docs"

0 commit comments

Comments
 (0)