From ebfe578ed3e3d9d12263ae6cf8d1f0001f446679 Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 25 Nov 2026 15:18:01 +0800 Subject: [PATCH 1/4] feat: ship the CLI docs skill with rstack --- .gitignore | 1 + packages/rstack/package.json | 1 + packages/rstack/rslib.config.ts | 10 ++++++++++ website/docs/en/guide/ai.mdx | 4 +++- website/docs/zh/guide/ai.mdx | 4 +++- 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ef2bf49b..dadecd49 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ node_modules dist/ dist-*/ /packages/rstack/docs/ +/packages/rstack/skills/ test-results doc_build diff --git a/packages/rstack/package.json b/packages/rstack/package.json index 3111e4fd..cf4460d1 100644 --- a/packages/rstack/package.json +++ b/packages/rstack/package.json @@ -42,6 +42,7 @@ "binding.d.cts", "dist", "docs", + "skills", "types", "THIRD_PARTY_NOTICES.md" ], diff --git a/packages/rstack/rslib.config.ts b/packages/rstack/rslib.config.ts index bface2c6..17f054df 100644 --- a/packages/rstack/rslib.config.ts +++ b/packages/rstack/rslib.config.ts @@ -1,3 +1,4 @@ +import { resolve } from 'node:path'; import { defineConfig } from '@rslib/core'; import prettierPkgJson from 'prettier/package.json' with { type: 'json' }; import pkgJson from './package.json' with { type: 'json' }; @@ -40,6 +41,15 @@ export default defineConfig({ }, }, output: { + copy: [ + { + from: resolve( + import.meta.dirname, + '../../.agents/skills/rstack-cli-docs', + ), + to: resolve(import.meta.dirname, 'skills/rstack-cli-docs'), + }, + ], // Rstack always passes an explicit config object to lint-staged, so its // optional YAML config loader is not used. externals: ['jiti', 'yaml'], diff --git a/website/docs/en/guide/ai.mdx b/website/docs/en/guide/ai.mdx index e155b3ab..42687cc4 100644 --- a/website/docs/en/guide/ai.mdx +++ b/website/docs/en/guide/ai.mdx @@ -37,7 +37,9 @@ Rstack CLI provides domain-specific Agent Skills that help coding agents give mo 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. -Install it with the [skills](https://www.npmjs.com/package/skills) package: +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. + +You can also install it with the [skills](https://www.npmjs.com/package/skills) package: Date: Wed, 25 Nov 2026 15:19:51 +0800 Subject: [PATCH 2/4] docs: clarify how to enable the bundled CLI docs skill --- website/docs/en/guide/ai.mdx | 2 +- website/docs/zh/guide/ai.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/en/guide/ai.mdx b/website/docs/en/guide/ai.mdx index 42687cc4..fa2f6e76 100644 --- a/website/docs/en/guide/ai.mdx +++ b/website/docs/en/guide/ai.mdx @@ -37,7 +37,7 @@ Rstack CLI provides domain-specific Agent Skills that help coding agents give mo 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. -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. +This Skill ships with the `rstack` npm package. After installing `rstack` with 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. You can also install it with the [skills](https://www.npmjs.com/package/skills) package: diff --git a/website/docs/zh/guide/ai.mdx b/website/docs/zh/guide/ai.mdx index 8f146576..36e1bd57 100644 --- a/website/docs/zh/guide/ai.mdx +++ b/website/docs/zh/guide/ai.mdx @@ -37,7 +37,7 @@ Rstack CLI 提供面向特定领域的 Agent Skills,帮助 Coding Agent 更准 [rstack-cli-docs](https://github.com/rstackjs/rstack-cli/tree/main/.agents/skills/rstack-cli-docs) Skill 帮助 Coding Agent 查阅与当前版本匹配的 Rstack CLI 命令、配置和公共 API 文档。 -`rstack` npm 包内置了这个 Skill。如果项目使用 pnpm 12.11.0 或更高版本,并将 `rstack` 列为直接依赖,运行 `pnpm approve` 并批准 `rstack`,即可将它链接到 Agent 的 skills 目录。 +这个 Skill 随 `rstack` npm 包一起发布。使用 pnpm 12.11.0 或更高版本安装 `rstack` 后,运行 `pnpm approve` 并选择 `rstack`。pnpm 会将 Skill 链接到项目的 Agent Skills 目录。详情见 [pnpm 的 Agent Skills 文档](https://pnpm.io/agent-skills)。 也可以使用 [skills](https://www.npmjs.com/package/skills) 包安装该 Skill: From 88db0250fdfd4235a6bc6b3f8058bdd7df362518 Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 25 Nov 2026 15:20:48 +0800 Subject: [PATCH 3/4] docs: simplify the pnpm version condition --- website/docs/en/guide/ai.mdx | 2 +- website/docs/zh/guide/ai.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/en/guide/ai.mdx b/website/docs/en/guide/ai.mdx index fa2f6e76..e849234f 100644 --- a/website/docs/en/guide/ai.mdx +++ b/website/docs/en/guide/ai.mdx @@ -37,7 +37,7 @@ Rstack CLI provides domain-specific Agent Skills that help coding agents give mo 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. -This Skill ships with the `rstack` npm package. After installing `rstack` with 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. +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. You can also install it with the [skills](https://www.npmjs.com/package/skills) package: diff --git a/website/docs/zh/guide/ai.mdx b/website/docs/zh/guide/ai.mdx index 36e1bd57..0a73500b 100644 --- a/website/docs/zh/guide/ai.mdx +++ b/website/docs/zh/guide/ai.mdx @@ -37,7 +37,7 @@ Rstack CLI 提供面向特定领域的 Agent Skills,帮助 Coding Agent 更准 [rstack-cli-docs](https://github.com/rstackjs/rstack-cli/tree/main/.agents/skills/rstack-cli-docs) Skill 帮助 Coding Agent 查阅与当前版本匹配的 Rstack CLI 命令、配置和公共 API 文档。 -这个 Skill 随 `rstack` npm 包一起发布。使用 pnpm 12.11.0 或更高版本安装 `rstack` 后,运行 `pnpm approve` 并选择 `rstack`。pnpm 会将 Skill 链接到项目的 Agent Skills 目录。详情见 [pnpm 的 Agent Skills 文档](https://pnpm.io/agent-skills)。 +这个 Skill 随 `rstack` npm 包一起发布。如果你使用 pnpm 12.11.0 或更高版本,运行 `pnpm approve` 并选择 `rstack`。pnpm 会将 Skill 链接到项目的 Agent Skills 目录。详情见 [pnpm 的 Agent Skills 文档](https://pnpm.io/agent-skills)。 也可以使用 [skills](https://www.npmjs.com/package/skills) 包安装该 Skill: From cf4bbfe6f270520c3ca0ab932166f2b88eb2f906 Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 25 Nov 2026 15:21:55 +0800 Subject: [PATCH 4/4] docs: clarify how to enable the skill in Chinese --- website/docs/zh/guide/ai.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/zh/guide/ai.mdx b/website/docs/zh/guide/ai.mdx index 0a73500b..9272e195 100644 --- a/website/docs/zh/guide/ai.mdx +++ b/website/docs/zh/guide/ai.mdx @@ -37,7 +37,7 @@ Rstack CLI 提供面向特定领域的 Agent Skills,帮助 Coding Agent 更准 [rstack-cli-docs](https://github.com/rstackjs/rstack-cli/tree/main/.agents/skills/rstack-cli-docs) Skill 帮助 Coding Agent 查阅与当前版本匹配的 Rstack CLI 命令、配置和公共 API 文档。 -这个 Skill 随 `rstack` npm 包一起发布。如果你使用 pnpm 12.11.0 或更高版本,运行 `pnpm approve` 并选择 `rstack`。pnpm 会将 Skill 链接到项目的 Agent Skills 目录。详情见 [pnpm 的 Agent Skills 文档](https://pnpm.io/agent-skills)。 +`rstack` npm 包已内置这个 Skill。如果你使用 pnpm 12.11.0 或更高版本,可以在项目中运行 `pnpm approve`,选择 `rstack` 即可启用它。有关 Skill 的链接方式和目录设置,请参阅 [pnpm 的 Agent Skills 文档](https://pnpm.io/agent-skills)。 也可以使用 [skills](https://www.npmjs.com/package/skills) 包安装该 Skill: