agentleFS
truemetal74truemetal74/skills/react-app-scaffold/SKILL.md

react-app-scaffold

Skill0 starsChanged 21 days agoMITView on GitHub

Scaffold a new front-end for the house web-app stack — React + TypeScript (strict) + Vite + Tailwind + Zustand + React Router with pinned versions, the standard folder layout, and wiring order for the sibling skills. Use this whenever starting a new React/Vite front-end, restructuring one to match the house conventions, or deciding which library versions to use — even if the user just says "create the frontend" or "start a new web app".

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write a CLAUDE.md with the routes table and store list.

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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 app scaffold (house stack)

Creates a front-end matching the house conventions. The three existing projects drifted badly on versions (React 18.2 / 18.3 / 19.2, Vite 5 / 8, Tailwind 3 / 4) — new projects start from the pinned set in assets/package.json (perfect-resume's, the most current). Copy assets/vite.config.ts, tsconfig.json, tsconfig.app.json as the build config baseline.

Stack (pinned in assets/package.json)

React 19 + React DOM, TypeScript (strict, no any — ESLint blocking), Vite 8, Tailwind CSS 4 (via @tailwindcss/vite, theme tokens in src/index.css @theme), Zustand (state), React Router, Axios, Lucide (icons), Framer Motion (optional), react-markdown (optional). Dev: ESLint 9, Vitest, Puppeteer (only with SSG).

Folder layout

front-end/
├── src/
│   ├── components/        # feature-based dirs (auth/, jobs/, common/, pages/, seo/)
│   ├── store/             # Zustand stores — one per domain, errors via getErrorMessage()
│   ├── lib/               # api.ts + support (react-api-client skill)
│   ├── types/             # shared TS domain types
│   ├── config.ts          # runtime config loader (react-api-client skill)
│   ├── App.tsx            # routes (wrap protected ones in AuthGuard)
│   └── main.tsx
├── nginx/nginx.conf       # deploy-cloudrun skill
├── docker-entrypoint.sh   # deploy-cloudrun skill
├── Dockerfile             # deploy-cloudrun skill
├── prerender.js           # react-seo-ssg skill (public-facing apps)
└── CLAUDE.md              # routes table + stores + theme (keep updated)

Wiring order for a new app

  1. Scaffold with this skill's configs; define theme tokens in src/index.css.
  2. react-api-client — HTTP layer + runtime config.
  3. react-auth-otp — auth store + AuthGuard (if the app has accounts).
  4. react-seo-ssg — only if there are public marketing/SEO pages.
  5. deploy-cloudrun — Dockerfile, nginx, entrypoint, deploy script.

Conventions that matter

  • Stores own server state; components stay presentational; every store formats errors with getErrorMessage() so users never see raw axios errors.
  • Runtime config comes from window.ENV_CONFIG — never bake API URLs into the bundle.
  • npm run build runs tsc -b first: type errors block the build (CI gate).
  • Write a CLAUDE.md with the routes table and store list; update it with every new page (the house rule: stale docs are worse than none).

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.