skills/scaffold-nextjs/SKILL.md
Scaffolds a production-ready Next.js turborepo end to end. Runs create-next-app with TypeScript, Tailwind CSS, and React Compiler, sets up shadcn/ui with Blode UI components from the ui.blode.co registry, blode-icons-react icons, Agentation, and Ultracite (Oxlint, Oxfmt, Lefthook), converts the app into a turborepo, then creates the GitHub repo and deploys to Vercel with a pre-launch checklist. Use when creating a new Next.js app, bootstrapping a turborepo, scaffolding a web project, starting a new website or marketing site, or asking "create a Next.js project", "set up a turborepo", or "start a new web app". For a TypeScript CLI or npm package, use scaffold-cli. For folder structure and module contracts in an existing app, use define-architecture. For visual direction, palettes, and theming, use ui-design.
npx skillsauth add mblode/agent-skills scaffold-nextjsInstall 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.
Scaffold a Next.js turborepo with full tooling, GitHub, and Vercel deployment.
scaffold-cli), designing folder structure or module contracts for an existing app (use define-architecture), or choosing visual direction and palettes (use ui-design).This is a low-freedom workflow. Commands live in the reference files and are exact: run them as written, in phase order. The reference files are the single source of truth for commands; do not reconstruct them from memory.
| File | Read When |
|------|-----------|
| references/app-setup.md | Starting Phase 2: create-next-app flags, shadcn + Blode registry setup, Agentation, Ultracite commands, and the move into apps/web/ |
| references/turbo-configs.md | Starting Phase 6: root package.json, turbo.json, .gitignore, knip.json, workspace scripts, next.config.ts |
| references/deploy-and-launch.md | Starting Phase 7: GitHub setup, Vercel deployment, favicon, OG images, validation checklist |
Copy this checklist to track progress:
Scaffold progress:
- [ ] Phase 1: Gather project info
- [ ] Phase 2: Create Next.js app
- [ ] Phase 3: Install Blode UI components
- [ ] Phase 4: Install Agentation
- [ ] Phase 5: Install Ultracite
- [ ] Phase 6: Convert to Turborepo
- [ ] Phase 7: GitHub and Vercel setup
- [ ] Phase 8: Pre-launch checklist
- [ ] Validation: run the checklist in deploy-and-launch.md
Collect from the user (ask only what was not provided):
| Variable | Example | Default | Used in |
|----------|---------|---------|---------|
| {{name}} | acme-web | none (required) | Root package.json, directory name, README |
| {{description}} | Marketing site for Acme | none (required) | App package.json, README |
| {{repo}} | acme-corp/acme-web | none (required) | GitHub remote URL |
| {{domain}} | acme.com | none (ask if missing) | Vercel custom domain, metadataBase |
| {{author}} | Your Name | none (required) | package.json author |
| {{year}} | 2026 | current year | LICENSE |
Load references/app-setup.md and run the create-next-app command exactly as written there (it pins the linter, React Compiler, and package-manager flags). Confirm the app loads at http://localhost:3000 before moving on.
Follow the Blode UI section in references/app-setup.md: shadcn init, then register the @blode namespace, then add components. Registration must come before any add @blode/... call. Always use blode-icons-react for icon imports (never lucide-react).
Follow the Agentation section in references/app-setup.md: install the package and patch app/layout.tsx with the dev-only <Agentation /> guard. Optionally add Google Analytics via @next/third-parties.
Follow the Ultracite section in references/app-setup.md: delete the Biome placeholder config, run ultracite init with the exact flags listed, then verify with npx ultracite fix and npx ultracite check.
Move the app into apps/web/ (commands at the end of references/app-setup.md), then load references/turbo-configs.md and:
package.json, turbo.json, knip.json, and .gitignore from the templates.apps/web/package.json scripts to the turbo-compatible block in the reference.apps/web/next.config.ts has reactCompiler: true.npm install from the root.npm run dev works from the root (turbo runs apps/web).Load references/deploy-and-launch.md. Create the GitHub repo with gh, deploy to Vercel, and attach {{domain}}.
Follow the favicon and OG image steps in references/deploy-and-launch.md, then run the validation checklist at the end of that file. The scaffold is done only when every validation item passes; "the site loads" is not sufficient evidence.
All templates use {{variable}} syntax. Before Phase 7, sweep for missed placeholders:
grep -rn '{{' --include='*.json' --include='*.ts' --include='*.tsx' --include='*.md' .
A {{name}} left in package.json makes npm install fail with an invalid-name error; a {{domain}} left in metadata ships broken OG URLs.
src/ directory. The scaffold uses --no-src-dir; introducing src/ later breaks the @/* alias and every shadcn component path..eslintrc makes the editor disagree with the lefthook pre-commit hook.oxlint or oxfmt ad hoc; use npx ultracite fix / npx ultracite check (or npm run fix / npm run check at the root) so config resolution matches the hook. The oxlint . / oxfmt . scripts inside apps/web/package.json exist only so turbo can orchestrate per-workspace tasks.ultracite init writes lefthook.yml and a prepare: lefthook install script; adding husky or another hook manager double-runs or skips fixes.package.json. The root holds only turbo and ultracite; app deps at the root break workspace isolation and turbo cache keys.npx shadcn@latest add @blode/... before npx shadcn@latest registry add @blode=.... The unregistered namespace makes the add command fail.lucide-react. blode-icons-react is the icon library for Blode UI; mixed imports bundle two icon sets. Replace any generated lucide-react import paths.apps/web/ by hand. Scaffold at the root first, then move it in Phase 6; hand-building skips create-next-app defaults (Tailwind wiring, alias config).apps/web in Settings > General.| When | Run |
|------|-----|
| After deployment, optimise SEO | optimise-seo |
| Before launch, audit UI quality | ui-audit |
| Before launch, add motion and animation | ui-animation |
development
Designs and builds UI end to end, from visual direction (palettes, type scales, design tokens, layout systems, landing-page CRO strategy, brand kits) to Tailwind implementation with the ui.sh design guideline system, including multiple variants with an in-browser picker, semantic markup scaffolds from screenshots, retrofitting dark mode or responsive behavior, and componentizing or canonicalizing Tailwind code. Use when asked to "build a landing page", "create a dashboard", "make this look good", "make this look premium", "pick a visual style", "design the UI for", "show me 3 hero options", "improve conversions", "create a brand kit", "turn this screenshot into markup", "add dark mode", "make a dark version of this image", "make this responsive", "fix this on mobile", "componentize this page", "clean up the Tailwind", or any prompt that designs, creates, or refines UI code. For auditing existing UI use ui-audit; for motion use ui-animation; for landing page copy use copywriting.
development
Collaborative interrogation that produces an implementation plan before any code is written. Explores the codebase and relevant docs first, asks one question at a time with a concrete recommended answer, grills the rationale behind documented decisions, flags fuzzy terminology, and walks a decision tree until shared understanding is reached, then writes a plan file. First step of the shipping pipeline; it creates plans, plan-reviewer stress-tests them, pr-creator opens the PR. Use when asked to "create a plan", "help me think through this", "plan this feature", "I want to build X", "grill me", "grill with docs", "understand the docs", "unpack the decisions", "brainstorm a spec", "what should the plan be", "think this through with me", or before starting any non-trivial implementation.
development
--- name: pr-reviewer description: Reviews the current local diff or branch and returns a read-only, severity-tiered findings report. It never edits files. Four modes: standard bug and compliance review, structural quality, AI slop detection, and whole-codebase security audit. Use when asked to run /pr-reviewer, "review my changes", or "code review" before commit, push, or handoff. "Thermo-nuclear review", "structural review", "deep code quality audit", "harsh maintainability review", and "code
development
--- name: ux-audit description: Feature-level UX audit for React/Next.js code, diff-aware by default. Catches what Lighthouse, axe, ESLint, and Storybook miss: state-coverage gaps (missing loading/empty/error), form data loss on validation, double-submit, broken focus management, optimistic UI without rollback, stale async responses, skeleton-induced layout shift, and vague microcopy. 33 modern failure-mode rules plus 30 Laws of UX rules across 12 feature playbooks. Produces a 3-tier ship-readin