一键导入
create-a-new-monorepo
Use when creating a new TypeScript monorepo, initializing a fresh workspace, or bootstrapping apps and packages from an empty directory
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when creating a new TypeScript monorepo, initializing a fresh workspace, or bootstrapping apps and packages from an empty directory
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when testing, validating, pressure-testing, or iterating an agent skill by having subagents use it
Use when creating, editing, reviewing, or testing agent skills, skill repositories, SKILL.md files, bootstrap skills, or skill discovery rules
Use when adding backend feature modules, creating tRPC routers, writing Drizzle adapters, defining domain ports or services, or diagnosing backend layer-boundary issues
Use when cleaning, deleting, pruning, or removing files from the repository root `.handoff/` directory
Use when adding a new React TypeScript frontend app to an existing pnpm monorepo or wiring a new app to package/ui
Use when code reads process.env directly, .env loading is requested, dotenv.config() appears, APP_* prefixes differ across dev/server, env examples drift, or startup config validation is missing
| name | create-a-new-monorepo |
| description | Use when creating a new TypeScript monorepo, initializing a fresh workspace, or bootstrapping apps and packages from an empty directory |
Use this skill when the user asks to create a new monorepo, initialize a fresh workspace, scaffold a repository, or set up a TypeScript monorepo foundation.
Do not use it for adding packages to an existing monorepo, migrating an existing repository, or changing a non-empty project. Stop instead when the target directory is not empty, except for a directory that contains only .git and has no commits.
Do not create project files until the user has chosen the target location and visibility, the target directory has passed the empty-directory check, and the generated project can keep one root ESLint configuration for the whole repository.
Ask the user these blocking questions before editing files:
If the user has already answered any of these in the same request, reuse that answer and ask only for missing decisions.
.git, verify that repository has no commits before continuing..git does not exist, initialize the repository with master as the initial branch..git already exists and has no commits, set HEAD to refs/heads/master.pnpm for every package operation and generated script. The only scaffold CLI exception is the required AI Elements full install command, which uses npx ai-elements@latest after shadcn/ui is fully installed.apps/.gitkeeppackage/.gitkeeppnpm-workspace.yamlpackage.jsonturbo.jsontsconfig.json.gitignorepackage/ui:
components.json aliases, and package exports, using package/ui instead of the official packages/ui path.package/ui, not packages/ui, as the shared UI package location.@workspace/ui unless the user explicitly chose a different workspace scope.#components, #hooks, and #lib imports../globals.css, ./components/*, ./hooks/*, and ./lib/* for app workspaces.components.json for Tailwind CSS v4.package/ui file listed in reference.md before installing dependencies.package/ui:
.storybook/main.ts and .storybook/preview.ts.package/ui/components.json.@storybook registry from reference.md unless the user asks for the Base UI registry.lint backed by the single root ESLint config so an empty scaffold still lints real files.@antfu/eslint-config.lefthook.yml.commitlint.config.mjs.package/ui manifests from reference.md, then run dependency install commands in reference order:
pnpm add -wD ....pnpm --filter @workspace/ui ....pnpm install.package/ui in this exact order:
package/ui before running any shadcn, Storybook registry, or AI Elements CLI command.pnpm dlx shadcn@latest add --all.package/ui/src/components/ui.pnpm dlx shadcn@latest add @storybook/all-stories.npx ai-elements@latest.package/ui/src/components/ai-elements, not under an app workspace.pnpm.The generated root eslint.config.mjs must follow the current @antfu/eslint-config flat-config pattern and include:
typescript: truereact: trueUse the exact ignore list and rule overrides from reference.md.
.git repository.npm, yarn, or npx for package operations or shadcn commands; npx ai-elements@latest is the only allowed npx use.apps or package/* workspaces by default.@antfu/eslint-config.pnpm setup and a lint job.packages/ui instead of the required package/ui path.-w, which fails at the workspace root.components.json aliases and package exports that route app imports through @workspace/ui.package/ui.@storybook/all-stories collection.@storybook/nextjs-vite to satisfy generated Storybook stories instead of normalizing them for React Vite.package/ui workspace.package/ui/package.json while skipping the source files, styles, or Storybook files listed in reference.md.Prompt: "Create a new monorepo here with pnpm, Turbo, Antfu ESLint, hooks, shared shadcn UI, Storybook, AI Elements, and lint CI."
Baseline failure: The agent immediately writes project files into the current non-empty directory, uses whatever default branch git chooses, installs with npm, spreads ESLint settings across packages, creates packages/ui instead of package/ui, installs root dependencies without -w, installs one sample shadcn component and one Storybook story, runs AI Elements before shadcn is complete or into an app-local directory, omits registry setup, and skips asking whether the repo is private or open source.
Expected behavior: The agent asks for the target location and visibility first, stops on any non-empty target except an unborn .git repository, ensures the git branch is master, uses pnpm, creates one root ESLint config, adds Turborepo, hooks, commitlint, .gitignore, apps, package/ui with shadcn monorepo aliases, Storybook, the shadcn Storybook registry, lint CI, the full shared shadcn/ui component set, the full Storybook stories collection, and the full AI Elements set in the shared UI workspace, then verifies with evidence.
Pass criteria:
pnpm.package/ui with shadcn monorepo aliases and exports.pnpm add -wD.package/ui.package/ui/src/components/ui.@storybook shadcn registry namespace are configured for the UI package.@storybook/all-stories collection is installed into the UI package.Before finishing:
master.apps/.gitkeep, and package/ui exist.pnpm install completed.pnpm lint, pnpm typecheck, and any repository validation command that exists.package/ui source, style, and Storybook file listed in reference.md exists.package/ui/components.json defines shadcn aliases and the @storybook registry.package/ui/package.json exports shared UI entrypoints and includes Storybook scripts.package/ui/src/components/ui, including representative files such as button.tsx, dialog.tsx, field.tsx, and table.tsx.@storybook/all-stories exist in the UI package, including multiple generated *.stories.tsx files rather than a single sample story.next/image or @storybook/nextjs-vite.package/ui/src/components/ai-elements, including multiple generated component files rather than a placeholder directory.pnpm --filter @workspace/ui typecheck and pnpm --filter @workspace/ui build-storybook.pnpm lint.reference.md for starter file contents and required ESLint, Lefthook, Commitlint, gitignore, and GitHub Actions templates.