Agent skill
rollup
Rollup ES module bundler. Use for library bundling.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/rollup
SKILL.md
Rollup
Rollup (v4) is the bundler of choice for libraries. It produces smaller, cleaner code than Webpack and pioneered Tree Shaking.
When to Use
- NPM Packages: Building a library for others to use.
- Flat Bundling: "Scope Hoisting" puts everything in one closure for performance.
Core Concepts
Tree Shaking
Rollup analyzes the import graph and excludes unused code statically.
Formats
Outputs esm, cjs, umd, iife.
Plugins
The ecosystem that Vite adopted.
Best Practices (2025)
Do:
- Use
pkg.exports: Configurepackage.jsonexports correctly for ESM/CJS dual publish. - Externalize dependencies: Don't bundle
reactinto your library. Mark it as external.
Don't:
- Don't use for Apps: Use Vite (which uses Rollup internally) for apps. Use Rollup directly for libs.
References
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?