vite-react-best-practices
БесплатноБез исполняемых скриптовНе проверенComprehensive React 19 and Vite 8 SPA performance, architecture, and deployment guidelines. Use this skill when building, reviewing, or refactoring React…
от claudiocebpaz★ 16 звёзд на GitHubОб этом скилле
Vite React Best Practices
A senior-level guide for building production-ready React Single Page Applications (SPAs) with Vite.
When to Apply
Reference these guidelines when:
- Setting up a new Vite + React project
- Configuring build pipelines and CI/CD for SPAs
- Troubleshooting production build or caching issues
- Refactoring React components for performance
Priority Table
| Impact | Rules |
|---|---|
| CRITICAL | Static Rewrites, Caching Strategy |
| HIGH | Build Validation, Environment Variables, Route Splitting, Server State |
| MEDIUM | Memoization, Image Optimization, Colocation, Anti-Patterns: Import from Dist, Troubleshooting |
Rule Categories
1. Vite SPA Deployment (CRITICAL)
- Static Rewrites - Mandatory for client-side routing.
- Caching Strategy - Immutable assets, no-cache index.html.
- Build Validation - Preview before push.
- Environment Variables -
VITE_prefix and security.
2. React Core Performance
- Route Splitting - Lazy load pages with React Router 8
route.lazy. - Server State - TanStack Query v5 for cached server data.
- Memoization - When to use useMemo/useCallback, and what React Compiler replaces.
- Image Optimization - LCP and CLS prevention.
3. Architecture & Cleanup
- Colocation - Feature-based structure.
- Anti-Patterns: Import from Dist - Avoid bundling twice.
- Troubleshooting - Common Vite 8 fixes.
How to Use
- Pick the rule that matches the task from the categories above, or from the priority table if you need to know what must not be skipped.
- Open the rule file in
rules/. Each file is self-contained: frontmatter withimpactandtags, the rationale, an incorrect example, a correct example, and a References section. - Load only the rules relevant to the task. CRITICAL rules apply to every Vite SPA; HIGH rules apply to most production apps; MEDIUM rules apply when the area is being changed.
- When a rule references another rule, follow the relative link inside
rules/.
| Stack | Version |
|---|---|
| React | 19.3.1 |
| Vite | 8.3.5 (Rolldown + Oxc) |
| React Router | 8.5.1 |
| TanStack Query | 5.105.1 |
| React Compiler | babel-plugin-react-compiler 1.x |
| Node (Vite 8) | `^20.19.0 |
Full Compiled Document
For the complete guide with all rules expanded: AGENTS.md (also available as CLAUDE.md).
Установить vite-react-best-practices в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл vite-react-best-practices?
Comprehensive React 19 and Vite 8 SPA performance, architecture, and deployment guidelines. Use this skill when building, reviewing, or refactoring React applications built with Vite (SPA). Covers Vite 8 build and static hosting requirements, React Router 8 route-level code splitting, TanStack Query v5 server state, React Compiler memoization, and core React performance patterns.
Как установить скилл vite-react-best-practices?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл vite-react-best-practices запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic