SkillAgentSearch skills...

vercel-deployment

Best practices for Vercel deployments including serverless functions, Edge Runtime, middleware, caching, environment variables, and CI/CD configuration

Install / Use

npx skills add PatrickJS/awesome-cursorrules

Installs into whichever agent you are using.

About this skill
📦

Other

Other agent config

Quality Score

89/100

Category

Security

Supported Platforms

Cursor

Our assessment of vercel-deployment

vercel-deployment scores 89/100 on our quality scale, 38th of 182 Security skills we index (top 21%).

Its Other is 3.8 KB long, well organised into 9 sections with 2 code examples: a solid amount of guidance for an agent.

With 40,832 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
26/30
Structure
18/20
Description
15/15
Adoption
20/20
Freshness
11/15

Maintenance, license and trust

  • The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
  • Our last check on 2026-09-24 found the source still online.
  • It is released under the CC0-1.0 license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 98/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.

AI review by kimi-k2.7-code on 2026-09-23. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

vercel-deployment compared with similar skills

All 4 of these similar skills score higher than vercel-deployment; compare them before choosing.

SkillScoreStarsUpdatedFormat
vercel-deployment (this skill)by PatrickJS8940.8k4mo agoOther
Agent-Reachby Panniantong10085.2k9d agoCLAUDE.md
headroomby headroomlabs-ai10073.7ktodayCLAUDE.md
Scraplingby D4Vinci10083.3ktodayMCP Server
LocalAIby mudler10049.3ktodayMCP Server

Frequently asked questions

How do I install vercel-deployment?
Run npx skills add PatrickJS/awesome-cursorrules. The install tabs above show the steps for each supported agent.
Which AI agents does vercel-deployment work with?
It is written for Cursor, as a Other file. Other agents that read the same format can often use it too.
Is vercel-deployment safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is CC0-1.0-licensed and scores 98/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is vercel-deployment still maintained?
The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.

description: "Best practices for Vercel deployments including serverless functions, Edge Runtime, middleware, caching, environment variables, and CI/CD configuration" globs: ["vercel.json", ".vercelignore", "middleware.ts", "middleware.js", "api//*", "app/api//*"] alwaysApply: false

You are an expert in Vercel deployments, serverless architecture, and modern web application hosting.

Core Principles

  • Always optimize for Vercel's edge network and serverless model
  • Prefer Edge Runtime for globally distributed, low-latency responses
  • Use Vercel's built-in environment variable management for secrets
  • Structure projects to leverage Vercel's zero-config deployment detection
  • Always use vercel.json for advanced routing, headers, and redirects configuration

vercel.json Configuration

  • Use rewrites for proxying API calls or SPA fallback routing
  • Use redirects for permanent (308) or temporary (307) URL changes
  • Use headers to set security headers (CSP, HSTS, X-Frame-Options) globally
  • Use regions to pin serverless functions to specific regions when data locality matters
  • Always include security headers:
{
  "headers": [
    {
      "source": "/(.*)",
      "headers": [
        { "key": "X-Content-Type-Options", "value": "nosniff" },
        { "key": "X-Frame-Options", "value": "DENY" },
        { "key": "X-XSS-Protection", "value": "1; mode=block" },
        { "key": "Referrer-Policy", "value": "strict-origin-when-cross-origin" }
      ]
    }
  ]
}

Serverless Functions

  • Keep dependencies minimal — bundle size directly impacts cold starts
  • Use Edge Functions (export const runtime = 'edge') for auth checks, redirects, and A/B testing
  • Use Node.js runtime for database connections, heavy computation, or Node-only packages
  • Always handle errors and return proper HTTP status codes
  • Use streaming responses for LLM or large data outputs

Edge Middleware

  • Place middleware.ts at the project root
  • Use middleware for: auth guards, geo-based redirects, bot protection, A/B flags
  • Keep middleware lightweight — runs on every request before the cache
  • Always use matcher config to scope middleware to needed routes only:
export const config = {
  matcher: ['/dashboard/:path*', '/api/:path*'],
}

Environment Variables

  • Never hard-code secrets; always use process.env.VARIABLE_NAME
  • Prefix client-side env vars with NEXT_PUBLIC_ (Next.js) or expose explicitly per framework
  • Use Vercel CLI (vercel env add) or the Vercel dashboard to manage per-environment values
  • Use .env.local for local development — never commit it

Performance & Caching

  • Use Cache-Control headers to control CDN caching: s-maxage for CDN TTL, max-age for browser
  • Use stale-while-revalidate for ISR-like behavior in non-Next.js apps
  • Avoid over-fetching in serverless functions — reuse DB connections with connection pooling
  • Use vercel/og for dynamic OG image generation at the edge

CI/CD & Preview Deployments

  • Use Vercel's GitHub/GitLab/Bitbucket integration for automatic preview deployments per PR
  • Use vercel pull + vercel build + vercel deploy --prebuilt in custom CI pipelines
  • Use VERCEL_ENV to differentiate behavior across preview/production

Databases & Storage

  • Prefer Vercel-native storage (Vercel KV, Vercel Postgres, Vercel Blob) for zero-config integration
  • For external databases, always use connection pooling — serverless functions don't maintain persistent connections

Security Best Practices

  • Enable Vercel's DDoS protection and Firewall rules for malicious IP/pattern blocking
  • Rotate secrets regularly using Vercel's environment variable versioning
  • Never log sensitive data (tokens, passwords, PII) in serverless function output
  • Use VERCEL_OIDC_TOKEN for secure machine-to-machine auth between Vercel and cloud providers

Related Skills

View on GitHub
GitHub Stars40.8k
CategorySecurity
Updated3mo ago
Forks3.5k

Languages

JavaScript

Trust signals

98/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 info