scaffold-app
Skill8 starsChanged 8 months agoMITView on GitHub
Scaffold a production-ready folder structure, base components, routing, types, and env setup for an already-configured React (Vite), Next.js, or React Native project. Run after /setup-project.
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- hadyfayed/laravel-agenttheir own version, first seen Jun 23, 2026
- StephanSergio/vibe-stacktheir own version, first seen Jun 20, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- hadyfayed/laravel-agent★ 14same name
- StephanSergio/vibe-stack★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- create-frontend-projectSkill
- create-monorepoSkill
- create-node-apiSkill
- create-projectSkill
- generate-claude-mdSkill
- setup-projectSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
44 rules. About 0 are common, 14 are distinctive, and 30 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
30
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Check the current directory for:
- Very specific: line 26
Read package.json (and package.json in the project root if monorepo).
- Very specific: line 62
If coming from /create-frontend-project, the app type is already known — skip this question.
- Distinctive: line 98
Follow the reference file exactly.
- Distinctive: line 100
Create the directory if it doesn't exist
- Distinctive: line 101
Write the file with the content from the reference
- Very specific: line 103
If heroui (React Vite only):
- Very specific: line 109
Use HeroUI Button instead of plain <button> in layout/marketing components
- Very specific: line 110
Use HeroUI Card, CardBody for feature cards and pricing cards
- Very specific: line 111
Use HeroUI Navbar, NavbarBrand, NavbarContent, NavbarItem for the site header
- Very specific: line 114
Import and use HeroUI components directly in client components ('use client')
- Very specific: line 115
Use HeroUI Button, Card, CardBody, Navbar components directly
- Very specific: line 116
If shadcn: use shadcn/ui Button, Card components
- Very specific: line 117
If tailwind-only or none: use plain HTML + Tailwind classes
- Very specific: line 118
If redux: use Redux store patterns in auth/app hooks
- Very specific: line 119
If zustand: use Zustand store patterns
- Very specific: line 120
If react-hook-form: use RHF in form components
- Very specific: line 121
If formik: use Formik in form components
- Very specific: line 122
If i18n detected (next-intl):
- Very specific: line 123
Use t() for all user-visible strings
- Very specific: line 127
If i18n detected (react-i18next): use t() for all user-visible strings
- Very specific: line 128
If ANIMATIONS: motion AND app type is Landing or Consumer:
- Very specific: line 130
Next.js: Create src/components/ui/FadeIn.tsx as a 'use client' wrapper (see reference/nextjs/motion.md).
- Very specific: line 131
Keep animations minimal: fade-in (opacity 0→1) + slide-up (y: 24→0), duration 0.4–0.5s, ease-out.
- Very specific: line 135
Use AppShell with <Sidebar /> on the left (default in reference)
- Distinctive: line 136
If heroui: use the HeroUI Sidebar variant from the reference's "HeroUI Variants" section
- Very specific: line 138
Use AppShell with <TopNav /> at the top (top nav variant from reference)
- Very specific: line 140
Create TopNav.tsx instead of Sidebar.tsx
- Distinctive: line 141
If heroui: use the HeroUI TopNav variant from the reference's "HeroUI Variants" section
- Very specific: line 149
Delete src/App.css (unless it has custom styles)
- Very specific: line 151
Keep src/index.css (contains Tailwind imports)
- Very specific: line 152
Delete public/vite.svg and src/assets/react.svg if unused
- Distinctive: line 167
After scaffolding is complete, ask:
- Very specific: line 179
If skeleton extras selected: use HeroUI Skeleton component (from @heroui/react) instead of plain CSS pulse
- Distinctive: line 185
After extras are handled (or skipped), print:
- Distinctive: line 226
Run the correct dev command for the project type in the background (so it doesn't block the conversation):
- Very specific: line 233
Use the Bash tool with run_in_background: true.
- Distinctive: line 253
After the dev server question is resolved, always generate CLAUDE.md without asking.
- Very specific: line 255
Follow the complete generate-claude-md skill from Step 1 through Step 6:
- Distinctive: line 258
Write CLAUDE.md to the project root, commit it
- Distinctive: line 268
Never overwrite files that already have meaningful content — check first with Read tool
- Distinctive: line 269
Always adapt component code to the detected UI library
- Distinctive: line 270
If i18n is detected, all user-facing strings must use translation keys (add keys to locale files too)
- Very specific: line 271
Create .env.example with all variables documented but empty values
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Scaffold App
You are a project scaffolding assistant. Your job is to generate the full production-ready app structure — folders, base components, routing, types, and environment setup — based on what the project already has installed.
Run this after /setup-project (or on any project where packages are already configured).
Step 1 — Detect Project Type
Check the current directory for:
next.config.*→ Next.jsvite.config.*→ React (Vite)app.jsonwithexpokey → React Native (Expo)android/+ios/without expo → React Native (CLI)
Step 2 — Detect Installed Packages
Read package.json (and package.json in the project root if monorepo). Build a profile:
UI_LIBRARY: heroui | shadcn | tailwind-only | none
STATE_MANAGER: redux | zustand | none
ROUTER: react-router | tanstack-router | expo-router | react-navigation | none
HTTP_CLIENT: tanstack-query+axios | axios | native-fetch | none
I18N: react-i18next | next-intl | i18next | none
AUTH: nextauth | jwt-custom | none
FORMS: react-hook-form | formik | none
ANIMATIONS: motion | noneDetect by checking dependencies and devDependencies for:
@heroui/react→ heroui@radix-ui/react-*orcomponents.jsonfile → shadcntailwindcsswithout above → tailwind-only@reduxjs/toolkit→ reduxzustand→ zustandreact-router-dom→ react-router@tanstack/router→ tanstack-routerexpo-router→ expo-router@react-navigation/native→ react-navigation@tanstack/react-query→ tanstack-queryaxios→ axiosnext-intl→ next-intlreact-i18next→ react-i18nextnext-auth→ nextauthreact-hook-form→ react-hook-formformik→ formikmotion→ motion
Step 3 — Confirm App Type
If coming from /create-frontend-project, the app type is already known — skip this question.
Otherwise ask:
"What kind of app is this? A) Dashboard / Admin app B) Landing / Marketing site C) Consumer app (user-facing, accounts) D) General purpose"
If Dashboard / Admin is selected, ask one more question:
"What layout style do you want for the dashboard? A) Sidebar navigation (left sidebar + main content area — most common for admin panels) B) Top navigation bar (sticky top nav + full-width content — cleaner for data-heavy apps)"
Store the answer as LAYOUT_STYLE: sidebar | topnav and use it in Step 5.
Step 4 — Read the Reference File
Based on project type + app type, read the reference file:
| Project Type | App Type | Reference File |
| React (Vite) | Dashboard / Consumer | ~/.claude/project-scaffolding/reference/scaffold/react-dashboard.md |
| React (Vite) | Landing / General | ~/.claude/project-scaffolding/reference/scaffold/react-landing.md |
| Next.js | Dashboard / Consumer | ~/.claude/project-scaffolding/reference/scaffold/nextjs-dashboard.md |
| Next.js | Landing / General | ~/.claude/project-scaffolding/reference/scaffold/nextjs-landing.md |
| React Native | Any | ~/.claude/project-scaffolding/reference/scaffold/react-native-app.md |
Read the file now with the Read tool before proceeding.
Step 5 — Execute the Scaffold
Follow the reference file exactly. For every file it specifies:
- Create the directory if it doesn't exist
- Write the file with the content from the reference
- Adapt component code to the detected package profile:
- If
heroui(React Vite only):- Wrap app with
HeroUIProviderinsrc/main.tsx(CRITICAL — React Vite only, required for HeroUI styles)import { HeroUIProvider } from '@heroui/react' // wrap: <HeroUIProvider><App /></HeroUIProvider> - Use HeroUI
Buttoninstead of plain<button>in layout/marketing components - Use HeroUI
Card,CardBodyfor feature cards and pricing cards - Use HeroUI
Navbar,NavbarBrand,NavbarContent,NavbarItemfor the site header
- Wrap app with
- If
heroui(Next.js):- HeroUI v3 has NO provider — do NOT add HeroUIProvider anywhere
- Import and use HeroUI components directly in client components (
'use client') - Use HeroUI
Button,Card,CardBody,Navbarcomponents directly
- If
shadcn: use shadcn/uiButton,Cardcomponents - If
tailwind-onlyornone: use plain HTML + Tailwind classes - If
redux: use Redux store patterns in auth/app hooks - If
zustand: use Zustand store patterns - If
react-hook-form: use RHF in form components - If
formik: use Formik in form components - If
i18ndetected (next-intl):- Use
t()for all user-visible strings - CRITICAL: Replace ALL
import Link from 'next/link'withimport { Link } from '@/i18n/navigation'— this makes every link locale-aware automatically (e.g. Arabic →/ar/about, English →/about) - CRITICAL: Replace ALL
import { useRouter } from 'next/navigation'withimport { useRouter } from '@/i18n/navigation' src/i18n/navigation.tsmust exist (created by next-intl setup step) — it exports locale-awareLink,useRouter,usePathname,redirect
- Use
- If
i18ndetected (react-i18next): uset()for all user-visible strings - If
ANIMATIONS: motionAND app type is Landing or Consumer:- React (Vite): Wrap key landing sections with
motion.divfrommotion/react— useinitial/whileInView/viewportfor scroll-triggered reveals. Apply to: Hero headline + subtext, Features section cards (stagger), Pricing section cards (stagger), CTA banner. Import pattern:import { motion } from 'motion/react' - Next.js: Create
src/components/ui/FadeIn.tsxas a'use client'wrapper (seereference/nextjs/motion.md). Wrap Hero, Features, Pricing, CTA sections with<FadeIn>in server page components. For stagger grids (feature cards, pricing cards), create a'use client'component that usesmotion.divwithvariants+staggerChildren. - Keep animations minimal: fade-in (opacity 0→1) + slide-up (y: 24→0), duration 0.4–0.5s, ease-out. CTA buttons get
whileHover={{ scale: 1.03 }}. - Never add animations if app type is Dashboard / Admin — even if
motionis installed.
- React (Vite): Wrap key landing sections with
- If
- If app type is Dashboard, apply the
LAYOUT_STYLEchoice:- If
LAYOUT_STYLE = sidebar:- Use
AppShellwith<Sidebar />on the left (default in reference) - If heroui: use the HeroUI Sidebar variant from the reference's "HeroUI Variants" section
- Use
- If
LAYOUT_STYLE = topnav:- Use
AppShellwith<TopNav />at the top (top nav variant from reference) - Replace
AppShell.tsxcontent with the top nav version - Create
TopNav.tsxinstead ofSidebar.tsx - If heroui: use the HeroUI TopNav variant from the reference's "HeroUI Variants" section
- Use
- If
- Skip files that duplicate what's already set up (e.g. if axios.ts already exists in
src/lib/, skip it)
Step 6 — Clean Up Vite Boilerplate
For React (Vite) projects, remove the default boilerplate:
- Delete
src/App.css(unless it has custom styles) - Clear
src/App.tsxcontent (replace with the router entry point from reference) - Keep
src/index.css(contains Tailwind imports) - Delete
public/vite.svgandsrc/assets/react.svgif unused
Step 7 — Commit
git add .
git commit -m "feat: scaffold app structure — folder layout, base components, routing, types"Step 8 — Optional Extras
After scaffolding is complete, ask:
"Want me to add any of these extras? (comma-separated or 'none')
- Skeleton loading components (recommended — prevents layout shift on data load)
- Toast notifications via sonner (recommended — user feedback for API calls)
- Error boundary (recommended — prevents full app crash from one component error)
- Dark mode toggle button
- None"
Then add what was selected on top of the already-scaffolded structure.
For heroui adaptation of selected extras:
- If skeleton extras selected: use HeroUI
Skeletoncomponent (from@heroui/react) instead of plain CSS pulse
Step 9 — All Done
After extras are handled (or skipped), print:
✅ All done!
Project: [project-name]/
App type: [Dashboard / Landing / Consumer]
Structure created:
src/
components/ — shared UI components
features/ — feature modules
hooks/ — custom hooks
utils/ — helpers (cn, formatDate, etc.)
types/ — shared TypeScript types
services/ — API layer
[store/] — state (if Redux/Zustand detected)
[i18n/] — translations (if i18n detected)
Commands:
yarn dev — start dev server
yarn build — production build
yarn preview — preview production build
[npx expo start] — React Native dev server
[If auth detected]:
Demo: admin@example.com / password
Start here:
src/features/ — add your first feature module
src/services/ — wire up your real API endpointsThen ask:
"Want me to start the dev server now? A) Yes — start it now (runs in the background, output will appear here) B) No — I'll run it myself"
If A — start it now:
Run the correct dev command for the project type in the background (so it doesn't block the conversation):
- React (Vite):
yarn dev(from the project directory) - Next.js:
yarn dev(from the project directory) - React Native (Expo):
npx expo start(from the project directory) - React Native (CLI):
npx react-native start(from the project directory)
Use the Bash tool with run_in_background: true. After launching, tell the user:
"Dev server started in the background. Open: http://localhost:5173 (Vite) or http://localhost:3000 (Next.js) Output will appear in this conversation when the server is ready."
If B — user runs it themselves:
Show the exact command to copy-paste:
"Run this in your terminal from the project directory:
cd [project-name] yarn dev ```"
Step 10 — Generate CLAUDE.md
After the dev server question is resolved, always generate CLAUDE.md without asking.
Follow the complete generate-claude-md skill from Step 1 through Step 6:
- The stack profile is already fully known from Step 2 of this scaffold flow — skip re-detection
- The app type is already known — pass it through directly
- Write
CLAUDE.mdto the project root, commit it
Tell the user after generating:
"Generated
CLAUDE.md— Claude will read this automatically at the start of every future session in this project. No need to explain the stack again."
Rules
- Never overwrite files that already have meaningful content — check first with Read tool
- Always adapt component code to the detected UI library
- If i18n is detected, all user-facing strings must use translation keys (add keys to locale files too)
- Create
.env.examplewith all variables documented but empty values - One commit at the end — not per file
- Tell the user what was created and the key files to start editing
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.

