Read state before deploying

Run four read-only checks, then let the answers pick the method.

From deploy-to-vercel, SKILL.md “Step 1: Gather Project State”.

Four checks pick the method

Set the project's state, then press Deploy.

Deploy blindBad
vercel deploy -yevery time
Check, then chooseGood
remote, link, auth, teams → method
git remote get-url origin 2>/dev/null
cat .vercel/project.json 2>/dev/null || cat .vercel/repo.json 2>/dev/null
vercel whoami 2>/dev/null
vercel teams list --format json 2>/dev/null

Probe without side effects

Press Probe in an unlinked folder; watch the files.

Probe with a CLI verbBad
vercel project inspect --yes
Read files, whoamiGood
cat .vercel/*.jsonvercel whoami
# Safe anywhere
vercel whoami

# Not in an unlinked folder: they prompt, or with --yes link as a side effect
vercel link   vercel ls   vercel project inspect

Why it matters, pros and cons

Why it matters

The right path depends on git, link and auth. Guessing fails on auth, or quietly creates a project.

Pros

  • Lands on the path that ends in git-push deploys.
  • The checks change nothing in the repo.
  • A linked project's orgId already names the team.

Cons

  • Four commands before every deploy.
  • Several teams: you still have to ask which one.
  • Don't hand-edit .vercel/; the CLI owns it.