tsdown skill
Two skills for the tsdown bundler: setting up TypeScript library builds and migrating a project from tsup
- 4,334 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The agent installs npm packages and edits the build config
- The `npx tsdown-migrate` migration command rewrites project files
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/tsdownDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The agent installs npm packages and edits the build config
- The `npx tsdown-migrate` migration command rewrites project files
This is third-party code. Review the repository files before installing.
What it does
tsdown is a library bundler built on Rolldown and Oxc, and its repository holds two skills for agents. The `tsdown` skill explains how to build npm packages: several output formats (ESM, CJS, IIFE, UMD), `.d.ts` declaration files, minification, external and inlined dependencies, the config file and watch mode. Separate reference pages cover plugins, hooks, the programmatic API and Rolldown options, plus building component libraries for React, Vue, Solid and Svelte. The `tsdown-migrate` skill helps move from tsup: it has option mapping tables and a breakdown of differences, and the `npx tsdown-migrate` command rewrites the config. A request like "set up tsdown for my library" or "migrate the build from tsup" is enough for the agent.
Who it is for. TypeScript library authors who build npm packages or move off tsup and work in Claude Code, Cursor or Codex.
Good fit when
- A library has to ship in both ESM and CJS with declaration files
- A tsup project is moved to tsdown with minimal config changes
- A monorepo builds several packages through tsdown workspaces
- A React or Vue component library needs its own build setup
- The build has to support Node.js 18 and 20 although tsdown itself runs on a newer version
Not a fit when
- A web app has to be built rather than a library: an app bundler such as Vite fits better
- The project is not TypeScript or JavaScript: the bundler targets those languages
- You are working on the tsdown repository itself: the skills describe using the bundler, not developing it
Example request
Set up tsdown for my library: ESM and CJS formats, declaration files and cleaning the dist folder before the buildLimitations
tsdown itself runs on Node.js 22.18.0 or newer, although the built output can target Node.js 18 and 20 through the `target` option. Compatibility with tsup is claimed for the main options, and the rest must be matched by hand against the migration skill's tables. `npx skills add rolldown/tsdown` installs both skills at once, and the `--skill tsdown` flag picks only the main one. The skill relies on the tsdown.dev docs and the reference inside the repository, so update it together with the bundler version for newer options.
How to disable. Delete the `tsdown` and `tsdown-migrate` folders from the project's skills directory. The `tsdown` package in `devDependencies` is removed with your package manager.
FAQ
How do I install the tsdown skills?
Run `npx skills add rolldown/tsdown`: the command installs both skills, including the migration one. To take only the main one, add `--skill tsdown`.
How do I move from tsup to tsdown?
Run `npx tsdown-migrate`, then compare the options against the mapping tables from the `tsdown-migrate` skill. tsdown is compatible with tsup's main options, so config changes are usually few.
Which Node.js version does tsdown need?
Node.js 22.18.0 or newer runs the build. The shipped package can target lower with the `target` option, for example `node18` or `node20`, and be tested on those versions in CI.
Which output formats does tsdown support?
ESM, CJS, IIFE and UMD, plus `.d.ts` declaration files. The format is set in `format` of `tsdown.config.ts` and the `dts: true` option turns declarations on.
Is tsdown suitable for component libraries?
Yes, the skill has separate reference pages for React, Vue, Solid and Svelte. They describe framework support, including Fast Refresh for React.
Discussion
No questions or reviews yet.
Related
SkillsAn agent skill with TypeScript conventions: types, discriminated unions, functions, naming, source layout, React and tests, loaded per topic
The CLI runs TypeScript files in Node.js without a separate build step for agent-prepared scripts and local utilities.
dotnet-skills: a skill installer for .NET
dotnet-skills
An installer for a .NET skill catalog that picks skills from project files for Claude Code, Codex, Copilot and Gemini CLI
es-toolkit for agents: setup and import help, lodash code migration and a choice between the strict and compat APIs
Oxc migration skills for Oxlint and Oxfmt
Oxc migration skills
Two official Oxc skills: the agent moves a project from ESLint to the Oxlint linter and from Prettier or Biome to the Oxfmt formatter
skills-npm links agent skills shipped in your dependencies in node_modules and listed in the skills field of package.json
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Repository stars | Main difference |
|---|---|---|---|
| tsdown (this card) | yes | 4,334 | |
| Webpack Bundle Analyzer CLI | no | 12,654 | analyzes the size of finished bundles and does not set up the build |
| Nx CLI | no | 29,450 | manages a whole monorepo and not the build of a single library |
README in short
The bundler's own README is short: a list of advantages, a documentation link, installation with `npm i -D tsdown` and running through `npx tsdown`. The skills are covered by `skills/tsdown/README.md`: installation, contents, usage scenarios and example requests.
README badge
Original SKILL.md
--- name: tsdown description: Bundle TypeScript and JavaScript libraries with blazing-fast speed powered by Rolldown. Use when building libraries, generating type declarations, bundling for multiple formats, or migrating from tsup. --- # tsdown - The Elegant Library Bundler Blazing-fast bundler for TypeScript/JavaScript libraries powered by Rolldown and Oxc. ## Runtime Requirement `tsdown` requires **Node.js 22.18.0 or higher to run** (build-time only). However, the bundled output can target much lower Node.js versions via the [`target`](references/option-target.md) option, so libraries built with tsdown are **not locked to Node.js 22+ at runtime**. If your package needs to support Node.js 18 / 20: - **Build with Node.js 22+ in CI** (e.g. set `target: 'node18'` or `target: 'node20'`). - **Test the built output (or the packed tarball) on the lower Node.js versions** you intend to support — e.g. using a matrix job that runs the published package's tests on Node.js 18 / 20 / 22. ## When to Use - Building TypeScript/JavaScript libraries for npm - Generating TypeScript declaration files (.d.ts) - Bundling for multiple formats (ESM, CJS, IIFE, UMD) - Optimizing bundles with tree shaking and minification - Migrating from tsup with minimal changes - Building React, Vue, Solid, or Svelte component libraries ## Quick Start ```bash # Install pnpm add -D tsdown # Basic usage npx tsdown # With config file npx tsdown --config tsdown.config.ts # Watch mode npx tsdown --watch # Migrate from tsup npx tsdown-migrate ```