deploy-to-vercel

Configure vercel.json, edge functions, and environment variables for Vercel deployments.

Updated May 13, 2026
One-click install
npx skills add https://github.com/sapatamuku-creator/mastersapatamuku --skill deploy-to-vercel-sapatamuku-creator
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: deploy-to-vercel
Source: https://github.com/sapatamuku-creator/mastersapatamuku/tree/main/.agents/skills/deploy-to-vercel
Command: npx skills add https://github.com/sapatamuku-creator/mastersapatamuku --skill deploy-to-vercel-sapatamuku-creator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Deploying to Vercel involves tricky configuration details—rewrites, headers, environment variables, and routing rules—that often cause 404/500 errors, redirect loops, or broken asset caching when misconfigured. ## Core Features & Use Cases - vercel.json Configuration: Set up clean rewrites, redirects, security headers, and immutable cache headers for static assets. - Environment Management: Organize secrets and variables across Production, Preview, and Development environments without committing them to the repository. - Troubleshooting: Diagnose deployment failures, circular rewrite loops, and routing issues for SPAs and multi-page static sites. - Use Case: Your SPA returns 404 errors on direct navigation to subpaths after deploying to Vercel. Use this Skill to configure rewrites that route subpaths correctly while preserving direct asset access. ## Quick Start Ask the AI to review your vercel.json and fix the routing so your single-page app loads correctly on all subpaths.

Frequently Asked Questions about deploy-to-vercel

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

FAQPage Schema
How do I configure rewrites in vercel.json for a single-page app?▼

Add a rewrites array in vercel.json that maps all subpaths to your index.html entry point while excluding asset directories. Ensure the rules do not conflict with static file paths so direct asset access keeps working.

How do I set cache headers for static assets on Vercel?▼

Define a headers block in vercel.json targeting your asset path pattern, such as /assets/(.*), with a Cache-Control value of public, max-age=31536000, immutable. This instructs the CDN to cache fingerprinted assets long-term.

Where should I store secret environment variables for Vercel?▼

Store secrets in Vercel Project Settings under Environment Variables, never in the repository. Use separate values for Production, Preview, and Development environments to isolate credentials per deployment stage.

Why does my Vercel deployment return 404 on subpaths?▼

This happens when the server has no rewrite rule mapping subpaths to your app's entry file. Add a catch-all rewrite to index.html in vercel.json, and verify no conflicting wildcard routes create redirect loops.

How do I fix circular rewrite loops on Vercel?▼

Circular loops occur when rewrite rules point to each other or a wildcard matches its own destination. Audit vercel.json for overlapping source patterns, remove conflicting wildcards, and validate the JSON before redeploying.