Vite performance optimization guidelines. This skill should be used when writing, reviewing, or refactoring Vite configuration and projects to ensure optimal performance patterns. Triggers on tasks involving Vite config, build optimization, dependency pre-bundling, plugin development, bundle analysis, or HMR issues.
Comprehensive performance optimization guidelines for Vite applications, designed for AI agents and LLMs.
This skill contains 42 rules across 8 categories, covering the complete Vite execution lifecycle from development server startup to production builds.
| # | Category | Impact | Rules | Focus | |---|----------|--------|-------|-------| | 1 | Dependency Pre-bundling | CRITICAL | 6 | optimizeDeps configuration, caching | | 2 | Plugin Performance | CRITICAL | 5 | Hook optimization, auditing | | 3 | Bundle Optimization | CRITICAL | 7 | Code splitting, tree-shaking | | 4 | Import Resolution | HIGH | 5 | Barrel files, extensions, aliases | | 5 | Build Configuration | HIGH | 6 | Targets, minification, output | | 6 | Development Server | MEDIUM-HIGH | 5 | Warmup, caching, OS config | | 7 | CSS Optimization | MEDIUM | 4 | Lightning CSS, modules | | 8 | Advanced Patterns | LOW-MEDIUM | 4 | SSR, env vars, profiling |
# Install dependencies
pnpm install
# Build AGENTS.md from references
pnpm build
# Validate skill structure and content
pnpm validate
references/ with the category prefixassets/templates/_template.mdpnpm validate to check for errorspnpm build to regenerate AGENTS.mdEach rule file follows this structure:
---
title: Rule Title
impact: CRITICAL|HIGH|MEDIUM-HIGH|MEDIUM|LOW-MEDIUM|LOW
impactDescription: Quantified impact (e.g., "2-10× improvement")
tags: prefix, technique, tool
---
## Rule Title
Why this matters (1-3 sentences).
**Incorrect (what's wrong):**
\`\`\`javascript
// Bad code example
\`\`\`
**Correct (what's right):**
\`\`\`javascript
// Good code example
\`\`\`
Reference: [Source](url)
Rule files use the pattern: {category-prefix}-{slug}.md
| Prefix | Category |
|--------|----------|
| deps- | Dependency Pre-bundling |
| plugin- | Plugin Performance |
| bundle- | Bundle Optimization |
| import- | Import Resolution |
| build- | Build Configuration |
| dev- | Development Server |
| css- | CSS Optimization |
| advanced- | Advanced Patterns |
| Level | Description | Examples | |-------|-------------|----------| | CRITICAL | Multiplicative performance impact | Waterfalls, pre-bundling | | HIGH | Significant measurable improvement | Build targets, chunk splitting | | MEDIUM-HIGH | Noticeable improvement | Server warmup, CSS splitting | | MEDIUM | Moderate improvement | CSS modules, Lightning CSS | | LOW-MEDIUM | Incremental improvement | Profiling, library mode | | LOW | Edge case optimization | Specific scenarios |
| Script | Description |
|--------|-------------|
| pnpm build | Build AGENTS.md from references |
| pnpm validate | Validate skill structure and content |
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer