vite · pproenca — скилл для Claude Code: что делает и как установить
Набор из 42 правил оптимизации сборки и dev-сервера Vite. Помогает настроить конфигурацию, ускорить HMR и уменьшить размер бандла.
npx skills add pproenca/dot-skills --skill vite -a claude-codeЧто делает vite
Скилл загружает в контекст ассистента практическое руководство по тюнингу Vite. В него входят 42 правила, сгруппированные по восьми категориям с приоритетами от критического до низкого: предварительная сборка зависимостей, плагины, разбиение бандла, импорты, конфигурация сборщика, dev-сервер, CSS и SSR.
Внутри собраны чёткие паттерны под конкретные задачи. Например, для React скилл рекомендует SWC вместо Babel, для стилей предлагает Lightning CSS вместо PostCSS, а для монорепозиториев задаёт правила работы со связанными пакетами. Он также подсказывает настройки manualChunks, исключение мелких ESM-модулей из пребандлинга и отказ от barrel-файлов.
Неправильные настройки dev-сервера на Linux и WSL часто приводят к зависаниям из-за лимитов файловых дескрипторов или слежения за файлами. Руководство содержит готовые рецепты для таких окружений, включая поллинг и прогрев часто используемых модулей.
Какие задачи решает
- настроить разбиение вендорных модулей через
manualChunks - устранить медленный старт dev-сервера и задержки HMR
- избавиться от медленных barrel-импортов в проекте
- оптимизировать обработку CSS с помощью Lightning CSS
Примеры запросов агенту
- Проверь
vite.config.tsи настрой правильное разбиение чанков для вендорных зависимостей. - Dev-сервер Vite медленно стартует на WSL, помоги настроить поллинг и прогрев модулей.
- Оптимизируй зависимости в конфигурации Vite, чтобы ускорить пребандлинг.
Как установить vite
1Через Skills CLI (Vercel)
npx skills add pproenca/dot-skills --skill vite -a claude-code2Вручную: положить файлы
~/.claude/skills/vite/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/vite/
1Через Skills CLI (Vercel)
npx skills add pproenca/dot-skills --skill vite -a codex2Вручную: положить файлы
.agents/skills/vite/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add pproenca/dot-skills --skill vite -a cursor2Вручную: положить файлы
.cursor/skills/vite/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install pproenca/dot-skills vite2Вручную: положить файлы
.github/skills/vite/SKILL.md1Через Skills CLI (Vercel)
npx skills add pproenca/dot-skills --skill vite -a gemini-cli2Командой платформы
gemini skills install https://github.com/pproenca/dot-skills --path skills/.experimental/viteВручную: положить файлы
.devin/skills/vite/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add pproenca/dot-skills --skill vite -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о vite
Как установить vite в Claude Code?
Выполните команду npx skills add pproenca/dot-skills --skill vite -a claude-code. Файл скилла запишется в ~/.claude/skills/vite/SKILL.md.
Что делает скилл vite?
Он передаёт ИИ-агенту структурированный справочник из 42 правил для оптимизации конфигурации Vite, разделения бандла и устранения проблем с HMR.
Какие категории оптимизаций имеют наивысший приоритет?
Наивысший статус критических получили три блока: предварительная сборка зависимостей (deps-), быстродействие плагинов (plugin-) и оптимизация бандла (bundle-).
Исходный текст
SKILL.md · MIT
--- name: vite description: 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. --- # Vite Best Practices Comprehensive performance optimization guide for Vite applications. Contains 42 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation. ## When to Apply Reference these guidelines when: - Configuring Vite for a new project - Troubleshooting slow dev server startup - Optimizing production bundle size - Debugging HMR issues - Writing or evaluating Vite plugins - Migrating from Webpack or other bundlers ## Rule Categories by Priority | Priority | Category | Impact | Prefix | |----------|----------|--------|--------| | 1 | Dependency Pre-bundling | CRITICAL | `deps-` | | 2 | Plugin Performance | CRITICAL | `plugin-` | | 3 | Bundle Optimization | CRITICAL | `bundle-` | | 4 | Import Resolution | HIGH | `import-` | | 5 | Build Configuration | HIGH | `build-` | | 6 | Development Server | MEDIUM-HIGH | `dev-` | | 7 | CSS Optimization | MEDIUM | `css-` | | 8 | Advanced Patterns | LOW-MEDIUM | `advanced-` | ## Quick Reference ### 1. Dependency Pre-bundling (CRITICAL) - [`deps-include-large-cjs`](references/deps-include-large-cjs.md) - Include large dependencies with many modules - [`deps-exclude-esm`](references/deps-exclude-esm.md) - Exclude small ESM dependencies - [`deps-force-rebundle`](references/deps-force-rebundle.md) - Use --force flag for dependency changes - [`deps-hold-until-crawl`](references/deps-hold-until-crawl.md) - Configure holdUntilCrawlEnd for startup behavior - [`deps-entries`](references/deps-entries.md) - Configure custom entry points for discovery - [`deps-linked-packages`](references/deps-linked-packages.md) - Handle linked dependencies in monorepos ### 2. Plugin Performance (CRITICAL) - [`plugin-lazy-imports`](references/plugin-lazy-imports.md) - Use dynamic imports in plugin code - [`plugin-avoid-long-hooks`](references/plugin-avoid-long-hooks.md) - Avoid long operations in startup hooks - [`plugin-transform-early-return`](references/plugin-transform-early-return.md) - Early return in transform hooks - [`plugin-audit-community`](references/plugin-audit-community.md) - Audit community plugins for performance - [`plugin-swc-over-babel`](references/plugin-swc-over-babel.md) - Use SWC instead of Babel for React ### 3. Bundle Optimization (CRITICAL) - [`bundle-manual-chunks`](references/bundle-manual-chunks.md) - Use manualChunks for vendor splitting - [`bundle-dynamic-imports`](references/bundle-dynamic-imports.md) - Use dynamic imports for route-level splitting - [`bundle-analyze`](references/bundle-analyze.md) - Analyze bundle composition - [`bundle-tree-shaking`](references/bundle-tree-shaking.md) - Enable effective tree-shaking - [`bundle-chunk-warning`](references/bundle-chunk-warning.md) - Address large chunk warnings - [`bundle-compression`](references/bundle-compression.md) - Disable compressed size reporting for large projects - [`bundle-asset-inlining`](references/bundle-asset-inlining.md) - Configure asset inlining threshold ### 4. Import Resolution (HIGH) - [`import-avoid-barrel`](references/import-avoid-barrel.md) - Avoid barrel file imports - [`import-explicit-extensions`](references/import-explicit-extensions.md) - Use explicit file extensions - [`import-path-aliases`](references/import-path-aliases.md) - Configure path aliases for clean imports - [`import-svg-strings`](references/import-svg-strings.md) - Import SVGs as strings instead of components - [`import-glob-patterns`](references/import-glob-patterns.md) - Use glob imports carefully ### 5. Build Configuration (HIGH) - [`build-modern-target`](references/build-modern-target.md) - Target modern browsers - [`build-minification`](references/build-minification.md) - Use esbuild for minification - [`build-sourcemaps`](references/build-sourcemaps.md) - Disable source maps in production - [`build-css-code-split`](references/build-css-code-split.md) - Enable CSS code splitting - [`build-rolldown`](references/build-rolldown.md) - Consider Rolldown for faster builds - [`build-output-dir`](references/build-output-dir.md) - Configure output directory and caching ### 6. Development Server (MEDIUM-HIGH) - [`dev-server-warmup`](references/dev-server-warmup.md) - Warm up frequently used files - [`dev-browser-cache`](references/dev-browser-cache.md) - Keep browser cache enabled in DevTools - [`dev-fs-limits`](references/dev-fs-limits.md) - Increase file descriptor limits on Linux - [`dev-wsl-polling`](references/dev-wsl-polling.md) - Use polling for WSL file watching - [`dev-https-proxy`](references/dev-https-proxy.md) - Configure HTTPS and proxy for development ### 7. CSS Optimization (MEDIUM) - [`css-lightning`](references/css-lightning.md) - Use Lightning CSS instead of PostCSS - [`css-avoid-preprocessors`](references/css-avoid-preprocessors.md) - Prefer CSS over preprocessors when possible - [`css-modules`](references/css-modules.md) - Use CSS Modules for component styles - [`css-inline-critical`](references/css-inline-critical.md) - Extract critical CSS for initial paint ### 8. Advanced Patterns (LOW-MEDIUM) - [`advanced-ssr-externalize`](references/advanced-ssr-externalize.md) - Externalize dependencies for SSR - [`advanced-env-static`](references/advanced-env-static.md) - Use static environment variables - [`advanced-profiling`](references/advanced-profiling.md) - Profile build performance - [`advanced-lib-mode`](references/advanced-lib-mode.md) - Configure library mode for package development ## How to Use Read individual reference files for detailed explanations and code examples: - [Section definitions](references/_sections.md) - Category structure and impact levels - [Rule template](assets/templates/_template.md) - Template for adding new rules ## Reference Files | File | Description | |------|-------------| | [AGENTS.md](AGENTS.md) | Complete compiled guide with all rules | | [references/_sections.md](references/_sections.md) | Category definitions and ordering | | [assets/templates/_template.md](assets/templates/_template.md) | Template for new rules | | [metadata.json](metadata.json) | Version and reference information |
© pproenca · MIT · pproenca/dot-skills
Похожие скиллы
Всё по теме «Фронтенд и UI» →Сначала — vite от других авторов.