About unplugin
unplugin is a skill for building, integrating, and debugging plugins built on unplugin's shared Rollup-style API. It covers supported bundlers, lifecycle hooks, compatibility, filters, and virtual modules.
Key features
- 01Shared Rollup-style plugin API
- 02Bundler integration guidance
- 03Hook and context references
- 04Cross-bundler compatibility tables
- 05Filters and nested plugins
- 06Virtual modules and output assets
Use cases
- 01Creating a new unplugin
- 02Integrating plugins with bundlers
- 03Debugging hook behavior
- 04Checking cross-bundler API support
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ hairyf/ skills --skill unpluginAfter installing, type/unpluginin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
GENERATION.mdreferences/best-practices-conventions.mdbest-practices-diagnostics.mdbest-practices-scaffolding.mdcore-api.mdcore-hook-compatibility.mdcore-hooks-and-context.mdcore-integration.mdcore-overview.mdfeatures-bundler-specific.mdfeatures-filters.mdfeatures-nested-plugins.mdfeatures-output-and-assets.mdfeatures-parsing.mdfeatures-virtual-modules.mdDetails
From the project READMEUnplugin provides a single Rollup-style plugin API that runs on Vite, Rollup, webpack, esbuild, Rspack, Rolldown, Farm, and Bun. Use these skills when implementing a new unplugin, integrating an existing one, or debugging hook/context behavior across bundlers.
The skill is based on unplugin v3.0.0, generated at 2026-01-30.
Core References
| Topic | Description | Reference |
|---|---|---|
| Overview | What unplugin is, supported bundlers, when to use | core-overview |
| Core API | createUnplugin, factory signature, bundler-specific creators | core-api |
| Hooks and context | Lifecycle hooks, filters, this.parse / emitFile / warn / error | core-hooks-and-context |
| Hook compatibility | Per-bundler support tables for hooks and context | core-hook-compatibility |
| Integration | Installing and registering in Vite, Rollup, webpack, etc. | core-integration |
Features
| Topic | Description | Reference |
|---|---|---|
| Filters | filter option for resolveId, transform, load (performance) | features-filters |
| Nested plugins | Returning an array of plugins from the factory | features-nested-plugins |
| Bundler-specific | meta.framework, escape hatches (vite/webpack/esbuild/…), createXxxPlugin | features-bundler-specific |
| Virtual modules | resolveId + load pattern; filter for load | features-virtual-modules |
| Parsing | setParseImpl, this.parse; when needed (esbuild, webpack, etc.) | features-parsing |
| Output and assets | emitFile (EmittedAsset only), writeBundle (timing only) | features-output-and-assets |
Best Practices
| Topic | Description | Reference |
|---|---|---|
| Conventions | unplugin- prefix, keyword, default + subpath exports | best-practices-conventions |
| Diagnostics | this.warn / this.error, UnpluginMessage shape | best-practices-diagnostics |
| Scaffolding | Templates (unplugin-starter), try online, prerequisites | best-practices-scaffolding |
Comments
Markdown supported