react-spa-vite
Skill1 starsChanged 9 months agoMITView on GitHub
Scaffold and build production-ready static SPAs with Vite, React, Tailwind CSS v4, PWA support, Subresource Integrity (SRI), and image optimization. Use when creating a new React SPA, setting up a Vite + React + Tailwind stack, enabling offline/PWA behavior, hardening build output with SRI, adding image optimization, or configuring optional Vitest/Playwright testing.
In this repository5 other files it gives its agents.
- biome-lint-formatSkill
- cut-releaseSkill
- go-package-skill-creatorSkill
- go-service-scaffolderSkill
- writing-qualitySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 10 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Create a production-ready static React SPA and keep decisions consistent.
- Distinctive: line 27
Add production features requested by the user:
- Very specific: line 33
Keep index.html in project root
- Very specific: line 34
Keep source assets in src/assets/*
- Very specific: line 35
Keep deployable static output in dist/
- Distinctive: line 39
Run type checks and build
- Distinctive: line 41
Run tests only if test tooling was added
- Distinctive: line 48
Use for project bootstrap, dependency installation, scripts, and baseline file structure.
- Distinctive: line 51
Use for Vite plugin setup, Tailwind v4, PWA, SRI, image optimization, env vars, fonts, and common implementation patterns.
- Distinctive: line 54
Use only when the user asks for unit/component tests (Vitest) or E2E tests (Playwright).
- Distinctive: line 57
Use only when diagnosing build, plugin, PWA, Tailwind, asset, or dev server issues.
- Very specific: line 61
Keep SKILL.md focused on orchestration.
- Distinctive: line 62
Do not inline large templates in the main skill body.
- Distinctive: line 63
Prefer minimal, working defaults first.
- Very specific: line 64
Prefer pnpm commands unless the user requests another package manager.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
React SPA Vite
Create a production-ready static React SPA and keep decisions consistent.
Workflow
- Confirm required inputs:
- App name
- Package manager (
pnpmpreferred) - Need for PWA and offline support
- Need for SRI hardening
- Need for image optimization
- Need for optional testing setup (Vitest, Playwright, both, or none)
- Initialize the project with Vite React SWC TypeScript template.
- Configure core stack:
- Tailwind CSS v4 via
@tailwindcss/vite - TypeScript strict settings
- Vite aliases when requested
- Add production features requested by the user:
- PWA via
vite-plugin-pwa - SRI via
vite-plugin-sri-gen(must be last in Vite plugin order) - Image optimization via
vite-imagetools
- Apply sensible defaults for static deployment:
- Keep
index.htmlin project root - Keep source assets in
src/assets/* - Keep deployable static output in
dist/
- Validate setup:
- Install dependencies
- Run type checks and build
- Run preview
- Run tests only if test tooling was added
Reference Map
Load only the reference needed for the current request:
references/quickstart.mdUse for project bootstrap, dependency installation, scripts, and baseline file structure.references/configuration.mdUse for Vite plugin setup, Tailwind v4, PWA, SRI, image optimization, env vars, fonts, and common implementation patterns.references/testing.mdUse only when the user asks for unit/component tests (Vitest) or E2E tests (Playwright).references/troubleshooting.mdUse only when diagnosing build, plugin, PWA, Tailwind, asset, or dev server issues.
Guardrails
- Keep
SKILL.mdfocused on orchestration; put detailed snippets in references. - Do not inline large templates in the main skill body.
- Prefer minimal, working defaults first; add advanced options only when requested.
- Prefer
pnpmcommands unless the user requests another package manager.
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
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.

