Agent skill
vite
Guidance for Vite using the official Guide, Config Reference, and Plugins pages. Use when the user needs Vite setup, configuration, or plugin selection details.
Install this agent skill to your Project
npx add-skill https://github.com/partme-ai/full-stack-skills/tree/main/skills/build-skills/vite
SKILL.md
When to use this skill
Use this skill whenever the user wants to:
- Follow Vite Guide topics from getting started to performance
- Configure Vite using the official config reference
- Select or understand Vite plugins from the official plugins page
- Use Vite CLI, HMR API, or JavaScript API
- Handle SSR, backend integration, or deployment scenarios in Vite
How to use this skill
- Identify the topic from the user request.
- Open the matching guide example file in
examples/guide/. - If configuration is needed, open the matching file in
examples/config/. - If plugin selection is needed, open
examples/plugins.md. - Follow official docs verbatim and keep output consistent with the referenced page.
- Validate: Run
npm run buildto verify config changes compile;npm run previewto test production output.
Guide mapping (one-to-one with https://cn.vitejs.dev/guide/)
Introduction
examples/guide/getting-started.md→ https://cn.vitejs.dev/guide/examples/guide/philosophy.md→ https://cn.vitejs.dev/guide/philosophy.htmlexamples/guide/why-vite.md→ https://cn.vitejs.dev/guide/why.html
Guide
examples/guide/features.md→ https://cn.vitejs.dev/guide/features.htmlexamples/guide/cli.md→ https://cn.vitejs.dev/guide/cli.htmlexamples/guide/using-plugins.md→ https://cn.vitejs.dev/guide/using-plugins.htmlexamples/guide/dep-pre-bundling.md→ https://cn.vitejs.dev/guide/dep-pre-bundling.htmlexamples/guide/assets.md→ https://cn.vitejs.dev/guide/assets.htmlexamples/guide/build.md→ https://cn.vitejs.dev/guide/build.htmlexamples/guide/static-deploy.md→ https://cn.vitejs.dev/guide/static-deploy.htmlexamples/guide/env-and-mode.md→ https://cn.vitejs.dev/guide/env-and-mode.htmlexamples/guide/ssr.md→ https://cn.vitejs.dev/guide/ssr.htmlexamples/guide/backend-integration.md→ https://cn.vitejs.dev/guide/backend-integration.htmlexamples/guide/troubleshooting.md→ https://cn.vitejs.dev/guide/troubleshooting.htmlexamples/guide/performance.md→ https://cn.vitejs.dev/guide/performance.htmlexamples/guide/migration.md→ https://cn.vitejs.dev/guide/migration.html
APIs
examples/guide/api-plugin.md→ https://cn.vitejs.dev/guide/api-plugin.htmlexamples/guide/api-hmr.md→ https://cn.vitejs.dev/guide/api-hmr.htmlexamples/guide/api-javascript.md→ https://cn.vitejs.dev/guide/api-javascript.html
Environment API
examples/guide/api-environment.md→ https://cn.vitejs.dev/guide/api-environment.htmlexamples/guide/api-environment-instances.md→ https://cn.vitejs.dev/guide/api-environment-instances.htmlexamples/guide/api-environment-plugins.md→ https://cn.vitejs.dev/guide/api-environment-plugins.htmlexamples/guide/api-environment-frameworks.md→ https://cn.vitejs.dev/guide/api-environment-frameworks.htmlexamples/guide/api-environment-runtimes.md→ https://cn.vitejs.dev/guide/api-environment-runtimes.html
Config mapping (one-to-one with https://cn.vitejs.dev/config/)
examples/config/configuring-vite.md→ https://cn.vitejs.dev/config/examples/config/shared-options.md→ https://cn.vitejs.dev/config/shared-options.htmlexamples/config/server-options.md→ https://cn.vitejs.dev/config/server-options.htmlexamples/config/build-options.md→ https://cn.vitejs.dev/config/build-options.htmlexamples/config/preview-options.md→ https://cn.vitejs.dev/config/preview-options.htmlexamples/config/dep-optimization-options.md→ https://cn.vitejs.dev/config/dep-optimization-options.htmlexamples/config/ssr-options.md→ https://cn.vitejs.dev/config/ssr-options.htmlexamples/config/worker-options.md→ https://cn.vitejs.dev/config/worker-options.html
Plugins mapping (one-to-one with https://cn.vitejs.dev/plugins/)
examples/plugins.md→ https://cn.vitejs.dev/plugins/
Inline Quick Start
# Create a new Vite project
npm create vite@latest my-app -- --template react-ts
# Install and run
cd my-app && npm install
npm run dev # Dev server with HMR
npm run build # Production build
npm run preview # Preview production build
// vite.config.ts
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
server: {
port: 3000,
proxy: {
'/api': 'http://localhost:8080',
},
},
build: {
sourcemap: true,
rollupOptions: {
output: {
manualChunks: { vendor: ['react', 'react-dom'] },
},
},
},
});
Best Practices
- Use
defineConfigfor TypeScript type hints and autocomplete - Configure proxy in
server.proxyfor API calls during development - Use
build.rollupOptions.output.manualChunksfor vendor splitting - Enable source maps in development; disable in production for smaller builds
- Use
import.meta.envfor environment variables (prefix withVITE_)
Resources
- Guide: https://cn.vitejs.dev/guide/
- Config: https://cn.vitejs.dev/config/
- Plugins: https://cn.vitejs.dev/plugins/
Keywords
Vite, build tool, dev server, HMR, config, plugins, SSR, CLI, dependency pre-bundling, assets
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
ocrmypdf-batch
OCRmyPDF batch processing skill — process multiple PDFs, Docker automation, shell scripting, and CI/CD integration. Use when the user needs to OCR many PDFs, set up automated OCR pipelines, or integrate OCR into workflows.
ocrmypdf-optimize
OCRmyPDF optimization skill — compress PDFs, configure PDF/A output, JBIG2 encoding, and lossless optimization. Use when the user needs to reduce PDF file size, create archival PDF/A files, or optimize OCR output.
ocrmypdf-image
OCRmyPDF image processing skill — deskew, rotate, clean, despeckle, remove border from scanned documents. Use when the user needs to improve scanned PDF quality, fix skewed pages, remove noise, or clean up scanned documents before OCR.
ocrmypdf-api
OCRmyPDF Python API and plugin skill — use OCRmyPDF programmatically from Python, integrate with applications, and extend with plugins (EasyOCR, PaddleOCR, AppleOCR). Use when the user needs to call OCRmyPDF from Python code, build OCR pipelines, or use alternative OCR engines.
ocrmypdf
OCRmyPDF core skill — add searchable OCR text layer to scanned PDFs, convert images to searchable PDFs, support 100+ languages via Tesseract. Use when the user needs to OCR a PDF, make a scanned PDF searchable, or extract text from scanned documents.
svelte
Guides Svelte and SvelteKit development including reactive components, stores, transitions, lifecycle hooks, SSR, file-based routing, and deployment. Use when the user needs to build Svelte components, create SvelteKit applications, implement reactivity patterns, or configure Svelte with Vite.
Didn't find tool you were looking for?