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..e849234f 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: +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: