skills/team/react-app-scaffolder/SKILL.md
Scaffolds a production-ready React + TypeScript application skeleton with Vite, a router, strict TypeScript, Vitest + React Testing Library, ESLint (hooks + jsx-a11y), Prettier, environment handling, an error boundary, and a feature-folder layout. React analog of an app/project scaffolder. Use when starting a new React app, bootstrapping a Vite + React + TypeScript project, setting up the testing/lint toolchain, or establishing the base folder structure and app shell.
npx skillsauth add michaelalber/ai-toolkit react-app-scaffolderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
"Make the right thing the easy thing. A project's defaults become its culture." -- Adapted from engineering practice
"Strict from day one is cheaper than strict retrofitted." -- Adapted from TypeScript adoption experience
The first commit sets the project's defaults, and defaults are sticky: a project that starts without
strict TypeScript, without a test runner, or without lint rarely gains them later without pain. This
skill stands up the skeleton with the non-negotiables already on — strict types, Vitest, ESLint with the
hooks and a11y plugins, a router, an error boundary, and a feature-folder layout — so the first real
feature drops into a structured, tested, type-safe project.
Vite is the default bundler (fast, modern, ESM-native). Create React App is deprecated and is never the
target for a new project — if an existing CRA app is in play, route to react-modernization-analyzer.
Grounding note: the KB has no React corpus. Use
collection="javascript"for TS/tooling and cite react.dev / Vite + Vitest docs as the authority. Never invent areactcollection.
Non-Negotiable Constraints:
strict — strict: true in tsconfig from the first committest script and a passing smoke testVITE_* exposed to the client; secrets stay server-sideWhat this skill is NOT:
react-feature-slice / react-component-scaffolder for thatThe 10 domain principles, knowledge-base lookups, discipline rules, the anti-pattern catalog, and
error-recovery procedures live in references/conventions.md.
node -v && npm -v
ls package.json 2>/dev/null && echo "existing project — confirm before overwriting"
# If a Create React App project exists, STOP and route to react-modernization-analyzer.
grep -l "react-scripts" package.json 2>/dev/null && echo "CRA detected → modernization, not fresh scaffold"
If package.json already exists, do not clobber it — scaffold missing pieces only, and confirm first.
npm create vite@latest <app-name> -- --template react-ts
cd <app-name>
npm install
npm install -D vitest @testing-library/react @testing-library/user-event jsdom \
eslint-plugin-react-hooks eslint-plugin-jsx-a11y prettier babel-plugin-react-compiler
npm install react-router-dom
Apply the structure and config. See references/project-structure.md for full file contents.
src/
app/
App.tsx # shell: providers + router + error boundary
routes.tsx # typed route table (home, layout, 404)
ErrorBoundary.tsx # top-level error boundary
features/ # feature slices land here (react-feature-slice)
shared/ # cross-cutting UI + utilities (http client, etc.)
test/setup.ts # RTL + jest-dom setup
main.tsx # createRoot
vite-env.d.ts # typed VITE_* env
eslint.config.js
vitest.config.ts
.env.example
.prettierrc
tsconfig.json # strict
See references/toolchain-config.md for tsconfig, eslint.config.js (incl. compiler lint rules),
vite.config.ts (React Compiler babel plugin), vitest.config.ts, and scripts.
npm run typecheck # tsc --noEmit, strict
npm run lint # eslint clean
npm run test # smoke test green
npm run build # production build succeeds
npm run dev # dev server boots
<react-app-scaffold-state>
phase: DETECT | CREATE | CONFIGURE | VERIFY | COMPLETE
app_name: [name]
existing_project: true | false
cra_detected: true | false
strict_ts: true | false
router_configured: true | false
test_harness_configured: true | false
lint_configured: true | false
error_boundary_added: true | false
compiler_enabled: true | false
last_action: [description]
next_action: [description]
</react-app-scaffold-state>
Emit the scaffold checklist (Toolchain · App Shell · Scripts · Verification) as the progress report.
Full markdown checklist: references/conventions.md → "Scaffold Checklist (Output Template)".
| Skill | Relationship |
|-------|-------------|
| react-feature-slice | The first thing to use after the skeleton — adds feature slices into src/features/. |
| react-component-scaffolder | Generates individual components/routes within the scaffolded app. |
| react-modernization-analyzer | For an existing CRA / legacy app, assess and plan the move to this Vite skeleton instead of scaffolding fresh. |
| react-security-review | Run once features land to verify CSP, env exposure, and dependency posture. |
| tdd | Drive the first features test-first on top of the scaffolded Vitest harness. |
development
Interviews the user relentlessly about a plan, decision, or idea — one question at a time, each with a recommended answer. Shared engine behind "grill-me" and "grill-with-docs". Use on any "grill" trigger phrase or to stress-test thinking. Do NOT use to build the plan; it ends at shared understanding, not implementation.
testing
Runs a relentless interview to sharpen a plan or design, capturing the decisions as ADRs and a glossary along the way. Use when the user wants to be grilled AND wants the session to leave durable domain documentation behind. Do NOT use for a throwaway stress-test with no artifacts; use grill-me instead.
tools
OWASP-based security review of Vue/TypeScript front-ends. Detects framework (Vite/Vue CLI/Nuxt), entry points, and data flows; scans the OWASP Top 10 (2025) mapped to Vue client-side risks (raw-HTML XSS via v-html, URL/protocol injection, bundled secrets, insecure token storage, dependency CVEs, missing CSP, open redirects, router guard bypass); emits an exec summary plus graded findings. Use to audit Vue for vulnerabilities. Not for architecture grading (vue-architecture-checklist).
tools
Analyzes legacy Vue codebases and produces actionable modernization plans. Primary migration paths include Options API to Composition API, Vue 2 to Vue 3, Vue CLI to Vite, JavaScript to TypeScript, Vue Test Utils/Karma/Mocha to Vitest + Vue Testing Library, legacy Vuex to Pinia, and removed-in-Vue-3 pattern cleanup (filters, event bus, `$listeners`). Does NOT perform the migration — assesses, quantifies risk, and plans.