About migrate-to-rslib
migrate-to-rslib is an agent skill for moving tsc or tsup projects to Rslib. It emphasizes small, behavior-preserving changes, build validation, and cleanup only after validation succeeds.
Key features
- 01Detects tsc and tsup projects
- 02Uses official migration guides
- 03Prioritizes minimal changes
- 04Validates builds before cleanup
- 05Summarizes changes and follow-ups
Use cases
- 01Migrating a tsc build to Rslib
- 02Moving a tsup project to Rslib
- 03Checking a migrated project's build
- 04Identifying remaining migration tasks
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ rstackjs/ agent-skills --skill migrate-to-rslibAfter installing, type/migrate-to-rslibin Claude Code to confirm it loaded.
Bundled filesreferences/tsc.mdreferences/tsup.md
Details
From the project READMEMigrate to Rslib
Goal
Migrate tsc and tsup projects to Rslib with minimal behavior changes and clear verification.
Supported source frameworks
- tsc
- tsup
Migration principles (must follow)
- Official guide first: treat Rslib migration docs as source of truth.
- Smallest-change-first: complete baseline migration first, then migrate advanced or custom behavior.
- Do not change business logic: avoid touching source or business logic unless user explicitly asks.
- Validate before cleanup: keep old tool dependencies/config temporarily if needed; remove only after Rslib is green.
Workflow
-
Detect source tool
tsup- Config:
tsup.config.* - Dependency:
tsup - Build script: uses
tsupto build projects
- Config:
tsc- Config:
tsconfig.jsonortsconfig.*.json - Dependency:
typescript - Build script: uses
tscto build projects. And it should be noted thattscused only for type checking (e.g.,tsc --noEmit) does not make it atscbuild project.
- Config:
-
Apply tool-specific migration deltas
- tsc:
references/tsc.md - tsup:
references/tsup.md
- tsc:
-
Validate behavior
- Run build command to verify the project builds successfully.
- If issues remain, compare the old project configuration with the migration guide and complete any missing mappings.
-
Cleanup and summarize
- Remove obsolete dependencies/config only after validation passes.
- Summarize changed files, mapped options, and any remaining manual follow-ups.
Comments
Markdown supported