Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add antfu/skills --skill vite -a claude-code
Open on GitHub

What 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.ts for 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-code

2Manually: put the files in place

~/.claude/skills/vite/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/vite/

From the same set8

The whole set →
vitest Anthony Fu This skill guides work with Vitest tests, mocks, coverage, filtering, and fixtures. Use it when setting up tests or checking how Vitest fits a Vite project. Claude Code CX Codex Cursor +1 43,600installs vue Anthony Fu This skill guides agents through Vue 3 Composition API, script setup, and reactivity. Use it when writing Vue SFCs or built-in component flows. Claude Code CX Codex Cursor +1 35,800installs nuxt Anthony Fu This skill equips your AI agent with Nuxt 5 knowledge: server-side rendering, file-based routing, auto-imports, and Nitro v3 deployment. Use it when building Nuxt apps, server routes, useFetch calls, middleware, or hybrid rendering. Claude Code CX Codex Cursor +1 24,100installs pnpm Anthony Fu Skill for working with pnpm, a Node.js package manager with strict dependency resolution. Use it when your project relies on workspaces, version catalogs, patches, or dependency overrides. Claude Code CX Codex Cursor +1 22,300installs pinia Anthony Fu Pinia skill adds reference documentation to Claude Code for the official Vue state management library. Use it when defining stores, managing state, getters, and actions in Vue apps. Claude Code CX Codex Cursor +1 19,700installs unocss Anthony Fu A skill that gives the agent reference material on UnoCSS configuration, rules, shortcuts and presets. Useful when setting up UnoCSS or reusing Tailwind knowledge in it. Claude Code CX Codex Cursor +1 16,000installs nitro Anthony Fu A skill with Nitro v3 references: file-based routing, route rules, caching, storage and deployment presets. Use it when the agent edits nitro.config or writes H3 handlers. Claude Code CX Codex Cursor +1 2,600installs

Similar

stitch::code-to-design official google-labs-code Moves an existing frontend into Stitch by extracting standalone HTML and a design system, then uploading both to a project. Useful when bringing pages or components into Stitch for further work. Claude Code CX Codex Cursor +1 10,100installs how-it-works thedotmack Explains how claude-mem works behind the scenes. It covers tool observation logging, local file storage, and memory injection timing. Claude Code CX Codex Cursor +1 5,100installs pathfinder thedotmack This skill maps feature flows, finds duplicated concerns, and proposes a unified architecture. Use it to inspect a codebase before a refactor. Claude Code CX Codex Cursor +1 5,100installs stitch::upload-to-stitch official google-labs-code Uploads local images, mockups, extracted HTML, and design markdown to a Stitch project over HTTP, bypassing MCP base64 token limits. Claude Code CX Codex Cursor +1 9,900installs gh cli Teaches agents to call GitHub CLI: structured JSON, pagination, issue and PR search, file uploads. Claude Code CX Codex Cursor +1 2,600installs inventory-demand-planning evos This skill helps forecast demand, set safety stock, and plan replenishment for multi-location retailers. Claude Code CX Codex Cursor +1 4,500installs setup-matt-pocock-skills Matt Pocock This skill configures a repository for Matt Pocock's engineering skills by setting its issue tracker, triage labels, and domain docs layout. Run it before using the other skills. Claude Code 1,052,851installs to-tickets Matt Pocock Turns a plan, spec, or conversation into small end-to-end tickets with explicit blockers. Use it to agree on the work breakdown before tickets go to a tracker. Claude Code 711,230installs

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

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor