migrate-to-rslib — Claude Code skill: what it does, how to install
migrate-to-rslib converts TypeScript library builds from tsc or tsup to Rslib with validation before cleanup.
MIT 201 installs ★ 100 updated 2026-10-22
npx skills add rstackjs/agent-skills --skill migrate-to-rslib -a claude-codeWhat migrate-to-rslib does
The skill detects whether the library relies on tsup or tsc by inspecting files like tsup.config.*, tsconfig.json, and package scripts. Scripts running tsc --noEmit are treated strictly as type checks, preventing accidental build rewrites.
Migration follows a minimal-change principle: the agent ports configs according to Rslib reference guides without altering application logic. Legacy build dependencies stay in place until the new build succeeds, after which the assistant removes obsolete packages and summarizes mapped settings.
What it helps with
- migrate a library project from tsup to Rslib
- switch from tsc compilation to Rslib builds
- map legacy bundler settings without modifying business logic
- clean up obsolete build dependencies after green verification
Example prompts for the agent
- Migrate this library from tsup to Rslib
- Help me switch our build setup from tsc to Rslib
- Convert the tsup configuration to Rslib and verify the build
How to install migrate-to-rslib
1Skills CLI (Vercel)
npx skills add rstackjs/agent-skills --skill migrate-to-rslib -a claude-code2Manually: put the files in place
~/.claude/skills/migrate-to-rslib/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/migrate-to-rslib/
1Skills CLI (Vercel)
npx skills add rstackjs/agent-skills --skill migrate-to-rslib -a codex2Manually: put the files in place
.agents/skills/migrate-to-rslib/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add rstackjs/agent-skills --skill migrate-to-rslib -a cursor2Manually: put the files in place
.cursor/skills/migrate-to-rslib/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install rstackjs/agent-skills skills/migrate-to-rslib2Manually: put the files in place
.github/skills/migrate-to-rslib/SKILL.md1Skills CLI (Vercel)
npx skills add rstackjs/agent-skills --skill migrate-to-rslib -a gemini-cli2Platform CLI
gemini skills install https://github.com/rstackjs/agent-skills --path skills/migrate-to-rslibManually: put the files in place
.devin/skills/migrate-to-rslib/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add rstackjs/agent-skills --skill migrate-to-rslib -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about migrate-to-rslib
How to install migrate-to-rslib in Claude Code?
Run npx skills add rstackjs/agent-skills --skill migrate-to-rslib -a claude-code. The skill file will be placed in ~/.claude/skills/migrate-to-rslib/SKILL.md.
What does migrate-to-rslib do?
It guides coding assistants through porting tsc and tsup libraries to Rslib, validating the output before removing old build configs.
Does the skill modify application source files?
By default it avoids touching source code, focusing strictly on build configuration and tooling dependencies.
Source text
SKILL.md · MIT
---
name: migrate-to-rslib
description: Migrate tsc or tsup library projects to Rslib.
---
# Migrate 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)
1. **Official guide first**: treat Rslib migration docs as source of truth.
2. **Smallest-change-first**: complete baseline migration first, then migrate advanced or custom behavior.
3. **Do not change business logic**: avoid touching source or business logic unless user explicitly asks.
4. **Validate before cleanup**: keep old tool dependencies/config temporarily if needed; remove only after Rslib is green.
## Workflow
1. **Detect source tool**
- `tsup`
- Config: `tsup.config.*`
- Dependency: `tsup`
- Build script: uses `tsup` to build projects
- `tsc`
- Config: `tsconfig.json` or `tsconfig.*.json`
- Dependency: `typescript`
- Build script: uses `tsc` to build projects. And it should be noted that `tsc` used only for type checking (e.g., `tsc --noEmit`) does not make it a `tsc` build project.
2. **Apply tool-specific migration deltas**
- tsc: `references/tsc.md`
- tsup: `references/tsup.md`
3. **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.
4. **Cleanup and summarize**
- Remove obsolete dependencies/config only after validation passes.
- Summarize changed files, mapped options, and any remaining manual follow-ups.
© rstackjs · MIT · rstackjs/agent-skills