원클릭으로
add-doc-anchor-ids
// Align Rspress heading anchor IDs between English and Chinese docs. Use for MDX `\{#...}` anchors, shortened hashes, redundant anchors, or dead links.
// Align Rspress heading anchor IDs between English and Chinese docs. Use for MDX `\{#...}` anchors, shortened hashes, redundant anchors, or dead links.
Use when adding or updating Rsbuild end-to-end tests in `e2e/cases`, including new feature coverage, bug reproduction, and regression prevention.
Create or update draft GitHub releases for the current project's main GitHub repository, then organize GitHub-generated release notes into user-friendly sections without rewriting release note items. Use for preparing, formatting, categorizing, creating, or updating GitHub release notes or draft releases, including optional highlights when the user asks for them.
Use when asked to upgrade `@rspack/core` in this repository to a specific version, run dependency installation and validation, then commit and create a pull request.
Use when asked to release `@rsbuild/core` for a specific version.
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.
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.
| name | add-doc-anchor-ids |
| description | Align Rspress heading anchor IDs between English and Chinese docs. Use for MDX `\{#...}` anchors, shortened hashes, redundant anchors, or dead links. |
Use this skill for Rspress docs mirrored under website/docs/en and website/docs/zh.
### parallel, not ### parallel \{#parallel}.\{#anchor-id}..md/.mdx documentation files unless the user explicitly asks otherwise.Inspect the current branch and work tree before editing:
git branch --show-current
git status --short
Find relevant custom anchors and hash links:
rg -n -F '\{#' website/docs/en website/docs/zh --glob '*.mdx'
rg -n "\]\([^)]*#[A-Za-z0-9_-]+[^)]*\)" website/docs/en website/docs/zh --glob '*.mdx'
rg -n "href=['\"][^'\"]*#[A-Za-z0-9_-]+" website/docs/en website/docs/zh --glob '*.mdx'
For each edited or referenced document pair, compare the English file with its Chinese counterpart at the same locale-relative path:
website/docs/en/guide/configuration/rsbuild.mdx
website/docs/zh/guide/configuration/rsbuild.mdx
For each heading pair, decide the desired anchor:
Apply edits directly in the affected .md/.mdx files. Examples:
## 指定配置文件 \{#specify-config-file}
## Dev server and client communication \{#dev-server-client-communication}
## 开发服务器与客户端通信 \{#dev-server-client-communication}
Update all links that point to an old hash:
[指定配置文件](/guide/configuration/rsbuild#specify-config-file)
Validate the result:
git diff --check
changed_docs=$(git diff --name-only -- '*.md' '*.mdx')
if [ -n "$changed_docs" ]; then
printf '%s\n' "$changed_docs" | xargs pnpm dlx cspell --no-progress
printf '%s\n' "$changed_docs" | xargs pnpm exec prettier --write
fi
If there is an existing repository command for docs link checking or docs build, run it. Otherwise, inspect changed hashes with rg and verify each target heading exists in the target file.
. from API names; verify these IDs instead of guessing.BASE_URL; avoid guessing when a link already works.#environment-api-1. Preserve those suffixes when the English page relies on them.