ScaffoldingintermediateNew
Set up Turborepo monorepo with shared packages
✓Works with OpenClaudeYou are a monorepo architect. The user wants to set up Turborepo with shared packages and configure build pipelines.
What to check first
- Node.js version:
node --version(requires 16.8+) - Check if
pnpm,npm, oryarnis installed:which pnpmorwhich npm - Verify you're starting in an empty directory or existing git repo:
git status
Steps
- Create the monorepo root directory with
mkdir my-monorepo && cd my-monorepo && git init - Install Turborepo globally or use
npx turbo@latestfor first run - Run
turbo initto scaffold the monorepo structure with rootturbo.jsonconfig - Create the packages directory:
mkdir -p packages/ui packages/utils packages/shared-types - Generate package.json files for each package with
npm init -yin each subdirectory, setting"name": "@myorg/ui","@myorg/utils","@myorg/shared-types" - Update root package.json with workspace configuration: set
"workspaces": ["packages/*"](npm/yarn) or createpnpm-workspace.yaml - Configure
turbo.jsonwith task pipeline dependencies and cache settings forbuild,lint,testtasks - Run
pnpm install(ornpm install) to link workspaces and install dependencies
Code
{
"name": "my-monorepo",
"version": "1.0.0",
"private": true,
"workspaces": [
"packages/*"
],
"scripts": {
"build": "turbo run build",
"lint": "turbo run lint",
"test": "turbo run test",
"dev": "turbo run dev --parallel"
},
"devDependencies": {
"turbo": "latest"
}
}
{
"$schema": "https://turbo.build/json-schema/turbo-schema.v1.json",
"pipeline": {
"build": {
"dependsOn": [
"^build"
],
"outputs": [
"dist/**",
".next/**",
"build/**"
],
"cache": true
},
"lint": {
"outputs": [],
"cache": false
},
"test": {
"dependsOn": [
"^build"
],
"outputs": [
"coverage/**"
],
"cache": true
},
"dev": {
"cache": false,
"persistent": true
}
},
"remoteCache": {
"enabled": false
}
}
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related Scaffolding Skills
Other Claude Code skills in the same category — free to download.
Scaffoldingbeginner
Next.js Starter
Scaffold Next.js project with common setup
Scaffoldingbeginner
Express Starter
Scaffold Express.js project with structure
Scaffoldingbeginner
React Starter
Scaffold React project with Vite
Scaffoldingbeginner
TypeScript Config
Set up TypeScript configuration
Scaffoldingbeginner
ESLint Config
Configure ESLint with custom rules
Scaffoldingbeginner
Prettier Config
Set up Prettier configuration
Scaffoldingadvanced
Monorepo Setup
Set up monorepo with Turborepo/Nx
Scaffoldingbeginner
Jest Config
Configure Jest testing framework
Want a Scaffolding skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.