
access-protected-vercel-deployment
Access and test Vercel deployments protected by Vercel Authentication, SSO, or Deployment Protection. Use when curl, agent-browser, Playwright, or another automated request reaches a Vercel login or protection page; when a protected preview or production URL returns 401 or 403; when TRUSTEDSOURCESENVIRONMENTMISMATCH appears; or when choosing between vercel curl and the x-vercel-trusted-oidc-idp-token header.
- Installs
- 2.6K
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/vercel/vercel-plugin --skill access-protected-vercel-deployment- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads access-protected-vercel-deployment automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Access Protected Vercel Deployments
Use the caller's existing Vercel authentication. Do not disable Deployment Protection or ask for a long-lived bypass secret as the first solution.
Choose the access path
HTTP requests: use vercel curl
For response bodies, headers, health checks, and API calls, replace raw curl with vercel curl (vc curl). It accepts native curl options and uses Vercel authentication to access protected preview and production deployments.
vc curl https://my-app.vercel.app/api/health
vc curl https://app.example.com/api/health
vc curl my-app.vercel.app/api/users -X POST \
-H "Content-Type: application/json" \
-d '{"name":"Ada"}'
vc curl /api/health
The path-only form targets the linked project's production deployment. Pass a full URL when the exact deployment matters.
If authentication fails, check the local identity and project before changing protection settings:
vc whoami
Inspect .vercel/project.json to confirm the linked project and team. Run vc link only when the directory is not linked or is linked to the wrong project. Run vc login only when the CLI reports that no authenticated user is available.
Browser automation: attach the development OIDC token as a header
Browser requests must include the short-lived local token as a request header:
x-vercel-trusted-oidc-idp-token: <VERCEL_OIDC_TOKEN>
Use a browser tool that supports origin-scoped request headers. With agent-browser, inject development variables without printing or persisting the token:
vc env run -- sh -c \
'test -n "$VERCEL_OIDC_TOKEN" && agent-browser open "$1" --headers "{\"x-vercel-trusted-oidc-idp-token\":\"$VERCEL_OIDC_TOKEN\"}"' \
sh https://my-app.vercel.app
Then continue the normal browser workflow in the same session. For Playwright or another browser driver, set the same header in the browser context's extra HTTP headers before the first navigation.
If the local CLI version does not provide the token through vc env run, refresh local development credentials with:
vc env pull .env.local --yes
Load the file through the project's existing dotenv mechanism. Never print the token, paste its value into source code, or commit .env.local.
Use x-vercel-trusted-oidc-idp-token for Trusted Sources. Do not substitute x-vercel-oidc-token; that header carries an OIDC token into a Vercel Function and serves a different purpose.
Trusted Sources rules
A local development token for a linked Vercel project can access that same project's Preview deployments by default. It does not automatically access protected Production deployments. For protected Production, the project's own Trusted Sources entry must allow development → production.
Do not ask the user to configure Trusted Sources for the normal same-project Preview case.
Configuration is needed when:
- the target is a protected Production deployment and the caller uses a local development token;
- the caller belongs to another Vercel project or team;
- the target project's self-access rules were customized; or
- the response is
TRUSTED_SOURCES_ENVIRONMENT_MISMATCH.
In the target project, open Settings → Deployment Protection → Trusted Sources. Add or edit the caller and allow the required from → to environment pair. A local token has the development environment, so access to protected Production requires development → production.
Treat this as an access-control change: explain the exact rule required and obtain authorization before changing it. Do not broaden unrelated environment pairs.
Diagnose the response
- A Vercel login, SSO, or Deployment Protection page means the request did not use an accepted authentication path.
TRUSTED_SOURCES_ENVIRONMENT_MISMATCHmeans the token is valid but its caller environment is not allowed to reach the target environment.- An application-generated
401or403after Vercel protection is bypassed belongs to the application's own authentication and must be debugged separately. - A deployment marked
"target": "production"can still be protected. Do not assume production is public.
Avoid
- Do not disable Deployment Protection to make automation pass.
- Do not send raw unauthenticated
curlrepeatedly after receiving the protection page. - Do not start an interactive SSO browser login when
vc curlor an origin-scoped OIDC header can authenticate the request. - Do not expose
VERCEL_OIDC_TOKENin logs, screenshots, committed files, or user-facing output.
Related skills
- General Vercel CLI usage:
⤳ skill: vercel-cli - End-to-end application verification:
⤳ skill: verification
FAQ
What does the access-protected-vercel-deployment skill do?
Access and test Vercel deployments protected by Vercel Authentication, SSO, or Deployment Protection. Use when curl, agent-browser, Playwright, or another automated request reaches a Vercel login or protection page; when a protected preview or production URL returns 401 or 403; when TRUSTEDSOURCESENVIRONMENTMISMATCH appears; or when choosing between vercel curl and the x-vercel-trusted-oidc-idp-token header.
How do I install access-protected-vercel-deployment?
Run npx skills add https://github.com/vercel/vercel-plugin --skill access-protected-vercel-deployment in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/access-protected-vercel-deployment/ (personal) or .claude/skills/access-protected-vercel-deployment/ (project).
Which AI agents can use access-protected-vercel-deployment?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is access-protected-vercel-deployment safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains access-protected-vercel-deployment?
It is published by vercel in vercel/vercel-plugin. It has 2,558 recorded installs.
More from vercel/vercel-plugin
build-agents
vercel/vercel-plugin
Default guidance for building AI agents. Use for generic requests to build, create, scaffold, design, architect, or implement an AI agent, agent app, tool-calling agent, durable agent, multi-agent system, or scheduled agent.
create-a-backend
vercel/vercel-plugin
Backend architecture guidance. Use when planning, building, or migrating an API or backend; choosing between Functions, Services, containers, Daemons, Workflow, Queues, and Marketplace databases; or selecting a supported backend framework or runtime.
flags-sdk
vercel/vercel-plugin
Implement feature flags in Next.js or SvelteKit code with the Flags SDK (flags npm package). Use when installing or configuring the SDK, declaring flags with flag(), wiring a provider adapter (@flags-sdk/vercel, Statsig, LaunchDarkly, PostHog, GrowthBook, Global Config, OpenFeature, and others), using identify, dedupe, or evaluate, keeping pages static with precompute, setting up Flags Explorer, or encrypting flag values. For planning a flag, Vercel Flags rollouts and experiments, the vercel flags CLI, or other frameworks, use the vercel-flags skill.
queues
vercel/vercel-plugin
Vercel Queues guidance — durable topics with at-least-once delivery, independent consumer groups, retries, delays, and idempotency keys via @vercel/queue (JS) or vercel-queue (Python). Use when deferring background work, buffering traffic, fanning out events, or choosing between Queues and Workflows.
custom-metrics
vercel/vercel-plugin
Emit and query Vercel Custom Metrics. Use when instrumenting application or business measurements in Vercel Functions, using metric() from @vercel/functions, choosing metric names and attributes, or querying emitted values with vc metrics.
domains
vercel/vercel-plugin
Search, register, connect, transfer, and renew domain names on Vercel using the CLI or Domains Registrar API. Use for domain availability and pricing, custom domains, DNS records, nameservers, ownership verification, and domain orders.
Popular devops & cloud skills
microsoft-foundry
microsoft/azure-skills
Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd ai agent, azd provision/deploy, hosted agent scaffold/develop/run/deploy/troubleshoot, prompt agent create, managed harness agent create, GitHub Copilot harness agent, create agent, update agent, add tool to agent, invoke agent, agent insights, evaluate agent, batch eval, continuous eval, continuous monitoring, agent CI/CD, optimize prompt, improve prompt, optimize agent instructions, Agent Optimizer scaffold, dataset curation from traces, deploy model, model fine-tuning (SFT/DPO/RFT), Foundry project, RBAC, role assignment, permissions, quota, capacity, region, deployment failure, AI Services, create Foundry resource, knowledge index, customize deployment, onboard, availability, training-data, grader, distillation, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure
azure-diagnostics
microsoft/azure-skills
Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, container app 503 or target port mismatch, troubleshoot functions, function telemetry missing or stopped after a config/connection-string change, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, analyze logs, KQL, insights, image pull failures, cold start issues, health probe failures, resource health, root cause of errors, troubleshoot event hubs, troubleshoot service bus, messaging SDK error, AMQP connection failure, message lock lost, lock renewal during long-running processing, service bus dead letter.
azure-prepare
microsoft/azure-skills
Prepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd) workflow. USE ONLY when the user explicitly wants to use azd as the deployment tool, or the project already has an azure.yaml file. DO NOT USE FOR: non-azd deployments, Python App Service code-only deploys (use python-appservice-deploy), or cross-cloud migration (use azure-cloud-migrate). WHEN: prepare app for azd, create azure.yaml, set up azd infrastructure, modernize app for Azure with azd, deploy with azd, function app, timer trigger, service bus trigger, event-driven function, managed identity, generate Bicep, generate Terraform, create and deploy to Azure.
azure-ai
microsoft/azure-skills
Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.
azure-deploy
microsoft/azure-skills
Execute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT use this skill when the user asks to CREATE a new application — use azure-prepare instead. This skill runs azd up, azd deploy, terraform apply, and az deployment commands with built-in error recovery. Requires .azure/deployment-plan.md from azure-prepare and validated status from azure-validate. WHEN: "run azd up", "run azd deploy", "execute deployment", "push to production", "push to cloud", "go live", "ship it", "bicep deploy", "terraform apply", "publish to Azure", "launch on Azure". DO NOT USE WHEN: "create and deploy", "build and deploy", "create a new app", "set up infrastructure", "create and deploy to Azure using Terraform" — use azure-prepare for these.
azure-validate
microsoft/azure-skills
Pre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity permissions, and prerequisites before deploying. WHEN: validate my app, check deployment readiness, run preflight checks, verify configuration, check if ready to deploy, validate azure.yaml, validate Bicep, test before deploying, troubleshoot deployment errors, validate Azure Functions, validate function app, validate serverless deployment, verify RBAC roles, check role assignments, review managed identity permissions, what-if analysis, validate Container Apps deployment.