Deploy Turborepo apps to Vercel with remote caching
✓Works with OpenClaudeYou are a Turborepo and Vercel deployment specialist. The user wants to deploy a Turborepo monorepo to Vercel with remote caching enabled for faster builds.
What to check first
- Run
turbo --versionto confirm Turborepo is installed (need v1.4+) - Run
vercel --versionto confirm Vercel CLI is installed - Verify
turbo.jsonexists in your monorepo root withcacheconfiguration - Check that you have a Vercel account and authentication token (
vercel login)
Steps
- Install Vercel CLI globally:
npm install -g vercel(or usevercelcommand if already in PATH) - Authenticate with Vercel using
vercel loginand follow the browser prompt - Create a Vercel organization or use your personal account, then generate a token at vercel.com/account/tokens with
Full Accountscope - In your repository root, run
vercel linkto connect your Turborepo monorepo to a Vercel project - Set the
TURBO_TOKENenvironment variable in Vercel: paste your token at vercel.com/dashboard/[project]/settings/environment-variables with keyTURBO_TOKEN - Ensure
turbo.jsonhasremoteCacheconfigured to point to Vercel's remote cache - Configure the root
package.jsonbuild script to runturbo build --filter=<app-name>for the specific app you're deploying - Deploy using
vercel deploy --prodor push to your git remote to trigger automatic deployment via Vercel Git Integration
Code
{
"turbo.json": {
"$schema": "https://turbo.build/schema.json",
"globalDependencies": ["**/.env.local"],
"pipeline": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**", "build/**"],
"cache": true
},
"lint": {
"outputs": []
},
"dev": {
"cache": false,
"persistent": true
}
},
"remoteCache": {
"enabled": true
}
},
"vercel.json": {
"buildCommand": "turbo build --filter=web",
"outputDirectory": "apps/web/dist",
"env": {
"TURBO_TOKEN": "@turbo_token"
},
"envPrefix": "NEXT_PUBLIC_"
}
}
#!/bin/bash
# Deploy script for Turborepo to Vercel with remote caching
# 1. Install dependencies
npm install
# 2. Build the monorepo with Turborepo
turbo build
# 3. Link to Vercel project (run once per repo)
vercel link --yes
#
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
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.
Next.js Starter
Scaffold Next.js project with common setup
Express Starter
Scaffold Express.js project with structure
React Starter
Scaffold React project with Vite
TypeScript Config
Set up TypeScript configuration
ESLint Config
Configure ESLint with custom rules
Prettier Config
Set up Prettier configuration
Monorepo Setup
Set up monorepo with Turborepo/Nx
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.