rstack-repo-maintain
Skill95 starsChanged 4 months agoMITView on GitHub
Audit or modernize Rstack repository infrastructure, package manifests, build/test tooling, CI, and release configuration against maintained baselines.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- create-draft-release-notesSkill
- mdx-to-markdownSkill
- pr-creatorSkill
- release-blog-writerSkill
- rstack-docs-writerSkill
- rstack-eco-ci-debugSkill
- rstack-skill-evaluatorSkill
- migrate-to-rsbuildSkill
- migrate-to-rslibSkill
- migrate-to-rslintSkill
- migrate-to-rstestSkill
- rsbuild-best-practicesSkill
- rsbuild-v2-upgradeSkill
- rsdoctor-analysisSkill
- rslib-best-practicesSkill
- rslib-modern-packageSkill
- rspack-best-practicesSkill
- rspack-debuggingSkill
- rspack-split-chunksSkill
- rspack-tracingSkill
- rspack-v2-upgradeSkill
- rspress-best-practicesSkill
- rspress-custom-themeSkill
- rspress-description-generatorSkill
- rspress-docs-generatorSkill
- rspress-v2-upgradeSkill
- rstest-best-practicesSkill
- rstest-debuggingSkill
- storybook-rsbuildSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. About 0 are common, 16 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Read references/repo-baselines.md when choosing a template repo, explaining where the baseline came from, or deciding between pure ESM and …
- Very specific: line 20
Read references/package-json-baseline.md when auditing or changing package.json, checking whether dependencies are current, choosing an …
- Distinctive: line 32
Always re-check the target repo and exemplar repo before editing.
- Very specific: line 37
Read package.json, lockfile, pnpm-workspace.yaml, .node-version, .rstack/, rstack.config.*, rslib.config.*, rslint.config.*, …
- Distinctive: line 43
Use the standalone lane for focused packages that are already clear with direct Rslib, Rslint, and Rstest configs.
- Distinctive: line 44
Consider the Rstack CLI lane for multi-package repositories that benefit from shared build/test config, unified type-aware linting, …
- Distinctive: line 45
Prefer pure ESM for modern libraries and plugins when consumers can support it.
- Distinctive: line 46
Use dual package output only as a deliberate transition when existing CommonJS consumers or public exports require it.
- Distinctive: line 47
Treat runtime support, package exports, CLI bins, side effects, and documented deep imports as compatibility constraints.
- Very specific: line 55
Runtime and package manager: verify Node support from code, dependencies, package engines, .node-version, CI, and release workflows.
- Very specific: line 57
GitHub Actions: keep .github/workflows/* aligned with the chosen baseline repo.
- Distinctive: line 59
Docs: keep README.md focused on purpose, install, usage, options, supported runtimes, release/license links.
- Distinctive: line 63
Do not touch business logic unless the infra change requires it.
- Distinctive: line 64
Keep compatibility breaks explicit in commit/PR notes: ESM-only output, removed exports, changed CLI behavior, or dependency placement …
- Distinctive: line 65
If a repo needs multiple risky changes, split them into reviewable PR-sized batches.
- Very specific: line 68
Create the infrastructure update branch from the latest origin/main unless the user asks for a different base.
- Very specific: line 69
Use a specific PR title starting with chore(infra):, for example chore(infra): adopt Rstack CLI and package validation or chore(infra): …
- Very specific: line 70
Keep each tool update or tool configuration as its own commit unit.
- Distinctive: line 71
Do not mix unrelated tool changes, generated lockfile updates, and source fixes in a single commit unless the tool update requires them to …
- Distinctive: line 74
Run install with the repo package manager.
- Distinctive: line 75
Run lint, format check, typecheck if present, build, and tests.
- Distinctive: line 78
When migrating to Rstack CLI, compare generated package artifacts and test discovery with the pre-migration commands.
- Distinctive: line 79
Remove obsolete configs and dependencies only after the new path is green.
- Distinctive: line 83
When reporting back, include:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- cspell:words oxfmt -->Rstack repo maintain
Overview
Modernize RstackJS repositories without blindly copying config. Use the target's compatibility surface plus current exemplar repositories to make small, verifiable infrastructure upgrades.
Baseline evidence
Read references/repo-baselines.md when choosing a template repo, explaining where the baseline came from, or deciding between pure ESM and dual output, standalone tools and Rstack CLI, runtime floors, TypeScript majors, formatters, package validation, or CI patterns.
Read references/package-json-baseline.md when auditing or changing package.json, checking whether dependencies are current, choosing an @rsbuild/core peer range, or validating published package contents.
Default starting points:
- Large monorepo and integrated-tooling baseline:
web-infra-dev/rsbuild. Use its Rstack CLI, pnpm catalog, supply-chain,oxfmt, and CI patterns selectively; do not treat it as a drop-in small-package template. - Primary standalone small-package baseline:
rstackjs/rslog. - Pure ESM and Node 20 plugin package baseline:
rstackjs/rsbuild-plugin-publint. - Concise AGENTS.md and publint reference:
rstackjs/rslog, after checking that its prose still matches its configs. - Additional package validation reference:
rstackjs/rsbuild-plugin-arethetypeswrong. - Generated-artifact CLI reference:
rstackjs/prebundle. - Dual-package compatibility reference:
rstackjs/rsbuild-plugin-virtual-module.
Always re-check the target repo and exemplar repo before editing. The reference file is a dated snapshot, not a permanent source of truth.
Workflow
- Inventory the target repo
- Read
package.json, lockfile,pnpm-workspace.yaml,.node-version,.rstack/**,rstack.config.*,rslib.config.*,rslint.config.*,rstest.config.*,vitest.config.*,jest.config.*,playwright.config.*,tsconfig*.json,.github/workflows/*,README.md,AGENTS.md, release config, and source entry points. - Identify package kind: library, Rsbuild/Rspack plugin, CLI, app template, test fixture, or docs package.
- List current build, lint, typecheck, test, release, and package manager commands before changing them.
- For published packages, map
files,bin,types, and everyexportstarget to the source or generated artifact that provides it.
- Read
- Choose the migration target
- Use the standalone lane for focused packages that are already clear with direct Rslib, Rslint, and Rstest configs.
- Consider the Rstack CLI lane for multi-package repositories that benefit from shared build/test config, unified type-aware linting, staged-file handling, and hook setup. Require each migrated command to have an equivalent Rstack CLI path; do not add the CLI merely to match Rsbuild.
- Prefer pure ESM for modern libraries and plugins when consumers can support it.
- Use dual package output only as a deliberate transition when existing CommonJS consumers or public exports require it.
- Treat runtime support, package exports, CLI bins, side effects, and documented deep imports as compatibility constraints.
- Update the infrastructure in small layers
- Package manifest: follow
references/package-json-baseline.md. Select the matching core/CLI, plugin, or library profile; check metadata and published entry points; separate npm release freshness from compatibility ranges; and update the manifest and lockfile together. Use@rsbuild/coreas live evidence, not as a field-for-field template for every package. - Build tooling: in the standalone lane, use Rslib, keep config minimal, set appropriate
lib.syntax, emit declarations, and alignpackage.json#exportswith real output. In the integrated lane, userstack.config.ts,define.lib, and sharedrstack/libconfig only when that reduces duplicated configuration. Addrsbuild-plugin-publintwhen the package should validate publish metadata during build. When upgrading@rslib/corefrom 0.x to1.0.0-betaor another v1 prerelease, follow the official Rslib v0-to-v1 upgrade guide and audit every listed breaking default instead of treating it as a routine dependency bump. - Linting: in the standalone lane, use
@rslint/coreandts.configs.recommended; addjs.configs.recommendedonly when JavaScript source or config files are intentionally linted. In the integrated lane, use the repository's supportedrs lintcommand and preserve type-check coverage. - Formatting: preserve the repository's formatter unless the migration explicitly includes formatter replacement. Current Rsbuild uses
oxfmt, while maintained standalone packages may use Prettier or dprint. Keep generated artifacts and lock files ignored where appropriate. - Test tooling: prefer Rstest for JavaScript/TypeScript unit tests in Rstack repositories. When a repo still uses Vitest or Jest, use the
migrate-to-rstestskill, map scripts and configs to@rstest/core, keep Playwright or other browser E2E tooling separate, and remove legacy runner deps/configs only after the migrated scope is green. - Runtime and package manager: verify Node support from code, dependencies, package
engines,.node-version, CI, and release workflows. UpdatepackageManager, pnpm engine constraints, lockfile, and CI together. Do not copy Rsbuild's Node 22 minimum into a Node 20-compatible package without a concrete runtime reason. - pnpm policy: for monorepos, consider catalogs,
catalogMode, unused-catalog cleanup, peer-install policy, build-script allowlists,minimumReleaseAge, and strict dependency-build settings. Adopt each option only after checking install behavior, native dependencies, trusted release exceptions, and the repository's pnpm version. - GitHub Actions: keep
.github/workflows/*aligned with the chosen baseline repo. Pin third-party actions to commit hashes, not floating tags, and update action pins by copying or refreshing the baseline pattern instead of inventing new pins. - TypeScript: choose the major supported by the target toolchain instead of applying one global version. Remove stale compiler options, prefer
target: "ES2023"for compatible Node packages, and keep module resolution consistent with runtime output. For TypeScript 7 packages, remove the old direct@typescript/native-previewdependency and manual tsgo selection from Rslib config. Current Rslib automatically uses tsgo when the installed TypeScript version is 7 or later, so keep declaration generation enabled and validate emitted declarations without adding preview-specific wiring. - Docs: keep
README.mdfocused on purpose, install, usage, options, supported runtimes, release/license links. Add a conciseAGENTS.mdin the rsbuild-style shape: Stack, Commands, Project structure, and Code style. - Dependency cleanup: run a repo-appropriate unused dependency check such as Knip when feasible, then remove only dependencies proven unused or misplaced. Do not add Knip as a dependency unless the repo starts using it in scripts; treat
pnpm stageand intentional legacy tsgo tool dependencies as known false positives when applicable.
- Package manifest: follow
- Preserve behavior while modernizing
- Do not touch business logic unless the infra change requires it.
- Keep compatibility breaks explicit in commit/PR notes: ESM-only output, removed exports, changed CLI behavior, or dependency placement changes.
- If a repo needs multiple risky changes, split them into reviewable PR-sized batches.
- Prepare the infra PR
- Create the infrastructure update branch from the latest
origin/mainunless the user asks for a different base. - Use a specific PR title starting with
chore(infra):, for examplechore(infra): adopt Rstack CLI and package validationorchore(infra): align build and lint tooling. - Keep each tool update or tool configuration as its own commit unit. Use commit titles such as
chore(deps): update rslint,chore(infra/build): align declaration output, orchore(infra/ci): pin workflow actions. - Do not mix unrelated tool changes, generated lockfile updates, and source fixes in a single commit unless the tool update requires them to stay atomic.
- Create the infrastructure update branch from the latest
- Validate before cleanup
- Run install with the repo package manager.
- Run lint, format check, typecheck if present, build, and tests.
- For pnpm packages, prefer
pnpm pack --dry-runwhen the repository's pnpm version supports it. Otherwise, usepnpm pack --pack-destination <temporary-directory>and remove the temporary archive after inspection; usenpm packonly when npm is the target repository's package manager. Skip the separate pack command only when package inclusion rules have been inspected, every published entry is provably included, and an enforcingpluginPublintinrslib.config.tshas completed in a successful non-watch build. Do not take this shortcut when inclusion is uncertain, the plugin is disabled, conditional activation was not satisfied,throwOn: 'never'is set, only a watch build ran, or the task explicitly requires tarball inspection. Never runpnpm packwithout--dry-run,--pack-destination, or another explicit output path in the target working tree because it writes a.tgzthere. - Smoke test import/CLI paths that changed.
- When migrating to Rstack CLI, compare generated package artifacts and test discovery with the pre-migration commands.
- Remove obsolete configs and dependencies only after the new path is green.
Output
When reporting back, include:
- Target baseline and why it was chosen.
- Files changed, grouped by build/lint/TypeScript/CI/docs/dependencies.
- Breaking changes or compatibility risks.
- Commands run and their result.
- Any deliberate deviations from the Rstack baseline.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

