agentleFS
DobroslavRadosavljevicDobroslavRadosavljevic/cabrakan/.agents/skills/vite/SKILL.md

vite

Skill1 starsChanged 3 months agoMITView on GitHub

Build, review, debug, configure, migrate, teach, or plan Vite frontend tooling with current docs and a full usage guide. Use for vite, create-vite, vite.config, defineConfig, loadEnv, import.meta.env, HMR, optimizeDeps, build.rolldownOptions, oxc, Lightning CSS, plugins (@vitejs/plugin-react, plugin-vue, plugin-legacy), SSR middlewareMode, ssrLoadModule, library mode, backend integration, multi-page apps, Environment API, and Vite 7 to Vite 8 / Rolldown migration.

  • Reads credentials

40 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use nitro, nodejs-backend-patterns and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SentrySkill

    nitro

    Build and deploy universal JavaScript servers with Nitro v3. Use when working with nitro.config.ts, defineNitroConfig, defineHandler, defineConfig, server.ts entry, filesystem routing, route rules, useStorage, defineCachedHandler, useDatabase, definePlugin, runtime hooks, Vercel/Cloudflare deployment, or migrating from Nitro v2/nitropack.

    Also in 4 projects that use this

  • xfstudioSkill

    nodejs-backend-patterns

    Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices. Use when creating Node.js servers, REST APIs, GraphQL backends, or microservices architectures.

    Also in 5 projects that use this

  • xenitV1Skill

    nodejs-best-practices

    Node.js development principles and decision-making. Framework selection, async patterns, security, and architecture. Teaches thinking, not copying.

    Also in 4 projects that use this

  • midudevSkill

    tailwind-css-patterns

    Provides comprehensive Tailwind CSS utility-first styling patterns including responsive design, layout utilities, flexbox, grid, spacing, typography, colors, and modern CSS best practices. Use when styling React/Vue/Svelte components, building responsive layouts, implementing design systems, or optimizing CSS workflow.

    Also in 3 projects that use this

  • xfstudioSkill

    typescript-advanced-types

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications. Use when implementing complex type logic, creating reusable type utilities, or ensuring compile-time type safety in TypeScript projects.

    Also in 5 projects that use this

  • MicrosoftSkill

    accessibility

    Consolidated accessibility skill entrypoint for WCAG 2.2, ARIA Authoring Practices, cognitive accessibility, Section 508, EN 301 549, design intent verification, and the Accessibility Planner workflow.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 1 is distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 34 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill when work touches Vite: scaffolding, vite.config, plugins, env/modes, dep optimization, production builds, SSR/backend …

    line 8
  2. Very specific:

    Prefer Vite 8 APIs (build.rolldownOptions, oxc, optimizeDeps.rolldownOptions).

    line 24
  3. Very specific:

    Verify with bunx vite build (or project scripts), vite preview, and separate tsc --noEmit when types matter.

    line 25
  4. Very specific:

    Prefer bunx vite / bun create vite in command examples.

    line 30
  5. Very specific:

    Prefer build.rolldownOptions over deprecated build.rollupOptions.

    line 35
  6. Distinctive:

    Prefer repository-owned commands.

    line 44
  7. Very specific:

    After config migration: confirm no remaining manualChunks object form.

    line 50

“Common” is measured: kept by at least 6 in 10 of the 34 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Vite

Use this skill when work touches Vite: scaffolding, vite.config, plugins, env/modes, dep optimization, production builds, SSR/backend integration, library mode, or upgrading to Vite 8 (Rolldown/Oxc).

Workflow

  1. Inspect the local Vite surface:
    • Package version (vite@8.x preferred; snapshot 8.2.0). Node: ^20.19.0 || >=22.12.0.
    • Config: vite.config.ts / .js, defineConfig, plugins, appType.
    • Defaults in use: Rolldown build + Oxc transform/minify + Lightning CSS minify (Vite 8) vs older esbuild/Rollup (Vite 7-).
    • Scripts: vite / vite build / vite preview; framework plugins (@vitejs/plugin-*).
  2. For day-to-day how-to, follow usage-guide.md first.
  3. Refresh docs when versions drift or the task is migration/SSR/Environment API. Start from source-map.md.
  4. Route deeper detail:
    • Config, CLI, env, assets, CSS, HMR: config-cli-env.md.
    • Plugins, build, lib mode, MPA, performance: plugins-build.md.
    • SSR, backend integration, proxy, middleware: ssr-backend.md.
    • Vite 7→8 / Rolldown: migration-v8.md.
  5. Prefer Vite 8 APIs (build.rolldownOptions, oxc, optimizeDeps.rolldownOptions). Treat Environment API as RC, Full Bundle Mode / Lightning CSS as full transformer as experimental.
  6. Verify with bunx vite build (or project scripts), vite preview, and separate tsc --noEmit when types matter.

Core Judgment

  • Vite = dev server (native ESM + HMR) + production bundler. Vite 8 bundler/optimizer defaults are Rolldown; JS transform/minify Oxc; CSS minify Lightning CSS.
  • Prefer bunx vite / bun create vite in command examples; keep narrative npm registry references when describing packages.
  • index.html is the app entry (not under public/). public/ is copy-as-is static files.
  • Vite does not typecheck — run tsc --noEmit (or project typecheck) separately.
  • Client env: only envPrefix (default VITE_) reaches import.meta.env. Never put secrets in VITE_*.
  • Config files do not auto-load .env — use loadEnv inside defineConfig.
  • Prefer build.rolldownOptions over deprecated build.rollupOptions; prefer oxc over deprecated esbuild config.
  • Chunk splitting: object manualChunks removed; function form deprecated → Rolldown output.codeSplitting.
  • vite preview is not a production server — use it only to smoke dist.
  • Dep cache: node_modules/.vite; force with vite --force (do not rely on deprecated vite optimize).
  • Official plugins live under @vitejs/*. PWA (vite-plugin-pwa) is community.
  • SSR/backend: enforce real security/auth on the host server; Vite middleware is a tooling layer.

Verification

Prefer repository-owned commands. For meaningful Vite work, cover the relevant subset:

  • bunx vite --version (or project vite) and confirm major (7 vs 8).
  • Dev smoke: bun run dev / HMR for the changed module.
  • bun run build then bun run preview (or equivalent).
  • Typecheck separately when TS/paths/import type matter.
  • After config migration: confirm no remaining manualChunks object form; Rolldown options resolve via configResolved if debugging.
  • SSR: client + server builds; middleware mode smoke; import.meta.env.SSR branches.
  • Backend integration: manifest entries render correct CSS/JS URLs.

Report which checks ran, which did not, and any Vite version assumptions that remain.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.