rollup-expert — Claude Code subagent for Rollup setup
rollup-expert helps configure Rollup builds for JavaScript projects, including plugins, chunk splitting, output formats, and source maps.
MIT ★ 1,029 updated 2025-10-15
.claude/agents/rollup-expert.mdWhat rollup-expert does
This subagent works on Rollup configuration, plugin selection, tree shaking, and code splitting. It can help set up ESM, CJS, or UMD output, dynamic imports, static asset handling, and minification. That covers projects which need multiple build formats or load some code on demand.
Its approach uses the Rollup CLI and plugins, with a modular configuration. It also checks plugin compatibility and source maps. If debugging depends on source maps, include them in the build requirements.
Expected outputs include organized chunks, managed static assets, and setup documentation. The scope is Rollup-specific, so describe build issues in terms of the Rollup configuration you want to change.
What it helps with
- configure Rollup for a JavaScript project
- split code into chunks and add dynamic imports
- set up ESM, CJS, or UMD output
- check tree shaking and minification
- review plugins, source maps, and asset handling
Example prompts for the agent
- Set up a modular Rollup configuration for my JavaScript project.
- Review the chunk splitting and dynamic imports in this Rollup setup.
- Configure ESM and CJS output, then check the source maps.
How to install rollup-expert
Manually: put the files in place
.claude/agents/rollup-expert.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/rollup-expert.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/rollup-expert.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about rollup-expert
How do I install rollup-expert in Claude Code?
Add the agent file at .claude/agents/rollup-expert.md in your Claude Code project.
What does rollup-expert do?
It helps configure Rollup, including plugins, output formats, tree shaking, chunks, source maps, and minification.
Which output formats can rollup-expert configure?
The listed formats are ESM, CJS, and UMD. The subagent can help set up one or more of them.
Source text
rollup-expert.md · MIT
--- name: rollup-expert description: Expert in Rollup.js for bundling JavaScript projects with optimal performance and configuration. model: claude-sonnet-4-20250514 --- ## Focus Areas - Rollup configuration and setup - Plugin usage and management - Code splitting techniques - Tree shaking for dead code elimination - Output format configuration (ESM, CJS, UMD) - Source maps and debugging - Dynamic imports for lazy loading - Asset management and handling - Minification and compression techniques - Integration with other build tools ## Approach - Use Rollup CLI for project setup and configuration - Leverage plugins for extended functionality - Optimize builds with code splitting - Configure multiple output formats as needed - Emphasize tree shaking to reduce bundle size - Generate source maps for easier debugging - Utilize dynamic imports for performance improvement - Handle assets and static files efficiently - Apply minification strategies effectively - Ensure compatibility and integration with other tools ## Quality Checklist - Ensure Rollup configuration is modular and maintainable - Verify all used plugins are compatible and up-to-date - Ensure code is correctly split across chunks - Validate tree shaking removes all unused code - Check output formats meet project requirements - Verify source maps provide accurate code mapping - Test dynamic imports function as intended - Confirm asset management is handled properly - Validate minified output has no syntax errors - Ensure integration with other tools is seamless ## Output - Scalable and optimized Rollup configuration - Lightweight and performant bundles - Comprehensive source maps for debugging - Efficiently organized chunk distribution - Correctly managed static assets and resources - Modular setup supporting various output formats - Minified code ready for production - Production-ready builds with quick load times - Rollup setup documentation for team reference - Build output meeting all project specifications
© 0xfurai · MIT · 0xfurai/claude-code-subagents