Index of every page on this site: llms.txt
All skills
vercel avatar

/bootstrap

@250769d official
by vercelvercel/vercel-plugin340 stars
82
Run it yourself

Project bootstrapping orchestrator for repos that depend on Vercel-linked resources (databases, auth, and managed integrations). Use when setting up or repairing a repository so linking, environment provisioning, env pulls, and first-run db/dev commands happen in the correct safe order.

Use this Skill: https://skilld.dev/gh/vercel/vercel-plugin/bootstrap

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈75 tokens for metadata: the name and description. ≈1.7k when used: this file.

Description uses 3.7% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈299 characters, or 3.7%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Project Bootstrap Orchestrator

Execute bootstrap in strict order. Do not run migrations or development server until project linking and environment verification are complete.

Rules

  • Do not run db:push, db:migrate, db:seed, or dev until Vercel linking is complete and env keys are verified.
  • Prefer Vercel-managed provisioning (vercel integration ...) for shared resources.
  • Use provider CLIs only as fallback when Vercel integration flow is unavailable.
  • Never echo secret values in terminal output, logs, or summaries.

Preflight

  1. Confirm Vercel CLI is installed and authenticated.
vercel --version
vercel whoami
  1. Confirm repo linkage by checking .vercel/project.json.
  2. If not linked, inspect available teams/projects before asking the user to choose:
vercel teams ls
vercel projects ls --scope <team>
vercel link --yes --scope <team> --project <project>
  1. Find the env template in priority order: .env.example, .env.sample, .env.template.
  2. Create local env file if missing:
cp .env.example .env.local

Resource Setup: Postgres

Prisma ORM projects

If the repo has prisma/schema.prisma, provision Prisma Postgres with these steps instead of the preferred path below:

vercel integration guide prisma
vercel integration add prisma --scope <team>

It sets DATABASE_URL to the direct connection string and DATABASE_URL_POOLED to the pooled one. Then verify and pull env vars as in step 3 of the preferred path below. For production traffic from Vercel Functions, read DATABASE_URL_POOLED and fall back to DATABASE_URL. Keep DATABASE_URL for Prisma CLI commands such as migrations, the Prisma Postgres serverless driver (@prisma/adapter-ppg or @prisma/ppg), session-dependent work such as LISTEN/NOTIFY, and queries that run longer than 10 minutes. If the project has no DATABASE_URL_POOLED, its database was created before October 29, 2026: add the variable as described in the vercel-storage skill.

Preferred path (Vercel-managed Neon)

  1. Read integration setup guidance:
vercel integration guide neon
  1. Add Neon integration to the Vercel scope:
vercel integration add neon --scope <team>
  1. Verify expected environment variable names exist in Vercel and pull locally:
vercel env ls
vercel env pull .env.local --yes

Fallback path 1 (Dashboard)

  1. Provision Neon through the Vercel dashboard integration UI.
  2. Re-run vercel env pull .env.local --yes.

Fallback path 2 (Neon CLI)

Use Neon CLI only when Vercel-managed provisioning is unavailable. After creating resources, add required env vars in Vercel and pull again.

AUTH_SECRET Generation

Generate a high-entropy secret without printing it, then store it in Vercel and refresh local env:

AUTH_SECRET="$(node -e "console.log(require('node:crypto').randomBytes(32).toString('base64url'))")"
printf "%s" "$AUTH_SECRET" | vercel env add AUTH_SECRET production,preview
printf "%s" "$AUTH_SECRET" | vercel env add AUTH_SECRET development  # separate command: development-only adds default to Config
unset AUTH_SECRET
vercel env pull .env.local --yes

Env Verification

Compare required keys from template file against .env.local keys (names only, never values):

template_file=""
for candidate in .env.example .env.sample .env.template; do
  if [ -f "$candidate" ]; then
    template_file="$candidate"
    break
  fi
done

comm -23 \
  <(grep -E '^[A-Za-z_][A-Za-z0-9_]*=' "$template_file" | cut -d '=' -f 1 | sort -u) \
  <(grep -E '^[A-Za-z_][A-Za-z0-9_]*=' .env.local | cut -d '=' -f 1 | sort -u)

Proceed only when missing key list is empty.

App Setup

After linkage + env verification:

npm run db:push
npm run db:seed
npm run dev

Use the repository package manager (npm, pnpm, bun, or yarn) and run only scripts that exist in package.json.

UI Baseline for Next.js + shadcn Projects

After linkage and env verification, establish the UI foundation before feature work:

  1. Add a baseline primitive set: npx shadcn@latest add button card input label textarea select switch tabs dialog alert-dialog sheet dropdown-menu badge separator skeleton table
  2. Apply the Geist font fix in layout.tsx and globals.css.
  3. Confirm the app shell uses bg-background text-foreground.
  4. Default to dark mode for product, admin, and AI apps unless the repo is clearly marketing-first.

Bootstrap Verification

Confirm each checkpoint:

  • vercel whoami succeeds.
  • .vercel/project.json exists and matches chosen project.
  • Postgres integration path completed (Vercel integration, dashboard, or provider CLI fallback).
  • vercel env pull .env.local --yes succeeds.
  • Required env key diff is empty.
  • Database command status is recorded (db:push, db:seed, db:migrate, db:generate as applicable).
  • dev command starts without immediate config/auth/env failure.

If verification fails, stop and report exact failing step plus remediation.

Summary Format

Return a final bootstrap summary in this format:

## Bootstrap Result
- **Linked Project**: <team>/<project>
- **Resource Path**: vercel-integration-prisma | vercel-integration-neon | dashboard-neon | neon-cli
- **Env Keys**: <count> required, <count> present, <count> missing
- **Secrets**: AUTH_SECRET set in Vercel (value never shown)
- **Migration Status**: not-run | success | failed (<step>)
- **Dev Result**: not-run | started | failed

Bootstrap Next Steps

  • If env keys are still missing, add the missing keys in Vercel and re-run vercel env pull .env.local --yes.
  • If DB commands fail, fix connectivity/schema issues and re-run only the failed db step.
  • If dev fails, resolve runtime errors, then restart with your package manager's run dev.

next-forge Projects

If the project was scaffolded with npx next-forge init (detected by packages/auth + packages/database + @repo/* imports; package manager is chosen at init):

  1. Env files are per-app (apps/app/.env.local, apps/web/.env.local, apps/api/.env.local) plus packages/database/.env.
  2. Run the migrate script with the repo's package manager (not db:push) — it runs prisma format + prisma generate + prisma migrate dev and prompts for a migration name.
  3. Minimum env vars: DATABASE_URL, NEXT_PUBLIC_APP_URL, NEXT_PUBLIC_WEB_URL, NEXT_PUBLIC_API_URL (URLs are pre-configured for local dev).
  4. Optional services (Clerk, Stripe, Resend, PostHog, etc.) can be skipped initially — integrations whose keys are unset are skipped at runtime. Delete the empty KEY="" placeholders copied from .env.example: an empty string fails the keys.ts format checks.
  5. Deploy as 3 separate Vercel projects with root directories apps/app, apps/api, apps/web.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 250769d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 5 days ago
Other metadata
metadata
{
  "priority": 8,
  "docs": [
    "https://vercel.com/docs/getting-started-with-vercel",
    "https://nextjs.org/docs/app/getting-started/installation"
  ],
  "sitemap": "https://vercel.com/sitemap.xml",
  "pathPatterns": [
    ".env.example",
    ".env.sample",
    ".env.template",
    "README*",
    "docs/**/setup*",
    "package.json",
    "drizzle.config.*",
    "prisma/schema.prisma",
    "auth.*",
    "src/**/auth.*"
  ],
  "bashPatterns": [
    "\\\\bcp\\\\s+\\\\.env\\\\.(?:example|sample|template)\\\\s+\\\\.env\\\\.local\\\\b",
    "\\\\b(?:npm|pnpm|bun|yarn)\\\\s+run\\\\s+db:(?:push|seed|migrate|generate)\\\\b",
    "\\\\b(?:npm|pnpm|bun|yarn)\\\\s+run\\\\s+dev\\\\b",
    "\\\\bvercel\\\\s+link\\\\b",
    "\\\\bvercel\\\\s+integration\\\\s+(?:add|install)\\\\b",
    "\\\\bvercel\\\\s+env\\\\s+pull\\\\b"
  ],
  "importPatterns": [
    "@neondatabase/serverless",
    "drizzle-orm",
    "@upstash/redis",
    "@vercel/blob",
    "@vercel/edge-config",
    "@vercel/global-config",
    "next-auth",
    "@auth/core",
    "better-auth"
  ]
}
chainTo
[
  {
    "pattern": "@vercel/(postgres|kv)|\\b(KV_REST_API_URL|POSTGRES_URL)\\b",
    "targetSkill": "vercel-storage",
    "message": "@vercel/postgres and @vercel/kv are sunset — loading Vercel Storage guidance for Neon and Upstash migration."
  },
  {
    "pattern": "from\\s+['\"\"](next-auth|@auth/core|@clerk/nextjs|better-auth)['\"\"]",
    "targetSkill": "auth",
    "message": "Auth library detected during bootstrap — loading Auth guidance for Clerk Marketplace setup and middleware patterns."
  },
  {
    "pattern": "OPENAI_API_KEY|ANTHROPIC_API_KEY|AI_GATEWAY",
    "targetSkill": "env-vars",
    "message": "AI provider env vars detected — loading Environment Variables guidance for OIDC-based auth via vercel env pull.",
    "skipIfFileContains": "VERCEL_OIDC|vercel env pull"
  }
]
retrieval
{
  "aliases": [
    "project setup",
    "repo init",
    "getting started",
    "scaffold"
  ],
  "intents": [
    "set up project",
    "initialize repo",
    "link vercel project",
    "pull env vars"
  ],
  "entities": [
    "vercel link",
    "env pull",
    "database setup",
    "first run"
  ]
}

README badge

README badge for vercel/vercel-plugin/bootstrap