Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
oakoss avatar

Vite

  • 91 installs
  • 14 repo stars
  • Updated March 2, 2026
  • oakoss/agent-skills

Helps with ai & agent building tasks during AI-assisted development.

About

vite is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • vite
  • AI & Agent Building
  • AI-coding skill

Vite by the numbers

  • 91 all-time installs (skills.sh)
  • +6 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #4,765 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/oakoss/agent-skills --skill vite

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs91
repo stars14
Last updatedMarch 2, 2026
Repositoryoakoss/agent-skills

What it does

Helps with ai & agent building tasks during AI-assisted development.

Files

SKILL.mdMarkdownGitHub ↗

Vite

Overview

Vite is a next-generation frontend build tool that provides instant dev server start via native ES modules and optimized production builds via Rollup. It supports TypeScript, JSX, CSS preprocessors, and static assets out of the box with zero configuration.

When to use: Single-page apps, multi-page apps, library publishing, SSR applications, monorepo packages, any modern frontend project needing fast dev feedback and optimized builds.

When NOT to use: Legacy browsers requiring ES5 output without transpilation, projects locked to Webpack-specific loaders with no Vite equivalents, non-JavaScript build pipelines.

Quick Reference

PatternAPIKey Points
Config filedefineConfig({})Type-safe config with IDE support
Conditional configdefineConfig(({ command, mode }) => ({}))Different config per command/mode
Path aliasresolve.aliasMap @/ to src/
Dev proxyserver.proxyForward API requests to backend
HMR configserver.hmrWebSocket host/port/protocol
HTTPS devserver.httpsPass TLS cert/key options
Build targetbuild.targetES module target for output
Manual chunksbuild.rollupOptions.output.manualChunksControl code splitting
Library modebuild.libPublish ES/CJS/UMD packages
SSR buildbuild.ssr + ssr optionsServer-side rendering config
Env variablesimport.meta.env.VITE_*Client-exposed env vars
loadEnvloadEnv(mode, root, prefix)Load env vars in config
CSS modulescss.modulesScoped CSS class names
Preprocessorscss.preprocessorOptionsSass/Less/Stylus options
PostCSScss.postcssInline or external PostCSS config
Static assetsimport url from './img.png'Returns resolved public URL
Plugin{ name, transform, load }Hook-based plugin system
Virtual moduleresolveId + load hooksGenerate modules at build time
Multi-pagebuild.rollupOptions.inputMultiple HTML entry points

Common Mistakes

MistakeCorrect Pattern
Exposing secrets via VITE_ prefixOnly prefix client-safe vars with VITE_; use loadEnv in config for server-only secrets
Using process.env in client codeUse import.meta.env.VITE_* (Vite replaces at build time)
Modifying rollupOptions.input without resolve()Always use path.resolve() or import.meta.dirname for absolute paths
Not externalizing peer deps in library modeAdd React/Vue to rollupOptions.external to avoid bundling
Creating QueryClient-style singletons in SSREnsure per-request state in SSR to avoid cross-request leaks
Inline PostCSS config alongside postcss.config.jsUse one or the other; inline config disables config file search
Setting base without trailing slashbase should be /path/ with trailing slash or full URL
Using __dirname in ESM configUse import.meta.dirname (Node 21+) or fileURLToPath

Delegation

  • Plugin discovery: Use Explore agent
  • Build analysis: Use Task agent
  • Config review: Delegate to code-reviewer agent
If the vitest-testing skill is available, delegate test configuration and Vitest setup to it.
If the tailwind skill is available, delegate Tailwind CSS configuration and utility patterns to it.
If the react-patterns skill is available, delegate React component patterns and hooks to it.
If the typescript-patterns skill is available, delegate TypeScript configuration and type patterns to it.
If the pnpm-workspace skill is available, delegate monorepo workspace configuration to it.

References

  • Configuration fundamentals and defineConfig patterns
  • Plugin authoring and popular plugins
  • Dev server setup: proxy, HMR, HTTPS, and middleware
  • Build optimization: chunking, tree-shaking, and output control
  • Library mode for publishing packages
  • SSR configuration and Express integration
  • Environment variables and .env file handling
  • CSS handling: PostCSS, CSS modules, preprocessors, and asset management

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.