react-vite-best-practices

react-vite-best-practices is a skill for Claude Code, Codex from AsyrafHussin/agent-skills. It costs 59 tokens per session (1,215 once invoked), scanned A, original, MIT.

A set of performance guidelines for React applications built with Vite, a tool that develops and bundles web projects.

In plain words
What is it for?
Optimizing build settings, code splitting, lazy loading, hot-module reloading, assets, environment variables, and bundle size.
Why use it?
It helps prevent slow builds, large browser bundles, inefficient asset handling, and performance problems during development or deployment.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

not rated 75repo +2 14d ago A scan Socket: passSnyk: passSkillSpector: pass 59 tokens original MIT

Good fit Optimizing build settings, code splitting, lazy loading, hot-module reloading, assets, environment variables, and bundle size.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/asyrafhussin/agent-skills/react-vite-best-practices
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AsyrafHussin/agent-skills --skill react-vite-best-practices
Clone the repo
git clone --depth 1 https://github.com/AsyrafHussin/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for react-vite-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/asyrafhussin/agent-skills/react-vite-best-practices/github.svg)](https://agentmods.dev/skills/asyrafhussin/agent-skills/react-vite-best-practices)
Your own site
<a href="https://agentmods.dev/skills/asyrafhussin/agent-skills/react-vite-best-practices"><img src="https://agentmods.dev/badge/skills/asyrafhussin/agent-skills/react-vite-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for react-vite-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/asyrafhussin/agent-skills/react-vite-best-practices"><img src="https://agentmods.dev/badge/skills/asyrafhussin/agent-skills/react-vite-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,215 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk pass 15 Mar 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.01215
Opus 5 $0.00030 $0.00607
Sonnet 5 $0.00012 $0.00243
Haiku 4.5 $0.00006 $0.00121

Measured 11d ago against content hash 102875f67448, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

react-vite-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/react-vite-best-practices/SKILL.md · 183 lines

How it starts

The opening of the file, as written. The whole thing — 183 lines — stays where its author put it; the contents beside it link to each section on GitHub.

React + Vite Best Practices

Comprehensive performance optimization guide for React applications built with Vite. Contains 23 rules across 6 categories for build optimization, code splitting, development performance, asset handling, environment configuration, and bundle analysis.

Metadata

  • Version: 2.0.0
  • Framework: React + Vite
  • Rule Count: 23 rules across 6 categories
  • License: MIT

When to Apply

Reference these guidelines when:

  • Configuring Vite for React projects
  • Implementing code splitting and lazy loading
  • Optimizing build output and bundle size
  • Setting up development environment and HMR
  • Handling images, fonts, SVGs, and static assets
  • Managing environment variables across environments
  • Analyzing bundle size and dependencies

Rule Categories by Priority

Priority Category Impact Prefix
1 Build Optimization CRITICAL build-
2 Code Splitting CRITICAL split-
3 Development HIGH dev-
4 Asset Handling HIGH asset-
5 Environment Config MEDIUM env-
6 Bundle Analysis MEDIUM bundle-

Quick Reference

1. Build Optimization (CRITICAL)

  • build-manual-chunks - Configure manual chunks for vendor separation
  • build-minification - Minification with OXC (default) or Terser
  • build-target-modern - Target modern browsers (baseline-widely-available)
  • build-sourcemaps - Configure sourcemaps per environment
  • build-tree-shaking - Ensure proper tree shaking with ESM
  • build-compression - Gzip and Brotli compression
  • build-asset-hashing - Content-based hashing for cache busting

2. Code Splitting (CRITICAL)

  • split-route-lazy - Route-based splitting with React.lazy()
  • split-suspense-boundaries - Strategic Suspense boundary placement
  • split-dynamic-imports - Dynamic import() for heavy components
  • split-component-lazy - Lazy load non-critical components
  • split-prefetch-hints - Prefetch chunks on hover/idle/viewport

Read the full file on GitHub · 183 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 183 lines · 59 tokens per session scan A 102875f67448

Subscribe to this mod's changes

react-vite-best-practices is a skill published in the GitHub repository AsyrafHussin/agent-skills (75 stars, last pushed 14d ago), licensed MIT. It adds 59 tokens to every session and 1,215 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

recipe-front-review

Reviews completed frontend implementation for governing-source compliance, scope economy, repository quality, and security, then applies user-approved React corrections.

shinpr/claude-code-workflows · 29 tokens

frontend-ai-guide

Applies React/TypeScript-specific technical decision criteria, anti-pattern detection, debugging, and frontend quality gates. Use when reviewing components, hooks, browser behavior, or frontend implementation completeness.

shinpr/claude-code-workflows · 41 tokens

typescript-rules

React/TypeScript frontend development rules including type safety, component design, state management, and error handling. Use when implementing React components, TypeScript code, or frontend features.

shinpr/claude-code-workflows · 39 tokens

ring:applying-composition-patterns

React composition patterns that scale. Avoid boolean prop proliferation by using compound components, lifting state, and composing internals. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or during architecture review. Skip for simple components with 1-2 props…

LerianStudio/ring · 68 tokens

recipe-front-review

Reviews completed frontend implementation for governing-source compliance, scope economy, repository quality, and security, and applies user-approved React corrections.

shinpr/codex-workflows · 29 tokens

framework-expert

Unified framework expertise bundle. Lazy-loads relevant framework patterns (React, Vue, Angular, Next.js, Node.js, Python, Laravel, Go, Flutter, React Native, TypeScript) based on detected tech stack.

nguyenthienthanh/aura-frog · 48 tokens