agentleFS
DobroslavRadosavljevicDobroslavRadosavljevic/cabrakan/.agents/skills/tsdown/SKILL.md

tsdown

Skill1 starsChanged 3 months agoMITView on GitHub

Build, review, debug, configure, migrate, teach, or plan tsdown library bundling with current docs and a full usage guide. Use for tsdown, tsdown.config, defineConfig, entry, format esm/cjs, dts, deps.neverBundle/alwaysBundle, exports, unbundle, watch, minify, target, platform, copy, CSS (@tsdown/css), plugins, workspace, programmatic build(), and tsup to tsdown migration.

18 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 1 is distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 1

    Distinctive

    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
  1. Very specific:

    Use this skill when work touches tsdown: library builds, tsdown.config, dts/exports, dependency externalization, watch/unbundle, …

    line 8
  2. Very specific:

    Prefer current APIs: entry, deps.neverBundle / alwaysBundle, unbundle, copy, cjsDefault.

    line 24
  3. Very specific:

    Verify with bunx tsdown (or project build), check dist + exports/types, then consume the package from a smoke import.

    line 25
  4. Very specific:

    Prefer deps.neverBundle / alwaysBundle over deprecated external / noExternal.

    line 31
  5. Very specific:

    Default dep policy: package dependencies/peers are externalized.

    line 32
  6. Very specific:

    No stub mode — use --watch and/or exports.devExports.

    line 35
  7. Very specific:

    Prefer bun / bunx in command examples.

    line 38
  8. Distinctive:

    Prefer repository-owned commands.

    line 42
  9. Very specific:

    After exports: true: validate package.json with publint/attw if enabled.

    line 48

“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

tsdown

Use this skill when work touches tsdown: library builds, tsdown.config, dts/exports, dependency externalization, watch/unbundle, CSS/plugins/workspace, or migrating from tsup.

Workflow

  1. Inspect the local tsdown surface:
    • Package version (tsdown@0.22.x preferred; snapshot 0.22.14). Node to run the tool: ^22.18.0 || >=24.11.0.
    • Config: tsdown.config.ts / package.json#tsdown; peers (typescript, @tsdown/css, publint, …).
    • package.json type, exports, types, engines.node (feeds target/dts auto-detect).
    • Whether migrating from tsup (external, entryPoints, bundle: false, …).
  2. For day-to-day how-to, follow usage-guide.md first.
  3. Refresh docs when versions drift (especially 0.23 beta). Start from source-map.md.
  4. Route deeper detail:
    • Config/CLI/defaults: config-cli.md.
    • dts, package exports, deps: dts-exports-deps.md.
    • Plugins, CSS, copy, workspace, programmatic: plugins-css-workspace.md.
    • tsup migration: migrate-from-tsup.md.
  5. Prefer current APIs: entry, deps.neverBundle / alwaysBundle, unbundle, copy, cjsDefault. Treat CJS as maintenance; prefer ESM-only for new libraries.
  6. Verify with bunx tsdown (or project build), check dist + exports/types, then consume the package from a smoke import.

Core Judgment

  • tsdown = library bundler on Rolldown + Oxc — spiritual successor to tsup, not an app bundler.
  • Defaults differ from tsup: format: 'esm', clean: true, dts often auto from package.json types/exports, target from engines.node.
  • Prefer deps.neverBundle / alwaysBundle over deprecated external / noExternal.
  • Default dep policy: package dependencies/peers are externalized; used devDependencies may be bundled — override with deps when wrong.
  • Install typescript for dts (unless oxc fast path via isolatedDeclarations).
  • @tsdown/css / @tsdown/exe must match the tsdown version when used.
  • No stub mode — use --watch and/or exports.devExports.
  • Code splitting is always on — no splitting: false.
  • Pin skill guidance to 0.22.14 unless the project is on 0.23 beta; clear deprecations on 0.22 before jumping to 0.23.
  • Prefer bun / bunx in command examples.

Verification

Prefer repository-owned commands. For meaningful tsdown work, cover the relevant subset:

  • bunx tsdown --version and confirm Node engine for the CLI.
  • Clean build: bunx tsdown / bun run build; inspect dist formats and extensions (.mjs/.cjs/.js).
  • Types: consume .d.ts / exports.types from a dependent package or tsc.
  • Dual-format: require + import smoke when format includes both.
  • After exports: true: validate package.json with publint/attw if enabled.
  • Migration: zero deprecation warnings on 0.22 before upgrading to 0.23+.

Report which checks ran, which did not, and any version assumptions that remain.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.