skills/robuild/SKILL.md
Zero-config ESM/TS package builder powered by Rolldown and Oxc. Use when building TypeScript libraries, generating type declarations, bundling for multiple formats, or migrating from tsup/unbuild.
npx skillsauth add sunny-117/robuild robuildInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Blazing-fast bundler for TypeScript/JavaScript libraries powered by Rolldown and Oxc.
# Install
pnpm add -D robuild
# Basic usage (auto-detects src/index.ts)
npx robuild
# With specific entry
npx robuild ./src/index.ts
# Multiple formats
npx robuild ./src/index.ts --format esm,cjs
# Watch mode
npx robuild --watch
# With DTS generation
npx robuild --dts
// build.config.ts
import { defineConfig } from 'robuild'
export default defineConfig({
entries: [
{
type: 'bundle',
input: './src/index.ts',
format: ['esm', 'cjs'],
dts: true,
},
],
})
// build.config.ts
import { defineConfig } from 'robuild'
export default defineConfig({
entry: ['./src/index.ts'],
format: ['esm', 'cjs'],
dts: true,
clean: true,
})
| Topic | Description | Reference | |-------|-------------|-----------| | Getting Started | Installation, first bundle, CLI basics | guide-getting-started | | Configuration | Config file formats, options | guide-configuration | | CLI Reference | All CLI commands and options | reference-cli | | Plugins | Rolldown plugin support | advanced-plugins |
| Option | Usage | Reference |
|--------|-------|-----------|
| Entry points | input: './src/index.ts' or entry: ['src/*.ts'] | option-entry |
| Output formats | format: ['esm', 'cjs', 'iife'] | option-format |
| Output directory | outDir: 'dist' | option-output |
| Type declarations | dts: true | option-dts |
| Platform | platform: 'node' or platform: 'browser' | option-platform |
| External deps | external: ['react'] or noExternal: ['lodash'] | option-external |
| Package exports | generateExports: true, exports: { enabled: true } | option-exports |
Uses Rolldown for bundling:
{
type: 'bundle',
input: './src/index.ts', // Entry point(s)
format: ['esm', 'cjs'], // Output formats
outDir: 'dist', // Output directory
dts: true, // Generate .d.ts
minify: false, // Minify output
platform: 'node', // Target platform
target: 'es2022', // ECMAScript target
external: [], // External dependencies
noExternal: [], // Force bundle dependencies
plugins: [], // Rolldown plugins
generateExports: true, // Generate exports field
exportPath: '.', // Custom export path
}
Uses Oxc for file-by-file transformation:
{
type: 'transform',
input: './src', // Source directory
outDir: 'dist', // Output directory
minify: false, // Minify output
}
export default defineConfig({
entries: [
{
type: 'bundle',
input: './src/index.ts',
format: ['esm', 'cjs'],
dts: true,
},
],
})
export default defineConfig({
entries: [
{
type: 'bundle',
input: {
index: './src/index.ts',
utils: './src/utils.ts',
cli: './src/cli.ts',
},
format: ['esm', 'cjs'],
dts: true,
},
],
})
export default defineConfig({
entries: [
{
type: 'bundle',
input: './src/index.ts',
format: ['esm', 'cjs'],
dts: true,
generateExports: true,
exportPath: '.',
},
{
type: 'bundle',
input: './src/utils/index.ts',
format: ['esm', 'cjs'],
dts: true,
generateExports: true,
exportPath: './utils',
clean: false,
},
],
exports: {
enabled: true,
includeTypes: true,
autoUpdate: true,
},
})
export default defineConfig({
entries: [
{
type: 'bundle',
input: './src/cli.ts',
format: 'esm',
platform: 'node',
// Shebang is auto-preserved
},
],
})
export default defineConfig({
entries: [
{
type: 'bundle',
input: './src/index.ts',
format: 'iife',
globalName: 'MyLib',
platform: 'browser',
minify: true,
},
],
})
export default defineConfig({
entries: [
{
type: 'bundle',
input: './src/index.ts',
format: ['esm', 'cjs'],
shims: true, // Add __dirname, __filename shims
},
],
})
export default defineConfig({
entries: [
{
type: 'bundle',
input: './src/index.ts',
format: ['esm', 'cjs'],
external: ['react', 'react-dom', /^@myorg\//],
noExternal: ['lodash-es'], // Force bundle
},
],
})
import { defineConfig } from 'robuild'
import somePlugin from 'some-rolldown-plugin'
export default defineConfig({
entries: [
{
type: 'bundle',
input: './src/index.ts',
format: ['esm'],
plugins: [somePlugin()],
// Or via rolldown passthrough
rolldown: {
plugins: [anotherPlugin()],
},
},
],
})
export default defineConfig({
entries: [
{
type: 'transform',
input: './src',
outDir: 'dist',
},
],
})
export default defineConfig({
entries: [
{
type: 'bundle',
input: './src/index.ts',
stub: true, // Fast dev builds
},
],
})
# Basic commands
robuild # Build once
robuild --watch # Watch mode
robuild --config custom.ts # Custom config
# Entry options
robuild src/index.ts # Single entry
robuild src/a.ts src/b.ts # Multiple entries
# Output options
robuild --format esm,cjs # Multiple formats
robuild --outDir lib # Custom output directory
robuild --minify # Enable minification
robuild --dts # Generate declarations
# Development
robuild --watch # Watch mode
robuild --sourcemap # Generate source maps
robuild --clean # Clean output directory
# Package exports
robuild --generate-exports # Generate package.json exports
{
// Working directory
cwd: process.cwd(),
// Output directory (default: 'dist')
outDir: 'dist',
// Output format(s)
format: 'esm', // or ['esm', 'cjs']
// Target platform
platform: 'node', // or 'browser'
// ECMAScript target
target: 'es2022',
// Clean output before build
clean: true,
// Generate source maps
sourcemap: false,
// Minify output
minify: false,
// Type declarations
dts: false,
// Exports generation
exports: {
enabled: false,
includeTypes: true,
autoUpdate: true,
},
// Post-build callback
onSuccess: async () => {},
// Fail on warnings
failOnWarn: false,
// Watch mode ignore patterns
ignoreWatch: [],
}
Always generate type declarations for TypeScript libraries:
{ dts: true }
Use multi-format builds for maximum compatibility:
{ format: ['esm', 'cjs'] }
Externalize peer dependencies:
{ external: ['react', 'react-dom'] }
Enable exports generation for proper package.json:
{ generateExports: true, exports: { enabled: true } }
Use watch mode during development:
robuild --watch
Clean output before production builds:
{ clean: true }
Use transform mode for utilities with many files:
{ type: 'transform', input: './src' }
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.