Release Plugin Package
Developmentrelease-plugin-packageRelease Plugin Package is an Agent Skill for development published in the web-infra-dev/rsbuild repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Use when asked to create a release PR for an official Rsbuild plugin package under `packages/plugin-*`, such as `@rsbuild/plugin-react v2.1.0` or `@rsbuild/plugin-sass v2.0.0`.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/web-infra-dev/rsbuild/blob/HEAD/.agents/skills/release-plugin-package/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/release-plugin-package, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Release Plugin Package
Input
- Plugin package name or short name, for example
@rsbuild/plugin-reactorplugin-react. - Target version, for example
2.1.0.
If the package or version is missing, ask for it before making changes.
Scope
Use this skill only for official plugin packages in packages/plugin-*.
Do not use it for:
@rsbuild/coreorcreate-rsbuildreleases. Userelease-coreinstead.- Publishing npm packages directly. This skill creates the release PR only.
Changelog requirements
Every plugin release PR must update the plugin changelog:
packages/plugin-<name>/CHANGELOG.md
If CHANGELOG.md does not exist, create it with # @rsbuild/plugin-<name> as the title.
Insert the new entry immediately below the title. If an entry for the target version already exists, update that entry instead of adding a duplicate.
Use this format:
## <version> (<YYYY-MM-DD>)
### New features
- feat(plugin-<name>): change summary by @user in https://github.com/web-infra-dev/rsbuild/pull/<number>
Rules:
- Use the current date in
YYYY-MM-DDformat unless the user provides a release date. - Do not add version compare links to version headings.
- Use
-bullets. - Use sentence-case section headings.
- Use this section order when sections are present:
Breaking changes,New features,Performance,Bug fixes,Refactor,Document,Other changes. - Add a section heading only when it has at least one bullet.
- If there are no plugin-specific changes, add
- No plugin-specific changes.directly under the version heading and do not add### Other changes. - Preserve change item wording, author, and PR URL as much as possible.
- Exclude the plugin release or version-bump PR itself from changelog items.
To collect changelog items:
- Prefer related change PRs provided by the user or already listed in the release PR context.
- If related PRs are missing or incomplete, inspect commits and merged PRs since the previous package version recorded before editing
package.json. - Keep only changes that affect the released plugin, including:
- files under
packages/plugin-<name> - shared code, build config, or dependencies that directly affect the plugin
- docs or template changes that are specifically about that plugin
- files under
- Categorize items by conventional commit type:
feat->New featuresperf->Performancefix->Bug fixesrefactor->Refactordocs->Document- breaking changes marked with
!orBREAKING CHANGE->Breaking changes - everything else ->
Other changes
Workflow
-
Check the worktree:
git status --short git branch --show-currentIf there are uncommitted edits, stop and ask the user how to proceed.
-
Resolve the package directory:
@rsbuild/plugin-react->packages/plugin-reactplugin-react->packages/plugin-react
Confirm that
packages/plugin-<name>/package.jsonexists and itsnamefield matches the target package. Record the current packageversionbefore editing it; use that as the previous package version for changelog collection unless the user provides a different baseline. -
Create and switch to a dedicated branch if the current branch is the default branch. Prefer:
release/plugin-<name>-v<version> -
Update only the plugin package version first:
packages/plugin-<name>/package.json -
Update
packages/plugin-<name>/CHANGELOG.mdfor the target version using the changelog requirements above. -
Sync
create-rsbuildtemplate dependency versions only when that plugin appears in templatepackage.jsonfiles:rg -n '@rsbuild/plugin-<name>' packages/create-rsbuild --glob 'package.json'Update matching template dependency ranges to
^<version>. Do not changeworkspace:*dev dependencies inpackages/create-rsbuild/package.json. -
Review the diff and confirm it is limited to:
- the released plugin package version
- the released plugin changelog
- matching
packages/create-rsbuild/template-*/package.jsondependency ranges, if any
If other files changed, stop and explain the unexpected diff.
-
Validate JSON and run focused checks:
node -e "for (const f of process.argv.slice(1)) JSON.parse(require('fs').readFileSync(f, 'utf8'))" <edited-package-json-files> node --run check-spell pnpm --filter @rsbuild/plugin-<name> run buildIf
create-rsbuildtemplates changed, also runpnpm buildonce and then the focused create-rsbuild e2e case when practical:pnpm build pnpm e2e create-rsbuildReport any skipped validation in the final response.
-
Commit with this exact title:
release: @rsbuild/plugin-<name> v<version> -
Push the branch after re-checking it is not the default branch.
-
If running in Codex, create the PR with the GitHub connector/plugin. Otherwise, use the GitHub workflow available in the current environment.
PR Body
Use the repository PR template. Keep the body concise.
For Summary, use:
Release `@rsbuild/plugin-<name>` v<version>.
If related change PRs were provided or can be confidently identified, add a Changes section:
## Changes
- https://github.com/web-infra-dev/rsbuild/pull/<number>
- https://github.com/web-infra-dev/rsbuild/pull/<number>
Use the same related change PRs that were added to the changelog. Do not invent change links.
If no related links are known, omit Changes instead of adding an empty section.