agentleFS
ItalyPaleAleItalyPaleAle/skills/react-spa-vite/SKILL.md

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.

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
  1. Distinctive:

    Create a production-ready static React SPA and keep decisions consistent.

    line 8
  2. Distinctive:

    Add production features requested by the user:

    line 27
  3. Very specific:

    Keep index.html in project root

    line 33
  4. Very specific:

    Keep source assets in src/assets/*

    line 34
  5. Very specific:

    Keep deployable static output in dist/

    line 35
  6. Distinctive:

    Run type checks and build

    line 39
  7. Distinctive:

    Run tests only if test tooling was added

    line 41
  8. Distinctive:

    Use for project bootstrap, dependency installation, scripts, and baseline file structure.

    line 48
  9. Distinctive:

    Use for Vite plugin setup, Tailwind v4, PWA, SRI, image optimization, env vars, fonts, and common implementation patterns.

    line 51
  10. Distinctive:

    Use only when the user asks for unit/component tests (Vitest) or E2E tests (Playwright).

    line 54
  11. Distinctive:

    Use only when diagnosing build, plugin, PWA, Tailwind, asset, or dev server issues.

    line 57
  12. Very specific:

    Keep SKILL.md focused on orchestration.

    line 61
  13. Distinctive:

    Do not inline large templates in the main skill body.

    line 62
  14. Distinctive:

    Prefer minimal, working defaults first.

    line 63
  15. Very specific:

    Prefer pnpm commands unless the user requests another package manager.

    line 64

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

React SPA Vite

Create a production-ready static React SPA and keep decisions consistent.

Workflow

  1. Confirm required inputs:
  • App name
  • Package manager (pnpm preferred)
  • Need for PWA and offline support
  • Need for SRI hardening
  • Need for image optimization
  • Need for optional testing setup (Vitest, Playwright, both, or none)
  1. Initialize the project with Vite React SWC TypeScript template.
  2. Configure core stack:
  • Tailwind CSS v4 via @tailwindcss/vite
  • TypeScript strict settings
  • Vite aliases when requested
  1. 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
  1. Apply sensible defaults for static deployment:
  • Keep index.html in project root
  • Keep source assets in src/assets/*
  • Keep deployable static output in dist/
  1. 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.md Use for project bootstrap, dependency installation, scripts, and baseline file structure.
  • references/configuration.md Use for Vite plugin setup, Tailwind v4, PWA, SRI, image optimization, env vars, fonts, and common implementation patterns.
  • references/testing.md Use only when the user asks for unit/component tests (Vitest) or E2E tests (Playwright).
  • references/troubleshooting.md Use only when diagnosing build, plugin, PWA, Tailwind, asset, or dev server issues.

Guardrails

  • Keep SKILL.md focused 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 pnpm commands unless the user requests another package manager.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.