From create-new-project
One-shot scaffold for a new cross-platform product — Next.js + shadcn/ui (web) and/or Expo + NativeWind v5 + react-native-reusables + @expo/ui (mobile), wired into a single pnpm monorepo. The agent orchestrates questions and environment checks; everything file-level is vendored as templates + scripts so runs are deterministic.
How this skill is triggered — by the user, by Claude, or both
Slash command
/create-new-project:create-new-projectThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Scaffold a Next.js + shadcn monorepo, an Expo mobile app, and a design-system viewer — together or individually — with one shell command.
scripts/bootstrap.mjsscripts/install-mobile-templates.mjsscripts/patch-design-system.mjsscripts/patch-root-package.mjsscripts/patch-ui-globals.mjsscripts/sync-mobile-tokens.mjstemplates/mobile/app/(tabs)/_layout.tsxtemplates/mobile/app/(tabs)/explore.tsxtemplates/mobile/app/(tabs)/index.tsxtemplates/mobile/app/(tabs)/settings.tsxtemplates/mobile/app/_layout.tsxtemplates/mobile/components.jsontemplates/mobile/lib/utils.tstemplates/mobile/metro.config.jstemplates/mobile/postcss.config.mjstemplates/mobile/tsconfig.jsontemplates/mobile/tw/index.tsxtemplates/root/tsconfig.base.jsontemplates/shared/package.jsontemplates/shared/src/index.tsScaffold a Next.js + shadcn monorepo, an Expo mobile app, and a design-system viewer — together or individually — with one shell command.
Use when the user wants to start a new project — a marketing site, a mobile app, or both. Default is both (the primary use case).
Every deterministic file write is in templates/ and every deterministic transform is in scripts/. The agent's job is narrow:
scripts/bootstrap.mjs with the answers.Do NOT copy template content into prose and ask the model to reproduce it — that reintroduces drift. If a new template file is needed, add it under templates/ and extend bootstrap.mjs.
IMPORTANT: Gather all inputs through the host agent's interactive user-input mechanism. Ask one question at a time and wait for the user's answer before continuing. In Claude Code, use AskUserQuestion. In Codex, use the available user-input flow when present; otherwise ask one concise question in chat and wait for the reply.
Not required to run, but worth reading for context on what the mobile templates assume:
expo-tailwind-setup — NativeWind v5 + Tailwind v4 CSS-first recipereact-native-reusables — shadcn-philosophy components for React Nativeexpo-ui-swiftui / expo-ui-jetpack-compose — native primitivesbuilding-native-ui — Expo Router conventionsnative-data-fetching — use expo/fetch over axiosRun these checks in parallel and collect failures into a single report. Don't proceed until all pass. These are required for every path (web, mobile, both), so we run them before asking the user anything — a failure here is a blocker regardless of platform.
command -v pnpm && pnpm --version — need pnpm 10.x. Fix: corepack enable && corepack prepare pnpm@10 --activatecommand -v gh — needed to clone the design-system viewer. Fix: brew install ghnode -v — Node 20+. Fix: brew install node@20 or nvmcommand -v git — Fix: xcode-select --installIf ANY check fails: stop, report ALL failures in a single block, give each fix command, tell the user to re-run the skill once fixed.
Ask in order (skip a question if the value was already provided in the skill invocation args):
my-appBoth (recommended) / Web only / Mobile onlyhttps://ui.shadcn.com/create?preset=... URL (extract the ID), or press enter for the default (b0)~/Projects/ exists, default to it without asking. Otherwise ask.If the user's preset input looks malformed (non-alphanumeric, whitespace, etc.), confirm once through the host agent's user-input mechanism before proceeding — don't silently guess.
Only run if the user chose Both or Mobile only in Step 1. Skip entirely on Web only — there's no reason to fail a web-only scaffold on missing Xcode.
xcode-select -p — must print a path. Fix: install Xcode from the App Store, then sudo xcode-select --install.xcodebuild -version — extract Xcode's major.minor (e.g. 26.4).xcrun simctl list runtimes -j — parse JSON; require a runtime whose version matches Xcode's exact major.minor. Near-misses fail xcodebuild later with Unable to find a destination. Fix: xcodebuild -downloadPlatform iOS (~8 GB, 15–20 min).xcrun simctl list devices available -j — require at least one device on the matching runtime.If any of these fail: stop, report all failures, tell the user to re-run once fixed. Don't start scaffolding mobile with a known-broken iOS toolchain.
Run:
node "$SKILL_DIR/scripts/bootstrap.mjs" \
--name "<name>" \
--parent "<parent>" \
--platform both|web|mobile \
--preset "<preset-id>"
Where $SKILL_DIR is this skill's base directory (the one containing SKILL.md). The script:
pnpm dlx shadcn init --monorepo (web + packages/ui + turbo.json)apps/design-system/patch-design-system.mjs (style sync, font sync, 2s dev delay)templates/mobile/* onto apps/mobile/ via install-mobile-templates.mjs.npmrc + tsconfig.base.json from templates/root/packages/shared/ placeholderscripts/sync-mobile-tokens.mjs into the projectpackage.json (dev scripts + pnpm overrides) via patch-root-package.mjspnpm install, pnpm sync:tokens (generates mobile global.css)git init + first commitStream the script's output. If it errors, surface the last ~50 lines.
Show the user:
packages/ui/src/components/*.tsx, mobile: apps/mobile/components/ui/*.tsx)npx expo run:ios inside apps/mobile/ — @expo/ui needs a custom dev client and won't work in Expo Go. After that, pnpm dev from the repo root starts everything (web + mobile + design-system) with mobile attached to the built dev client.pnpm dev:web / pnpm dev:design-system for solo runs.skills/create-new-project/
├── SKILL.md ← this file (thin orchestration layer)
├── scripts/
│ ├── bootstrap.mjs ← main orchestrator (shell + node, no agent-generated files)
│ ├── patch-root-package.mjs
│ ├── patch-design-system.mjs
│ ├── install-mobile-templates.mjs
│ └── sync-mobile-tokens.mjs ← also vendored into the scaffolded project
└── templates/
├── root/ ← .npmrc, tsconfig.base.json
├── shared/ ← packages/shared placeholder
└── mobile/
├── postcss.config.mjs
├── components.json
├── tsconfig.json
├── metro.config.js
├── lib/utils.ts
├── tw/index.tsx ← uses styled() from react-native-css
└── app/
├── _layout.tsx ← OS-driven dark mode, PortalHost
└── (tabs)/
├── _layout.tsx ← NativeTabs (liquid glass on iOS 26+)
├── index.tsx ← Home: pure @expo/ui SwiftUI primitives
├── explore.tsx ← Browse: Card feed with lucide icons
└── settings.tsx ← iOS-style grouped rows
Note: templates/mobile/components/ui/ intentionally does NOT contain text.tsx / button.tsx. The reusables CLI's bulk install (yes | npx @react-native-reusables/cli add -a -y -o) writes canonical versions of these files directly, and layering our stubs on top has historically been a drift source. Everything else in templates/mobile/ overlays cleanly.
pnpm.overrides + packageExtensions + .npmrc shamefully-hoist=true are all required. patch-root-package.mjs + templates/root/.npmrc handle this.[email protected] + react-native-css@^3.0.7. If text renders invisible on first launch, import Text from react-native directly and use inline style for colors (workaround only).@expo/ui + Expo Go: incompatible. First mobile run must be npx expo run:ios (not expo start). For subsequent pnpm dev runs, mobile's dev script uses expo start --ios --dev-client — the --dev-client flag is critical; plain --ios tries to open the Expo Go URL scheme and fails.lucide-react-native under pnpm strict hoisting: installed explicitly in bootstrap because the reusables CLI doesn't always land it in apps/mobile/node_modules. Without the explicit install, Metro's first bundle fails to resolve lucide-react-native.patch-design-system.mjs adds a 2s sleep to design-system's dev script so web always claims the lowest free port first. Don't pin explicit ports — users often have other projects holding 3000/3001.X.Y requires iOS X.Y simulator runtime, not just X.*. Preflight checks this.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub addisonk/create-new-project --plugin create-new-project