From 19d64c13cdbe8c24235854e72c0adc05111a2e0e Mon Sep 17 00:00:00 2001 From: SoonIter Date: Tue, 28 Apr 2026 19:08:39 +0800 Subject: [PATCH 01/10] chore: integrate skills-package-manager via prepare script --- .gitignore | 4 ++++ package.json | 3 ++- skills-lock.yaml | 4 ++++ skills.json | 7 +++++++ 4 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 skills-lock.yaml create mode 100644 skills.json diff --git a/.gitignore b/.gitignore index 2974dd7e4e..54c3ba07b1 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,7 @@ test-temp-* # ignore directory for artifacts produced by tests test-results/ + +# skills-package-manager +.agents/skills/ + diff --git a/package.json b/package.json index 2588a6e7db..3adc74f475 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "format": "prettier --experimental-cli --write . && heading-case --write", "lint": "rslint --type-check", "prebundle": "pnpm --parallel --filter \"./packages/*\" run prebundle", - "prepare": "simple-git-hooks && node --run prebundle && node --run build", + "prepare": "skills-package-manager install && simple-git-hooks && node --run prebundle && node --run build", "sort-package-json": "pnpx sort-package-json \"./package.json\" \"packages/*/package.json\"", "test": "rstest", "test:watch": "rstest watch" @@ -43,6 +43,7 @@ "nano-staged": "^1.0.2", "prettier": "^3.8.3", "simple-git-hooks": "^2.13.1", + "skills-package-manager": "0.9.0", "typescript": "^6.0.3" }, "packageManager": "pnpm@10.33.4", diff --git a/skills-lock.yaml b/skills-lock.yaml new file mode 100644 index 0000000000..a47efd7d43 --- /dev/null +++ b/skills-lock.yaml @@ -0,0 +1,4 @@ +lockfileVersion: "0.1" +installDir: .agents/skills +linkTargets: [] +skills: {} diff --git a/skills.json b/skills.json new file mode 100644 index 0000000000..8af512642a --- /dev/null +++ b/skills.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://unpkg.com/skills-package-manager@0.9.0/skills.schema.json", + "installDir": ".agents/skills", + "linkTargets": [], + "skills": {}, + "selfSkill": false +} From f4b4f973faaa847560aa7ff7c69d219ffaa69b3e Mon Sep 17 00:00:00 2001 From: SoonIter Date: Tue, 28 Apr 2026 19:15:21 +0800 Subject: [PATCH 02/10] chore: register pr-creator and rspress-description-generator in skills.json --- skills-lock.yaml | 14 +++++++++++++- skills.json | 5 ++++- {.agents/skills => skills}/pr-creator/SKILL.md | 0 .../rspress-description-generator/SKILL.md | 0 4 files changed, 17 insertions(+), 2 deletions(-) rename {.agents/skills => skills}/pr-creator/SKILL.md (100%) rename {.agents/skills => skills}/rspress-description-generator/SKILL.md (100%) diff --git a/skills-lock.yaml b/skills-lock.yaml index a47efd7d43..d140b1ddd7 100644 --- a/skills-lock.yaml +++ b/skills-lock.yaml @@ -1,4 +1,16 @@ lockfileVersion: "0.1" installDir: .agents/skills linkTargets: [] -skills: {} +skills: + pr-creator: + specifier: link:./skills/pr-creator + resolution: + type: link + path: skills/pr-creator + digest: "" + rspress-description-generator: + specifier: link:./skills/rspress-description-generator + resolution: + type: link + path: skills/rspress-description-generator + digest: "" diff --git a/skills.json b/skills.json index 8af512642a..cea8b06062 100644 --- a/skills.json +++ b/skills.json @@ -2,6 +2,9 @@ "$schema": "https://unpkg.com/skills-package-manager@0.9.0/skills.schema.json", "installDir": ".agents/skills", "linkTargets": [], - "skills": {}, + "skills": { + "pr-creator": "link:./skills/pr-creator", + "rspress-description-generator": "link:./skills/rspress-description-generator" + }, "selfSkill": false } diff --git a/.agents/skills/pr-creator/SKILL.md b/skills/pr-creator/SKILL.md similarity index 100% rename from .agents/skills/pr-creator/SKILL.md rename to skills/pr-creator/SKILL.md diff --git a/.agents/skills/rspress-description-generator/SKILL.md b/skills/rspress-description-generator/SKILL.md similarity index 100% rename from .agents/skills/rspress-description-generator/SKILL.md rename to skills/rspress-description-generator/SKILL.md From 20f2c4e88f61b82edeb0c333e7b3a56f3abe3487 Mon Sep 17 00:00:00 2001 From: SoonIter Date: Tue, 28 Apr 2026 19:24:25 +0800 Subject: [PATCH 03/10] chore: use git protocol for shared skills and link protocol for dev-skills --- .../docs-en-improvement/SKILL.md | 0 .../release-core/SKILL.md | 0 .../sync-zh-en-docs/SKILL.md | 0 .../upgrade-rspack/SKILL.md | 0 .../write-e2e-cases/SKILL.md | 0 skills-lock.yaml | 44 ++++++- skills.json | 9 +- skills/pr-creator/SKILL.md | 50 -------- skills/rspress-description-generator/SKILL.md | 118 ------------------ 9 files changed, 46 insertions(+), 175 deletions(-) rename {.agents/skills => dev-skills}/docs-en-improvement/SKILL.md (100%) rename {.agents/skills => dev-skills}/release-core/SKILL.md (100%) rename {.agents/skills => dev-skills}/sync-zh-en-docs/SKILL.md (100%) rename {.agents/skills => dev-skills}/upgrade-rspack/SKILL.md (100%) rename {.agents/skills => dev-skills}/write-e2e-cases/SKILL.md (100%) delete mode 100644 skills/pr-creator/SKILL.md delete mode 100644 skills/rspress-description-generator/SKILL.md diff --git a/.agents/skills/docs-en-improvement/SKILL.md b/dev-skills/docs-en-improvement/SKILL.md similarity index 100% rename from .agents/skills/docs-en-improvement/SKILL.md rename to dev-skills/docs-en-improvement/SKILL.md diff --git a/.agents/skills/release-core/SKILL.md b/dev-skills/release-core/SKILL.md similarity index 100% rename from .agents/skills/release-core/SKILL.md rename to dev-skills/release-core/SKILL.md diff --git a/.agents/skills/sync-zh-en-docs/SKILL.md b/dev-skills/sync-zh-en-docs/SKILL.md similarity index 100% rename from .agents/skills/sync-zh-en-docs/SKILL.md rename to dev-skills/sync-zh-en-docs/SKILL.md diff --git a/.agents/skills/upgrade-rspack/SKILL.md b/dev-skills/upgrade-rspack/SKILL.md similarity index 100% rename from .agents/skills/upgrade-rspack/SKILL.md rename to dev-skills/upgrade-rspack/SKILL.md diff --git a/.agents/skills/write-e2e-cases/SKILL.md b/dev-skills/write-e2e-cases/SKILL.md similarity index 100% rename from .agents/skills/write-e2e-cases/SKILL.md rename to dev-skills/write-e2e-cases/SKILL.md diff --git a/skills-lock.yaml b/skills-lock.yaml index d140b1ddd7..8e95f2ab5e 100644 --- a/skills-lock.yaml +++ b/skills-lock.yaml @@ -3,14 +3,48 @@ installDir: .agents/skills linkTargets: [] skills: pr-creator: - specifier: link:./skills/pr-creator + specifier: https://github.com/rstackjs/agent-skills.git#820107031c56beff4187e083aea167f97483291c&path:/skills/pr-creator + resolution: + type: git + url: https://github.com/rstackjs/agent-skills.git + commit: 820107031c56beff4187e083aea167f97483291c + path: /skills/pr-creator + digest: sha256-de908ab3d59cf3145ee61d22759cc6aaac068b97bbb67aa521a42e5e2d3c01a6 + rspress-description-generator: + specifier: https://github.com/rstackjs/agent-skills.git#820107031c56beff4187e083aea167f97483291c&path:/skills/rspress-description-generator + resolution: + type: git + url: https://github.com/rstackjs/agent-skills.git + commit: 820107031c56beff4187e083aea167f97483291c + path: /skills/rspress-description-generator + digest: sha256-ecf6328cb15e217396c5d4c90f35fce01c06d29c7ed3bc1f2270f4228895f99d + docs-en-improvement: + specifier: link:./dev-skills/docs-en-improvement resolution: type: link - path: skills/pr-creator + path: dev-skills/docs-en-improvement digest: "" - rspress-description-generator: - specifier: link:./skills/rspress-description-generator + release-core: + specifier: link:./dev-skills/release-core + resolution: + type: link + path: dev-skills/release-core + digest: "" + sync-zh-en-docs: + specifier: link:./dev-skills/sync-zh-en-docs + resolution: + type: link + path: dev-skills/sync-zh-en-docs + digest: "" + upgrade-rspack: + specifier: link:./dev-skills/upgrade-rspack + resolution: + type: link + path: dev-skills/upgrade-rspack + digest: "" + write-e2e-cases: + specifier: link:./dev-skills/write-e2e-cases resolution: type: link - path: skills/rspress-description-generator + path: dev-skills/write-e2e-cases digest: "" diff --git a/skills.json b/skills.json index cea8b06062..4adfe9f893 100644 --- a/skills.json +++ b/skills.json @@ -3,8 +3,13 @@ "installDir": ".agents/skills", "linkTargets": [], "skills": { - "pr-creator": "link:./skills/pr-creator", - "rspress-description-generator": "link:./skills/rspress-description-generator" + "pr-creator": "https://github.com/rstackjs/agent-skills.git#820107031c56beff4187e083aea167f97483291c&path:/skills/pr-creator", + "rspress-description-generator": "https://github.com/rstackjs/agent-skills.git#820107031c56beff4187e083aea167f97483291c&path:/skills/rspress-description-generator", + "docs-en-improvement": "link:./dev-skills/docs-en-improvement", + "release-core": "link:./dev-skills/release-core", + "sync-zh-en-docs": "link:./dev-skills/sync-zh-en-docs", + "upgrade-rspack": "link:./dev-skills/upgrade-rspack", + "write-e2e-cases": "link:./dev-skills/write-e2e-cases" }, "selfSkill": false } diff --git a/skills/pr-creator/SKILL.md b/skills/pr-creator/SKILL.md deleted file mode 100644 index 45c4620786..0000000000 --- a/skills/pr-creator/SKILL.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -name: pr-creator -description: Use when asked to create a pull request for this repository. It helps the PR follow the repository's branch safety rules, title convention, pull request template, and concise English writing style. ---- - -# Pull Request Creator - -## Steps - -1. Confirm the current branch with `git branch --show-current`. - If it is the default branch, create and switch to a new branch before doing anything else. - Use a descriptive branch name, preferably `feat-` or `fix-`. - -2. Review local changes with `git status --short`. - Do not revert unrelated user changes. - Before creating the PR, ensure the intended changes are committed and never commit directly on the default branch. - -3. If `.github/PULL_REQUEST_TEMPLATE.md` exists, read it and follow its structure. - -4. Draft the PR title in the repository's standard format. If the repository uses Conventional Commits, common patterns include: - - `feat(core): add ...` - - `fix(types): ...` - - `docs: ...` - - `refactor(types): ...` - - `chore(deps): ...` - - `release: v1.2.0` - -5. Write the PR body in concise, clear English. - - In `Summary`, explain the change context first: the user-facing problem, maintenance goal, or compatibility constraint that makes the change necessary. - - Prioritize high-signal information: public API changes, behavior changes, breaking changes, migration notes, and important compatibility implications. - - Then describe the main implementation change only as much as needed to understand the review. - - Keep it short: one compact paragraph or 2-4 bullets is usually enough. - - Avoid low-signal sections such as `Test plan` or `Validation`, routine verification commands, generated file lists, or obvious implementation details unless the repository template explicitly requires them or the change has unusual validation risk. - - Good background examples: - - `This PR adds support for custom logger injection so CLI output can be isolated per instance.` - - `This PR fixes incorrect padding in URL labels to keep terminal output aligned across different label lengths.` - - `This PR updates the English docs to clarify how the extraction option works and when to enable it.` - -6. Fill `Related Links` with issue links, design docs, related PRs, or discussion pages. - If the PR upgrades an npm dependency, add a link to the upgraded version's release notes or tag page when available. - Example: `https://github.com/web-infra-dev/rspack/releases/tag/v1.0.0` - If there is no relevant link, omit the entire `Related Links` section from the PR body. - -7. Push the branch only after re-checking the branch name. Never push the default branch directly. - -8. Create the PR with `gh pr create`. - -## Constraints - -- Do not modify code while following this skill. diff --git a/skills/rspress-description-generator/SKILL.md b/skills/rspress-description-generator/SKILL.md deleted file mode 100644 index 5c5f760c24..0000000000 --- a/skills/rspress-description-generator/SKILL.md +++ /dev/null @@ -1,118 +0,0 @@ ---- -name: rspress-description-generator -description: Generate and maintain description frontmatter for Rspress documentation files (.md/.mdx). Use when a user wants to add SEO descriptions, improve search engine snippets, generate llms.txt metadata, prepare docs for AI summarization, or batch-update frontmatter across an Rspress doc site. Also use when adding new documentation pages to an Rspress project — every new doc file needs a description. ---- - -# Rspress Description Generator - -The `description` field in Rspress frontmatter generates `` tags, which are used for search engine snippets, social media previews, and AI-oriented formats like llms.txt. - -## Step 1 — Locate the docs root - -1. Find the Rspress config file. Search for `rspress.config.ts`, `.js`, `.mjs`, or `.cjs`. It may be at the project root or inside a subdirectory like `website/`. -2. Read the config and extract the `root` option. - - The value might be a plain string (`root: 'docs'`) or a JS expression (`root: path.join(__dirname, 'docs')`). In either case, determine the resolved directory path. - - If `root` is set, resolve it relative to the config file's directory. - - If `root` is not set, default to `docs` relative to the config file's directory. -3. Confirm the directory exists. If neither `docs` nor the configured root exists, check for `doc` as a fallback. - -## Step 2 — Detect i18n structure - -Rspress i18n projects place language subdirectories (e.g., `en/`, `zh/`) directly under the docs root: - -``` -docs/ -├── en/ -│ ├── guide/ -│ └── index.md -└── zh/ - ├── guide/ - └── index.md -``` - -Check if the docs root contains language subdirectories (two-letter codes like `en`, `zh`, `ja`, `ko`, etc.). If so, process each language directory separately — the description language should match the content language. - -If there are no language subdirectories, treat the entire docs root as a single-language site. - -## Step 3 — Scan and process files - -Glob for `**/*.md` and `**/*.mdx` under the docs root. Exclude: - -- `node_modules`, build output (`doc_build`, `.rspress`, `dist`) -- `_meta.json` / `_nav.json` (sidebar/nav config files, not doc pages) -- `**/shared/**` directories (reusable snippets included via `@import`, not standalone pages) - -For each file: - -1. **Read the file.** -2. **Check for existing `description` in frontmatter.** If it exists and is non-empty, skip. -3. **Check `pageType` in frontmatter.** For `home` pages, derive the description from the `hero.text` / `hero.tagline` fields or the features list, not from body content. -4. **Generate a description** following the writing guidelines below. -5. **Insert `description` into frontmatter:** - - If the file has frontmatter with a `title` field, insert `description` on the line after `title`. - - If the file has frontmatter without `title`, insert `description` as the first field. - - If the file has no frontmatter block, add one: - - ```yaml - --- - description: Your generated description here - --- - ``` - -### YAML formatting - -Most descriptions can be bare YAML strings: - -```yaml -description: Step-by-step guide to setting up your first Rspress site -``` - -If the description contains colons, quotes, or other special YAML characters, wrap in double quotes: - -```yaml -description: 'API reference for Rspress configuration: plugins, themes, and build options' -``` - -## Step 4 — Batch processing - -For sites with many files, use parallel agent calls to process independent files simultaneously. Group by directory (e.g., all files in `guide/`, then all in `api/`) to maintain focus and consistency within each section. - -After processing all files, do a quick scan to ensure no files were missed — re-glob and check for any remaining files without `description`. - -## Description Writing Guidelines - -The description serves three audiences: search engines (Google snippet), AI systems (llms.txt, summarization), and humans (scanning search results). A good description helps all three. - -### Rules - -- **Length**: 50–160 characters. Under 50 is too vague for search engines; over 160 gets truncated in snippets. -- **Language**: Match the document content. Chinese docs get Chinese descriptions, English docs get English descriptions. -- **Be direct**: State what the page covers. Avoid starting with "This document", "This page", "Learn about" — jump straight to the substance. -- **Be specific**: Mention concrete technologies, APIs, or concepts the page covers. "Configure Rspress plugins for search, analytics, and internationalization" beats "How to use plugins." -- **No markdown**: Plain text only, no formatting syntax. - -### Examples - -**Good:** - -| Content | Description | -| -------------------------- | ---------------------------------------------------------------------------- | -| Plugin development guide | Create custom Rspress plugins using the Node.js plugin API and runtime hooks | -| MDX component usage | Import and use React components in MDX documentation files | -| Rspress 快速开始 | 从安装到本地预览,搭建 Rspress 文档站点的完整流程 | -| 主题配置 | 自定义 Rspress 主题的导航栏、侧边栏、页脚和暗色模式 | -| Home page (pageType: home) | Rspress documentation framework — fast, MDX-powered static site generator | - -**Bad:** - -| Description | Why | -| ------------------------------------------------------- | ------------------------------------------------ | -| "About plugins" | Too vague — which plugins? what about them? | -| "This page explains how to configure the Rspress theme" | Wastes characters on "This page explains how to" | -| "Learn everything about Rspress!" | Marketing fluff, says nothing specific | - -## Documentation - -- Frontmatter fields: -- Basic config (`root` option): -- Full Rspress docs: From 88b4e8f737faf1323fcfb0beaa12e437dba426f3 Mon Sep 17 00:00:00 2001 From: SoonIter Date: Tue, 28 Apr 2026 19:28:27 +0800 Subject: [PATCH 04/10] chore: update pnpm-lock.yaml for skills-package-manager --- pnpm-lock.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b6c0a57620..1bf4f12f1a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -56,6 +56,9 @@ importers: simple-git-hooks: specifier: ^2.13.1 version: 2.13.1 + skills-package-manager: + specifier: 0.9.0 + version: 0.9.0 typescript: specifier: ^6.0.3 version: 6.0.3 @@ -5226,6 +5229,10 @@ packages: resolution: {integrity: sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==} engines: {node: '>=18'} + skills-package-manager@0.9.0: + resolution: {integrity: sha512-9RlfpPClQvInTBegfxUhMr/UuNvX4OMx7dCSepegruhxnXRtHanb2XVUiK/yqCTDWlBl9LSaY1AwkI1LyeYWRw==} + hasBin: true + snake-case@3.0.4: resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} @@ -10381,6 +10388,8 @@ snapshots: mrmime: 2.0.1 totalist: 3.0.1 + skills-package-manager@0.9.0: {} + snake-case@3.0.4: dependencies: dot-case: 3.0.4 From e50dbe8ca5eef2da92c46e0de3319a79b8430e52 Mon Sep 17 00:00:00 2001 From: SoonIter Date: Tue, 28 Apr 2026 19:33:10 +0800 Subject: [PATCH 05/10] chore: fix skills-lock.yaml formatting --- skills-lock.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/skills-lock.yaml b/skills-lock.yaml index 8e95f2ab5e..f6c76f243f 100644 --- a/skills-lock.yaml +++ b/skills-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: "0.1" +lockfileVersion: '0.1' installDir: .agents/skills linkTargets: [] skills: @@ -23,28 +23,28 @@ skills: resolution: type: link path: dev-skills/docs-en-improvement - digest: "" + digest: '' release-core: specifier: link:./dev-skills/release-core resolution: type: link path: dev-skills/release-core - digest: "" + digest: '' sync-zh-en-docs: specifier: link:./dev-skills/sync-zh-en-docs resolution: type: link path: dev-skills/sync-zh-en-docs - digest: "" + digest: '' upgrade-rspack: specifier: link:./dev-skills/upgrade-rspack resolution: type: link path: dev-skills/upgrade-rspack - digest: "" + digest: '' write-e2e-cases: specifier: link:./dev-skills/write-e2e-cases resolution: type: link path: dev-skills/write-e2e-cases - digest: "" + digest: '' From accd64db55f06101b32088c80b84dd907080f188 Mon Sep 17 00:00:00 2001 From: SoonIter Date: Tue, 28 Apr 2026 19:35:58 +0800 Subject: [PATCH 06/10] chore: add worktree to cspell dictionary --- scripts/dictionary.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/dictionary.txt b/scripts/dictionary.txt index 3e77aa46b0..46305c27c6 100644 --- a/scripts/dictionary.txt +++ b/scripts/dictionary.txt @@ -164,3 +164,4 @@ vnode watchpack webm webp +worktree From 165e4d2e9159493f5f65e391a55447b7c97fe4c1 Mon Sep 17 00:00:00 2001 From: SoonIter Date: Thu, 7 May 2026 16:08:42 +0800 Subject: [PATCH 07/10] chore: format skill headings --- .prettierignore | 1 + dev-skills/docs-en-improvement/SKILL.md | 2 +- dev-skills/release-core/SKILL.md | 2 +- dev-skills/sync-zh-en-docs/SKILL.md | 2 +- dev-skills/write-e2e-cases/SKILL.md | 4 ++-- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.prettierignore b/.prettierignore index 4b430ba1cb..094fc77159 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,6 +3,7 @@ dist compiled doc_build pnpm-lock.yaml +skills-lock.yaml # Avoid syntax error e2e/cases/plugin-less/inline-js/src/*.less diff --git a/dev-skills/docs-en-improvement/SKILL.md b/dev-skills/docs-en-improvement/SKILL.md index 5be1fb6d84..b3c10757dc 100644 --- a/dev-skills/docs-en-improvement/SKILL.md +++ b/dev-skills/docs-en-improvement/SKILL.md @@ -3,7 +3,7 @@ name: docs-en-improvement description: Improve English documentation under `website/docs/en` by rewriting unnatural translated sentences into clear, professional English while preserving meaning. Use when editing or polishing English docs. --- -# Docs En Improvement +# Docs en improvement ## Steps diff --git a/dev-skills/release-core/SKILL.md b/dev-skills/release-core/SKILL.md index f9531b0230..1b37b3b253 100644 --- a/dev-skills/release-core/SKILL.md +++ b/dev-skills/release-core/SKILL.md @@ -3,7 +3,7 @@ name: release-core description: Use when asked to release `@rsbuild/core` for a specific version. --- -# Release Core +# Release core ## Input diff --git a/dev-skills/sync-zh-en-docs/SKILL.md b/dev-skills/sync-zh-en-docs/SKILL.md index 3e260e2052..1f709bdfd0 100644 --- a/dev-skills/sync-zh-en-docs/SKILL.md +++ b/dev-skills/sync-zh-en-docs/SKILL.md @@ -3,7 +3,7 @@ name: sync-zh-en-docs description: Sync uncommitted docs between `website/docs/zh` and `website/docs/en`. Use when authors update docs in one language and need to align the mirrored `.md`/`.mdx` file in the other language. --- -# Sync Zh/En Documentation +# Sync Zh/En documentation ## Steps diff --git a/dev-skills/write-e2e-cases/SKILL.md b/dev-skills/write-e2e-cases/SKILL.md index 2abff8df32..d6feec75d2 100644 --- a/dev-skills/write-e2e-cases/SKILL.md +++ b/dev-skills/write-e2e-cases/SKILL.md @@ -3,7 +3,7 @@ name: write-e2e-cases description: Use when adding or updating Rsbuild end-to-end tests in `e2e/cases`, including new feature coverage, bug reproduction, and regression prevention. --- -# Write E2E Cases +# Write E2E cases ## Steps @@ -19,7 +19,7 @@ description: Use when adding or updating Rsbuild end-to-end tests in `e2e/cases` 6. Run `pnpm e2e` to validate. -## Case Structure +## Case structure - Include a `src` directory in every case (required). - Add `rsbuild.config.ts` only when needed. From a40abb58580189fd9eb3a66001b0667af9149634 Mon Sep 17 00:00:00 2001 From: SoonIter Date: Fri, 8 May 2026 05:38:15 +0800 Subject: [PATCH 08/10] chore: address skills manager review comments --- .prettierignore | 1 + cspell.config.js | 1 + package.json | 2 +- scripts/install-skills.mjs | 36 ++++++++++++++++++++++++++++++++++++ skills-lock.json | 23 ----------------------- skills-lock.yaml | 12 ++++++------ 6 files changed, 45 insertions(+), 30 deletions(-) create mode 100644 scripts/install-skills.mjs delete mode 100644 skills-lock.json diff --git a/.prettierignore b/.prettierignore index 094fc77159..099d6bddd7 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,6 +2,7 @@ dist compiled doc_build +.agents pnpm-lock.yaml skills-lock.yaml diff --git a/cspell.config.js b/cspell.config.js index 8da5651d45..fe38a5caac 100644 --- a/cspell.config.js +++ b/cspell.config.js @@ -15,6 +15,7 @@ export default { 'compiled', 'coverage', 'doc_build', + '.agents', 'node_modules', 'pnpm-lock.yaml', 'README.pt-BR.md', diff --git a/package.json b/package.json index 3adc74f475..4aaf08738e 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "format": "prettier --experimental-cli --write . && heading-case --write", "lint": "rslint --type-check", "prebundle": "pnpm --parallel --filter \"./packages/*\" run prebundle", - "prepare": "skills-package-manager install && simple-git-hooks && node --run prebundle && node --run build", + "prepare": "node scripts/install-skills.mjs && simple-git-hooks && node --run prebundle && node --run build", "sort-package-json": "pnpx sort-package-json \"./package.json\" \"packages/*/package.json\"", "test": "rstest", "test:watch": "rstest watch" diff --git a/scripts/install-skills.mjs b/scripts/install-skills.mjs new file mode 100644 index 0000000000..523ba476d8 --- /dev/null +++ b/scripts/install-skills.mjs @@ -0,0 +1,36 @@ +import { spawnSync } from 'node:child_process'; + +const isProductionInstall = + process.env.NODE_ENV === 'production' || + process.env.npm_config_production === 'true' || + process.env.pnpm_config_production === 'true'; + +if (isProductionInstall) { + console.log('[skills-package-manager] skipped in production install.'); + process.exit(0); +} + +const hasSkillsPackageManager = spawnSync( + 'pnpm', + ['exec', 'skills-package-manager', '--version'], + { stdio: 'ignore' }, +); + +if (hasSkillsPackageManager.status !== 0) { + console.warn( + '[skills-package-manager] skipped because the binary is unavailable.', + ); + process.exit(0); +} + +const install = spawnSync( + 'pnpm', + ['exec', 'skills-package-manager', 'install'], + { + stdio: 'inherit', + }, +); + +if (install.status !== 0) { + console.warn('[skills-package-manager] install failed; continuing prepare.'); +} diff --git a/skills-lock.json b/skills-lock.json deleted file mode 100644 index b813e2cdcf..0000000000 --- a/skills-lock.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "version": 1, - "skills": { - "create-draft-release-notes": { - "source": "rstackjs/agent-skills", - "sourceType": "github", - "skillPath": "skills/create-draft-release-notes/SKILL.md", - "computedHash": "72a427134af52e91cbba9bc55f9926cadd8f5bedf48d654952697f08d540e7bb" - }, - "pr-creator": { - "source": "rstackjs/agent-skills", - "sourceType": "github", - "skillPath": "skills/pr-creator/SKILL.md", - "computedHash": "a632c60f135594b5ec098ce6196c85395e448ade27882292bf0b68f9192e8278" - }, - "rspress-description-generator": { - "source": "rstackjs/agent-skills", - "sourceType": "github", - "skillPath": "skills/rspress-description-generator/SKILL.md", - "computedHash": "ca2693ca055d1b4e5903bdfacab522f46ca0e13cbc5db59e6c9589fdc8efc6ad" - } - } -} diff --git a/skills-lock.yaml b/skills-lock.yaml index f6c76f243f..8e95f2ab5e 100644 --- a/skills-lock.yaml +++ b/skills-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: '0.1' +lockfileVersion: "0.1" installDir: .agents/skills linkTargets: [] skills: @@ -23,28 +23,28 @@ skills: resolution: type: link path: dev-skills/docs-en-improvement - digest: '' + digest: "" release-core: specifier: link:./dev-skills/release-core resolution: type: link path: dev-skills/release-core - digest: '' + digest: "" sync-zh-en-docs: specifier: link:./dev-skills/sync-zh-en-docs resolution: type: link path: dev-skills/sync-zh-en-docs - digest: '' + digest: "" upgrade-rspack: specifier: link:./dev-skills/upgrade-rspack resolution: type: link path: dev-skills/upgrade-rspack - digest: '' + digest: "" write-e2e-cases: specifier: link:./dev-skills/write-e2e-cases resolution: type: link path: dev-skills/write-e2e-cases - digest: '' + digest: "" From 0bfa5dfbfe279c06ddb5bbf2c6029a0dccd325a5 Mon Sep 17 00:00:00 2001 From: SoonIter Date: Fri, 8 May 2026 18:04:58 +0800 Subject: [PATCH 09/10] chore: remove script --- package.json | 2 +- scripts/install-skills.mjs | 36 ------------------------------------ 2 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 scripts/install-skills.mjs diff --git a/package.json b/package.json index 4aaf08738e..3adc74f475 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "format": "prettier --experimental-cli --write . && heading-case --write", "lint": "rslint --type-check", "prebundle": "pnpm --parallel --filter \"./packages/*\" run prebundle", - "prepare": "node scripts/install-skills.mjs && simple-git-hooks && node --run prebundle && node --run build", + "prepare": "skills-package-manager install && simple-git-hooks && node --run prebundle && node --run build", "sort-package-json": "pnpx sort-package-json \"./package.json\" \"packages/*/package.json\"", "test": "rstest", "test:watch": "rstest watch" diff --git a/scripts/install-skills.mjs b/scripts/install-skills.mjs deleted file mode 100644 index 523ba476d8..0000000000 --- a/scripts/install-skills.mjs +++ /dev/null @@ -1,36 +0,0 @@ -import { spawnSync } from 'node:child_process'; - -const isProductionInstall = - process.env.NODE_ENV === 'production' || - process.env.npm_config_production === 'true' || - process.env.pnpm_config_production === 'true'; - -if (isProductionInstall) { - console.log('[skills-package-manager] skipped in production install.'); - process.exit(0); -} - -const hasSkillsPackageManager = spawnSync( - 'pnpm', - ['exec', 'skills-package-manager', '--version'], - { stdio: 'ignore' }, -); - -if (hasSkillsPackageManager.status !== 0) { - console.warn( - '[skills-package-manager] skipped because the binary is unavailable.', - ); - process.exit(0); -} - -const install = spawnSync( - 'pnpm', - ['exec', 'skills-package-manager', 'install'], - { - stdio: 'inherit', - }, -); - -if (install.status !== 0) { - console.warn('[skills-package-manager] install failed; continuing prepare.'); -} From 91628ea15f66cf78c65ae2f7684d93da5b42289a Mon Sep 17 00:00:00 2001 From: SoonIter Date: Fri, 15 May 2026 18:52:09 +0800 Subject: [PATCH 10/10] chore: use local protocol for repo skills --- .../skills}/docs-en-improvement/SKILL.md | 0 .../skills}/release-core/SKILL.md | 0 .../skills}/sync-zh-en-docs/SKILL.md | 0 .../skills}/upgrade-rspack/SKILL.md | 0 .../skills}/write-e2e-cases/SKILL.md | 0 .gitignore | 17 ++++++++- .prettierignore | 3 +- cspell.config.js | 3 +- skills-lock.yaml | 36 +++++++++++-------- skills.json | 11 +++--- 10 files changed, 47 insertions(+), 23 deletions(-) rename {dev-skills => .agents/skills}/docs-en-improvement/SKILL.md (100%) rename {dev-skills => .agents/skills}/release-core/SKILL.md (100%) rename {dev-skills => .agents/skills}/sync-zh-en-docs/SKILL.md (100%) rename {dev-skills => .agents/skills}/upgrade-rspack/SKILL.md (100%) rename {dev-skills => .agents/skills}/write-e2e-cases/SKILL.md (100%) diff --git a/dev-skills/docs-en-improvement/SKILL.md b/.agents/skills/docs-en-improvement/SKILL.md similarity index 100% rename from dev-skills/docs-en-improvement/SKILL.md rename to .agents/skills/docs-en-improvement/SKILL.md diff --git a/dev-skills/release-core/SKILL.md b/.agents/skills/release-core/SKILL.md similarity index 100% rename from dev-skills/release-core/SKILL.md rename to .agents/skills/release-core/SKILL.md diff --git a/dev-skills/sync-zh-en-docs/SKILL.md b/.agents/skills/sync-zh-en-docs/SKILL.md similarity index 100% rename from dev-skills/sync-zh-en-docs/SKILL.md rename to .agents/skills/sync-zh-en-docs/SKILL.md diff --git a/dev-skills/upgrade-rspack/SKILL.md b/.agents/skills/upgrade-rspack/SKILL.md similarity index 100% rename from dev-skills/upgrade-rspack/SKILL.md rename to .agents/skills/upgrade-rspack/SKILL.md diff --git a/dev-skills/write-e2e-cases/SKILL.md b/.agents/skills/write-e2e-cases/SKILL.md similarity index 100% rename from dev-skills/write-e2e-cases/SKILL.md rename to .agents/skills/write-e2e-cases/SKILL.md diff --git a/.gitignore b/.gitignore index 54c3ba07b1..09a599c592 100644 --- a/.gitignore +++ b/.gitignore @@ -35,5 +35,20 @@ test-temp-* test-results/ # skills-package-manager -.agents/skills/ +.agents/skills/* +# Keep local skills tracked +!.agents/ +!.agents/skills/ +!.agents/skills/create-draft-release-notes/ +!.agents/skills/create-draft-release-notes/** +!.agents/skills/docs-en-improvement/ +!.agents/skills/docs-en-improvement/** +!.agents/skills/release-core/ +!.agents/skills/release-core/** +!.agents/skills/sync-zh-en-docs/ +!.agents/skills/sync-zh-en-docs/** +!.agents/skills/upgrade-rspack/ +!.agents/skills/upgrade-rspack/** +!.agents/skills/write-e2e-cases/ +!.agents/skills/write-e2e-cases/** diff --git a/.prettierignore b/.prettierignore index 099d6bddd7..64c3fc272e 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,7 +2,8 @@ dist compiled doc_build -.agents +.agents/skills/pr-creator +.agents/skills/rspress-description-generator pnpm-lock.yaml skills-lock.yaml diff --git a/cspell.config.js b/cspell.config.js index fe38a5caac..c5386a5224 100644 --- a/cspell.config.js +++ b/cspell.config.js @@ -15,7 +15,8 @@ export default { 'compiled', 'coverage', 'doc_build', - '.agents', + '.agents/skills/pr-creator', + '.agents/skills/rspress-description-generator', 'node_modules', 'pnpm-lock.yaml', 'README.pt-BR.md', diff --git a/skills-lock.yaml b/skills-lock.yaml index 8e95f2ab5e..c87bb2be1e 100644 --- a/skills-lock.yaml +++ b/skills-lock.yaml @@ -18,33 +18,39 @@ skills: commit: 820107031c56beff4187e083aea167f97483291c path: /skills/rspress-description-generator digest: sha256-ecf6328cb15e217396c5d4c90f35fce01c06d29c7ed3bc1f2270f4228895f99d + create-draft-release-notes: + specifier: local:./.agents/skills/create-draft-release-notes + resolution: + type: local + path: .agents/skills/create-draft-release-notes + digest: "" docs-en-improvement: - specifier: link:./dev-skills/docs-en-improvement + specifier: local:./.agents/skills/docs-en-improvement resolution: - type: link - path: dev-skills/docs-en-improvement + type: local + path: .agents/skills/docs-en-improvement digest: "" release-core: - specifier: link:./dev-skills/release-core + specifier: local:./.agents/skills/release-core resolution: - type: link - path: dev-skills/release-core + type: local + path: .agents/skills/release-core digest: "" sync-zh-en-docs: - specifier: link:./dev-skills/sync-zh-en-docs + specifier: local:./.agents/skills/sync-zh-en-docs resolution: - type: link - path: dev-skills/sync-zh-en-docs + type: local + path: .agents/skills/sync-zh-en-docs digest: "" upgrade-rspack: - specifier: link:./dev-skills/upgrade-rspack + specifier: local:./.agents/skills/upgrade-rspack resolution: - type: link - path: dev-skills/upgrade-rspack + type: local + path: .agents/skills/upgrade-rspack digest: "" write-e2e-cases: - specifier: link:./dev-skills/write-e2e-cases + specifier: local:./.agents/skills/write-e2e-cases resolution: - type: link - path: dev-skills/write-e2e-cases + type: local + path: .agents/skills/write-e2e-cases digest: "" diff --git a/skills.json b/skills.json index 4adfe9f893..c2bc7ca3ac 100644 --- a/skills.json +++ b/skills.json @@ -5,11 +5,12 @@ "skills": { "pr-creator": "https://github.com/rstackjs/agent-skills.git#820107031c56beff4187e083aea167f97483291c&path:/skills/pr-creator", "rspress-description-generator": "https://github.com/rstackjs/agent-skills.git#820107031c56beff4187e083aea167f97483291c&path:/skills/rspress-description-generator", - "docs-en-improvement": "link:./dev-skills/docs-en-improvement", - "release-core": "link:./dev-skills/release-core", - "sync-zh-en-docs": "link:./dev-skills/sync-zh-en-docs", - "upgrade-rspack": "link:./dev-skills/upgrade-rspack", - "write-e2e-cases": "link:./dev-skills/write-e2e-cases" + "create-draft-release-notes": "local:./.agents/skills/create-draft-release-notes", + "docs-en-improvement": "local:./.agents/skills/docs-en-improvement", + "release-core": "local:./.agents/skills/release-core", + "sync-zh-en-docs": "local:./.agents/skills/sync-zh-en-docs", + "upgrade-rspack": "local:./.agents/skills/upgrade-rspack", + "write-e2e-cases": "local:./.agents/skills/write-e2e-cases" }, "selfSkill": false }