Skip to content

Commit ebfe578

Browse files
committed
feat: ship the CLI docs skill with rstack
1 parent 8dd119e commit ebfe578

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+
The `rstack` npm package includes this Skill. If your project uses pnpm 12.11.0 or later and lists `rstack` as a direct dependency, run `pnpm approve` and approve `rstack` to link the Skill into your agent's skills directory.
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 或更高版本,并将 `rstack` 列为直接依赖,运行 `pnpm approve` 并批准 `rstack`,即可将它链接到 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)