protected-vercel-deployments

Access Vercel deployments protected by Deployment Protection using short-lived OIDC tokens.

41.7k|2.8k|Updated Jan 11, 2026
One-click install
npx skills add https://github.com/vercel-labs/agent-browser --skill protected-vercel-deployments
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: protected-vercel-deployments
Source: https://github.com/vercel-labs/agent-browser/tree/main/skill-data/protected-vercel-deployments
Command: npx skills add https://github.com/vercel-labs/agent-browser --skill protected-vercel-deployments

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Vercel preview and production deployments protected by Vercel Authentication or Deployment Protection redirect automated browsers to a login page or return 401/403 errors, blocking AI agents from testing them. This Skill authenticates agent-browser sessions using short-lived Trusted Sources OIDC tokens minted from the caller's existing Vercel identity, without disabling protection or exposing static bypass secrets.

Core Features & Use Cases

  • OIDC Token Authentication: Mint a development OIDC token with vc project token and inject it as the x-vercel-trusted-oidc-idp-token header into an agent-browser session without printing or persisting it.
  • Failure Diagnosis: Distinguish between protection redirects, TRUSTED_SOURCES_ENVIRONMENT_MISMATCH errors, and application-level 401/403 responses to route debugging correctly.
  • Human Handoff Boundaries: Identify exactly when a human must act, such as adding Trusted Sources rules in the dashboard or upgrading the Vercel CLI past version 53.3.0.
  • Use Case: An AI agent needs to verify a protected preview deployment of my-app.vercel.app. It confirms the Vercel CLI identity, mints a token for the project and scope, opens the URL with the OIDC header, and continues clicking and snapshotting the page in the same authenticated session.

Quick Start

Ask the agent to open your protected Vercel preview URL with agent-browser using a Trusted Sources OIDC token from the Vercel CLI, then take an interactive snapshot of the page.

Frequently Asked Questions about protected-vercel-deployments

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I access a Vercel deployment protected by Deployment Protection?

Mint a short-lived OIDC token with `vc project token` using the Vercel CLI, then open the URL in agent-browser with the token sent as the `x-vercel-trusted-oidc-idp-token` header. The header applies to the document and all in-page requests for that origin.

How to test protected Vercel preview deployments with browser automation?

Create a named agent-browser session, mint a development OIDC token for the target project and scope, and pass it as a header on the `agent-browser open` command. Same-project preview access works through the default Trusted Sources self-access rule without extra configuration.

Why does my Vercel preview URL redirect to vercel.com/login?

The redirect means Deployment Protection did not accept the request, so no valid authentication token reached Vercel. Send a Vercel-issued OIDC token via the `x-vercel-trusted-oidc-idp-token` header rather than the `x-vercel-oidc-token` header, which serves a different purpose.

What does TRUSTED_SOURCES_ENVIRONMENT_MISMATCH mean on Vercel?

This error means the OIDC token is valid, but its caller environment cannot reach the target environment. A human must add a Trusted Sources rule in Settings → Deployment Protection, for example mapping development to production, since no CLI or public API edits these rules.

When should I use Vercel Protection Bypass instead of OIDC tokens?

Use Protection Bypass for Automation only when OIDC is not viable or the tool cannot send the Trusted Sources header. Enabling it changes access control, so obtain explicit authorization first, create a dedicated rotatable secret, and pass it as the `x-vercel-protection-bypass` header.