vite — Claude Code skill: what it does, how to install
This skill covers Vite configuration, plugin development, SSR builds, and the Vite 8 move to Rolldown. Use it with vite.config.ts work.
npx skills add antfu/skills --skill vite -a claude-codeWhat vite does
The skill covers Vite configuration with vite.config.ts, defineConfig, and loadEnv. It also explains import.meta.glob, ?raw and ?url asset queries, import.meta.env, and the HMR API. Plugin guidance includes Vite-specific hooks, virtual modules, and plugin ordering.
Its build material covers library mode, SSR middleware mode, ssrLoadModule, the JavaScript API, and the Environment API. A separate section describes Vite 8 with the Rolldown bundler, the Oxc transformer, and related config changes. The quick reference includes vite, vite build, vite preview, and vite build --ssr, plus Vue and React plugins.
The skill recommends vite.config.ts and ESM, so a project built around CommonJS configuration deserves a check before you apply these recommendations.
What it helps with
- configure
vite.config.tsfor an application - add and order Vite plugins
- build a library or SSR application
- migrate a config to Rolldown
- handle asset imports and environment variables
Example prompts for the agent
- Configure `vite.config.ts` with the `@` alias and an `/api` proxy.
- Show me how to build this application for SSR with `vite build --ssr`.
- Explain how to migrate this Vite 8 configuration to Rolldown and Oxc.
How to install vite
1Skills CLI (Vercel)
npx skills add antfu/skills --skill vite -a claude-code2Manually: put the files in place
~/.claude/skills/vite/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/vite/
1Skills CLI (Vercel)
npx skills add antfu/skills --skill vite -a codex2Manually: put the files in place
.agents/skills/vite/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add antfu/skills --skill vite -a cursor2Manually: put the files in place
.cursor/skills/vite/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install antfu/skills vite2Manually: put the files in place
.github/skills/vite/SKILL.md1Skills CLI (Vercel)
npx skills add antfu/skills --skill vite -a gemini-cli2Platform CLI
gemini skills install https://github.com/antfu/skills --path skills/viteManually: put the files in place
.devin/skills/vite/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add antfu/skills --skill vite -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set8
The whole set →Similar
Questions about vite
What does the vite skill do?
It helps with Vite configuration, the plugin API, SSR, library builds, and asset imports. It also covers the Vite 8 migration to Rolldown and Oxc.
What configuration guidance does the skill provide?
It recommends a TypeScript vite.config.ts file and ESM instead of CommonJS. The examples cover defineConfig, aliases, proxies, and build settings.
Source text
SKILL.md · MIT
---
name: vite
description: Vite build tool configuration, plugin API, SSR, and Vite 8 Rolldown migration. Use when working with Vite projects, vite.config.ts, Vite plugins, or building libraries/SSR apps with Vite.
metadata:
author: Anthony Fu
version: "2026.9.25"
source: Generated from https://github.com/vitejs/vite, scripts at https://github.com/antfu/skills
---
# Vite
> Based on Vite v8.3.1 (Rolldown-powered), generated at 2026-09-25. Vite 8 uses the Rolldown bundler and the Oxc transformer instead of esbuild + Rollup.
Vite is a next-generation frontend build tool with fast dev server (native ESM + HMR) and optimized production builds.
## Preferences
- Use TypeScript: prefer `vite.config.ts`
- Always use ESM, avoid CommonJS
## Core
| Topic | Description | Reference |
|-------|-------------|-----------|
| Configuration | `vite.config.ts`, `defineConfig`, conditional configs, `loadEnv` | [core-config](references/core-config.md) |
| Features | `import.meta.glob`, asset queries (`?raw`, `?url`), `import.meta.env`, HMR API | [core-features](references/core-features.md) |
| Plugin API | Vite-specific hooks, virtual modules, plugin ordering | [core-plugin-api](references/core-plugin-api.md) |
## Build & SSR
| Topic | Description | Reference |
|-------|-------------|-----------|
| Build & SSR | Library mode, SSR middleware mode, `ssrLoadModule`, JavaScript API | [build-and-ssr](references/build-and-ssr.md) |
## Advanced
| Topic | Description | Reference |
|-------|-------------|-----------|
| Environment API | Vite 6+ multi-environment support, custom runtimes | [environment-api](references/environment-api.md) |
| Rolldown Migration | Vite 8 changes: Rolldown bundler, Oxc transformer, config migration | [rolldown-migration](references/rolldown-migration.md) |
## Quick Reference
### CLI Commands
```bash
vite # Start dev server
vite build # Production build
vite preview # Preview production build
vite build --ssr # SSR build
```
### Common Config
```ts
import { defineConfig } from 'vite'
export default defineConfig({
plugins: [],
resolve: { alias: { '@': '/src' } },
server: { port: 3000, proxy: { '/api': 'http://localhost:8080' } },
build: { target: 'esnext', outDir: 'dist' },
})
```
### Official Plugins
- `@vitejs/plugin-vue` - Vue 3 SFC support
- `@vitejs/plugin-vue-jsx` - Vue 3 JSX
- `@vitejs/plugin-react` - React with Oxc/Babel
- `@vitejs/plugin-react-swc` - React with SWC
- `@vitejs/plugin-legacy` - Legacy browser support
© Anthony Fu · MIT · antfu/skills