All skills
vercel-labs avatar

/vercel-cli

@51524a1 official

Vercel CLI expert guidance. Use when deploying, managing environment variables, linking projects, viewing logs, querying metrics, managing domains, managing feature flags with vercel flags, or interacting with the Vercel platform from the command line.

  • 57 files
  • 222.1 KB
  • Updated 2 weeks ago
  • GitHub

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

This session only. Nothing lands on disk.

referencesmonorepos.md

≈937 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Monorepos on Vercel

Vercel auto-detects monorepo tools (Turborepo, Nx) and workspace managers (pnpm, Yarn, npm). Each project in the monorepo gets its own Vercel project, linked via vercel link --repo.

Quick Start

vercel link --repo    # link the whole repo
vercel project inspect --non-interactive # verify the selected owner and project
vercel pull                             # pull settings and env data into .vercel/
vc dev                                  # local development
vercel deploy                           # deploy

Linking

Use vercel link --repo to create .vercel/repo.json, which maps directories to Vercel projects:

{
  "orgId": "org_xxxxx",
  "projects": [
    { "id": "prj_xxxxx", "name": "web", "directory": "apps/web" },
    { "id": "prj_yyyyy", "name": "api", "directory": "apps/api" }
  ]
}

The deepest configured directory containing the working directory wins. If no mapping matches, interactive repo resolution prompts among the configured projects; non-interactive repo resolution currently selects the sole configured project or remains unresolved when multiple choices exist. Commands that set up projects may then enter a linking flow. Being inside an app directory does not by itself verify the target, so run vercel project inspect --non-interactive and stop on link_required or a mismatch before consequential commands.

Root Directory

Set rootDirectory in vercel.json when your app isn't at the repo root:

{
  "rootDirectory": "apps/api"
}

Turborepo

Turborepo requires an explicit build task. Define it in turbo.json:

{
  "tasks": {
    "build": {
      "dependsOn": ["^build"],
      "env": ["VERCEL"],
      "outputs": [".next/**", "!.next/cache/**", ".vercel/output/**", "dist/**"]
    }
  }
}

Vercel automatically generates the right build command — you don't need to configure it. If you need a manual override in vercel.json:

{
  "buildCommand": "turbo run build --filter={packages/my-app}..."
}

turbo-ignore

Vercel auto-sets npx turbo-ignore as the "Ignored Build Step" command, which skips builds when a project's dependencies haven't changed.

Nx

Nx requires a build target. Define it in nx.json:

{
  "targetDefaults": {
    "build": {
      "dependsOn": ["^build"]
    }
  }
}

Example: Turborepo + pnpm + Hono

root/
├── turbo.json
├── package.json
├── pnpm-workspace.yaml
├── vercel.json
├── apps/
│   └── api/
│       ├── package.json
│       └── server.ts
└── packages/
    └── shared/
        ├── package.json
        └── src/index.ts

pnpm-workspace.yaml:

packages:
  - 'apps/*'
  - 'packages/*'

vercel.json:

{
  "rootDirectory": "apps/api"
}

apps/api/server.ts:

import { Hono } from 'hono';
import { greet } from '@repo/shared';

const app = new Hono();
app.get('/', c => c.text(greet('world')));

export default app;

Anti-Patterns

  • Using vercel link instead of vercel link --repo: Creates project.json which only tracks one project. Use --repo for monorepos.
  • Missing build task in turbo.json/nx.json: Vercel requires an explicit build task. Without it, the build fails.
  • Adding a build script to package.json for transpilation: Vercel handles TypeScript compilation. The turbo.json build task is for orchestration, not transpilation.
  • Assuming an app directory proves project context: Verify the resolved owner and project with vercel project inspect --non-interactive. vercel whoami --format json reports authentication and team context, not the linked project.

Source: SKILL.md on GitHub

No third-party reports yet.

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

Last checked against GitHub 9 hours ago.

Activeupdated 2 weeks ago
Other metadata
metadata
{
  "priority": 4,
  "docs": [
    "https://vercel.com/docs/cli"
  ],
  "sitemap": "https://vercel.com/sitemap.xml",
  "pathPatterns": [
    "vercel.json",
    "vercel.ts",
    ".vercel/**",
    ".vercelignore",
    "now.json"
  ],
  "bashPatterns": [
    "^\\s*vercel(?:\\s|$)",
    "^\\s*vc(?:\\s|$)",
    "\\bnpx\\s+vercel\\b",
    "\\bpnpm\\s+dlx\\s+vercel\\b",
    "\\bbunx\\s+vercel\\b",
    "\\byarn\\s+dlx\\s+vercel\\b",
    "\\bnpx\\s+@vercel/config\\b"
  ],
  "promptSignals": {
    "phrases": [
      "check deployment",
      "check deploy",
      "deployment status",
      "deploy status",
      "vercel logs",
      "vercel metrics",
      "deployment logs",
      "deploy logs",
      "vercel inspect",
      "is it deployed",
      "deploy failing",
      "deploy failed",
      "deployment error",
      "check vercel",
      "vercel status"
    ],
    "allOf": [
      [
        "check",
        "deployment"
      ],
      [
        "check",
        "deploy"
      ],
      [
        "vercel",
        "status"
      ],
      [
        "vercel",
        "logs"
      ],
      [
        "vercel",
        "metrics"
      ],
      [
        "deploy",
        "error"
      ],
      [
        "deploy",
        "failed"
      ],
      [
        "deploy",
        "stuck"
      ]
    ],
    "anyOf": [
      "deployment",
      "deploy",
      "vercel",
      "production"
    ],
    "noneOf": [
      "terraform",
      "aws deploy",
      "heroku"
    ],
    "minScore": 6
  }
}
retrieval
{
  "aliases": [
    "vercel command line",
    "vc cli",
    "deploy command",
    "vercel terminal"
  ],
  "intents": [
    "deploy from cli",
    "link project",
    "manage domains",
    "view logs from terminal"
  ],
  "entities": [
    "vercel CLI",
    "vercel deploy",
    "vercel env",
    "vercel link",
    "vercel logs",
    "vercel metrics"
  ]
}
chainTo
[
  {
    "pattern": "\"functions\"\\s*:\\s*\\{|\"maxDuration\"\\s*:|\"memory\"\\s*:",
    "targetSkill": "vercel-functions",
    "message": "Functions configuration detected in vercel.json — loading Vercel Functions guidance for runtime options, streaming, and Fluid Compute.",
    "skipIfFileContains": "\"crons\"\\s*:"
  },
  {
    "pattern": "\"redirects\"\\s*:\\s*\\[|\"rewrites\"\\s*:\\s*\\[|\"headers\"\\s*:\\s*\\[",
    "targetSkill": "routing-middleware",
    "message": "Routing rules in vercel.json — loading Routing Middleware guidance for platform-level request interception patterns."
  }
]

README badge

README badge for vercel-labs/vercel-plugin/vercel-cli