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 brand-new Next.js app, bootstrapping a turborepo, scaffolding a web project, starting a new repo for a 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 building a page inside an existing app, 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), building a page inside an existing app, or choosing visual direction and palettes (use ui-design).Low-freedom workflow. The reference files are the single source of truth for commands: run them as written, in phase order. Do not reconstruct commands from memory.
| File | Read When |
|------|-----------|
| references/app-setup.md | Phase 2: create-next-app flags, shadcn + Blode registry, Agentation, Ultracite, move into apps/web/ |
| references/turbo-configs.md | Phase 6: root package.json, turbo.json, .gitignore, knip.json, workspace scripts, next.config.ts |
| references/deploy-and-launch.md | Phase 7: GitHub, Vercel, 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 for what is missing):
| 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 |
Run the create-next-app command from references/app-setup.md exactly as written (it pins linter, React Compiler, and package-manager flags). Confirm the app loads at http://localhost:3000 before continuing.
Blode UI section of references/app-setup.md: shadcn init, register the @blode namespace, then add components.
Agentation section of references/app-setup.md: install the package, patch app/layout.tsx with the dev-only <Agentation /> guard. Optionally add Google Analytics via @next/third-parties.
Ultracite section of 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 from references/turbo-configs.md:
package.json, turbo.json, knip.json, and .gitignore from the templates.apps/web/package.json scripts to the turbo-compatible block.apps/web/next.config.ts has reactCompiler: true.npm install from the root.npm run dev works from the root (turbo runs apps/web).From references/deploy-and-launch.md: create the GitHub repo with gh, deploy to Vercel, attach {{domain}}.
Favicon and OG image steps in references/deploy-and-launch.md, then run the validation checklist at the end of that file. Done only when every validation item passes; "the site loads" is not sufficient evidence.
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 fails npm install (invalid-name error); a {{domain}} left in metadata ships broken OG URLs.
src/ directory. The scaffold uses --no-src-dir; adding 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 root npm run fix / npm run check) so config resolution matches the hook. The oxlint . / oxfmt . scripts in apps/web/package.json exist only for turbo's per-workspace orchestration.ultracite init writes lefthook.yml and a prepare: lefthook install script; husky or another hook manager double-runs or skips fixes.package.json (root holds only turbo and ultracite); they 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 fail.lucide-react; blode-icons-react is Blode UI's icon library and 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
Fans out four concurrent review agents over the current diff, then APPLIES fixes directly to the working tree and verifies the build. Mutates code; it does not produce a report. Covers reuse (duplicate logic, hand-rolled stdlib, reinvented platform features), quality (hacky patterns, React/TypeScript hygiene, over-memoisation, exhaustive-deps, `any`, dead code, `CLAUDE.md`/`AGENTS.md` violations), efficiency (unnecessary work, missed concurrency, hot-path bloat), and test discipline (bug fixes without a repro test, useless tests to delete, missing tests only when they prevent a named failure). Use when the user says "tidy this up", "simplify", "clean up this diff", "polish my changes", "check for duplication", or "any reuse opportunities?", i.e. when the intent is to have the changes made automatically. For a read-only report that lists findings without touching files, use `pr-reviewer` instead. This skill edits code; for the PR's title, description, or commit history, use `pr-creator`.
development
Decides what an interface should do before UI is built or audited: interaction choice, action scope and consequence, reachable states, resilience, and accessibility as task completion. Works from a brief, spec, mockup, intent, or existing UI. Use when asked "is this the right interaction", "design the flow", "what control should this use", "what should this action affect", "which states should this have", "make this resilient", or "what breaks here". For building or styling use ui-design; for built-code audits use ui-audit; for copy wording use copywriting.
development
Builds and stress-tests implementation plans in two modes. Create mode scans code and docs, asks one question at a time with a recommended answer, runs a blindspot pass when the user is new to the area, then writes a plan file. Review mode scores completeness, feasibility, scope, testability, risk, and assumptions, verifies checkable claims, and writes resolutions back until every dimension reaches 5/5. Use when asked to "create a plan", "plan this feature", "I want to build X", "grill me", "think this through", "blindspot pass", "unknown unknowns", "this is new to me", "review my plan", "rubber duck this", "stress test this plan", "is this plan ready", "get this plan to 5/5", "what am I missing", "verify this claim", "prove this plan", "fact-check this plan", or when the user explicitly wants a plan artifact before implementation. For code review use pr-reviewer; for architecture briefs use define-architecture.
tools
Audits the smallest relevant developer-facing surface of a library, CLI, SDK, or npm package across API contracts, errors, CLI behavior, public types, onboarding, and config. Uses candidate-first rule loading, bounded local evidence, and compact root-cause findings. Use when asked to "audit my CLI", "make this CLI agent-friendly", "is this API ergonomic", "review the developer experience", "improve these errors", "simplify first run", or "review my SDK". For end-user UI use ui-audit, for agentic-app trust use ax-audit, for docs prose use docs-writing, for README work use readme-creator, and for repo architecture use define-architecture. Inside a product that also ships a UI, this is the skill for the developer-facing half, so pick it when the complaint is about an import, command, error string, exported type, or config rather than a screen.