Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add rstackjs/agent-skills --skill migrate-to-rslib -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/migrate-to-rslib/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/migrate-to-rslib/

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

Similar skills

All skills for Frontend and UI →

From the same set21

The whole set →
migrate-to-rsbuild migrate-to-rsbuild — a skill that migrates webpack, Vite, Create React App, and Vue CLI projects to Rsbuild. It rewrites build configs and validates dev servers before cleaning up old packages. CX Codex +1 342installs rspack-tracing rspack-tracing — a skill for Claude Code and other IDEs that captures and analyzes Rspack build traces to pinpoint slow compiler phases, plugins, and loaders. Diagnose performance bottlenecks and crashes during development. CX Codex +1 291installs rspack-debugging rspack-debugging captures the crash state of native Rspack with LLDB: backtraces for segfaults, deadlocks and builds that hang. Useful when the failure sits inside Rust. CX Codex +1 282installs storybook-rsbuild The storybook-rsbuild skill sets up Storybook with Rsbuild or migrates an existing project from webpack or Vite. It also handles integrations with Rslib, Modern.js, and Rspack. CX Codex +1 212installs rspack-split-chunks rspack-split-chunks teaches the agent to diagnose and tune optimization.splitChunks in Rspack: find duplicate modules, over-fetching, cache group issues, and oversized chunks. CX Codex +1 187installs rspress-v2-upgrade The rspress-v2-upgrade skill automates upgrading an Rspress project from v1 to v2. It reads the config, updates dependencies, rewrites import paths, and validates the build against the official migration guide. CX Codex +1 150installs rstest-debugging rstest-debugging diagnoses Rstest startup, build, runtime, logging, memory, and performance issues with traces and comparable measurements. CX Codex +1 133installs rslib-modern-package The rslib-modern-package skill guides agents through building or reviewing JS/TS libraries with Rslib, from package exports to release readiness. Use it for a new library or a package refresh. CX Codex +1 125installs

Project sponsors

Companies that keep this analytics open