Agent skill

Vercel Security Basics

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Apply Vercel security best practices for secrets, headers, and access control.

MITAuto-check: notesSecurity

Install Vercel Security Basics

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill vercel-security-basics -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace vercel-security-basics --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/vercel-security-basics .claude/skills/vercel-security-basics && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
vercel-security-basics
GitHub stars
2.8k
Token cost
~1.9k tokens
SKILL.md length
402 words
Files
4 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Apply Vercel security best practices for secrets, headers, and access control.

  • Works in 6 steps: Secret Management with Environment… → Security Headers via vercel.json → Security Headers via Edge Middleware → …
  • Securing API keys
  • SKILL.md covers Overview, Prerequisites, Instructions and Security Checklist, plus 5 more sections
  • Calls vercel and curl; reaches api.vercel.com; needs API_SECRET and VERCEL_TOKEN

What it does

Vercel Security Basics is an agent skill from jeremylongshore/tons-of-skills-marketplace. Apply Vercel security best practices for secrets, headers, and access control. Use when securing API keys, configuring security headers, or auditing Vercel security configuration. Trigger with phrases like "vercel security", "vercel secrets", "secure vercel", "vercel headers", "vercel CSP".

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/errors.md`, `references/examples.md` and `references/implementation.md`). Compatibility notes: Designed for Claude Code

It sits in Security, covering Secure coding, Secrets management and Authorization and RBAC. It works with Vercel. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Securing API keys
  • Configuring security headers
  • Auditing Vercel security configuration
  • With phrases like vercel security

Example prompts

  • “vercel security”
  • “vercel secrets”
  • “secure vercel”
  • “/vercel-security-basics”

Requirements

  • A credential in API_SECRET
  • A credential in VERCEL_TOKEN
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(vercel:*), Grep

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Secret Management with Environment Variables
  2. Security Headers via vercel.json
  3. Security Headers via Edge Middleware
  4. Deployment Protection
  5. Access Token Best Practices
  6. API Route Authentication

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash(vercel:*)
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • vercel
    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.vercel.com

    Also links to:

    • vercel.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • API_SECRET
    • VERCEL_TOKEN
    • INTERNAL_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Vercel Security Basics loads about 1.9k tokens when it runs, and up to ~2.6k if it reads all its reference files. Until then it costs about 79 tokens; SKILL.md has 402 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~79
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:161
    1. Never commit tokens to git — use `.env.local` or CI secrets
  • NoteMentions a .env fileSKILL.md:202
    | `.env.local` in `.gitignore` | Required |

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 402 words, ~1,894 tokens.

Download SKILL.mdSave it as .claude/skills/vercel-security-basics/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
vercel-security-basics
description
Apply Vercel security best practices for secrets, headers, and access control. Use when securing API keys, configuring security headers, or auditing Vercel security configuration. Trigger with phrases like "vercel security", "vercel secrets", "secure vercel", "vercel headers", "vercel CSP".
allowed-tools
Read, Write, Edit, Bash(vercel:*), Grep
compatibility
Designed for Claude Code
version
1.18.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, vercel, security, headers, secrets

Vercel Security Basics

Overview

Secure Vercel deployments with proper secret management, security headers, deployment protection, and access token hygiene. Covers environment variable scoping, Content Security Policy, and preventing common secret exposure patterns.

Prerequisites

  • Vercel CLI installed and authenticated
  • Access to Vercel dashboard
  • Understanding of HTTP security headers

Instructions

Step 1: Secret Management with Environment Variables
bash
# Add secrets scoped to specific environments
vercel env add DATABASE_URL production
vercel env add DATABASE_URL preview
vercel env add DATABASE_URL development

# Use 'sensitive' type — values hidden in dashboard and logs
vercel env add API_SECRET production --sensitive

# Via REST API
curl -X POST "https://api.vercel.com/v9/projects/my-app/env" \
  -H "Authorization: Bearer $VERCEL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "API_SECRET",
    "value": "sk-secret-value",
    "type": "sensitive",
    "target": ["production"]
  }'

Critical rule: Never prefix secrets with NEXT_PUBLIC_. Variables starting with NEXT_PUBLIC_ are inlined into the client JavaScript bundle and visible to anyone.

Step 2: Security Headers via vercel.json
json
{
  "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" },
        { "key": "Permissions-Policy", "value": "camera=(), microphone=(), geolocation=()" },
        {
          "key": "Strict-Transport-Security",
          "value": "max-age=63072000; includeSubDomains; preload"
        },
        {
          "key": "Content-Security-Policy",
          "value": "default-src 'self'; script-src 'self' 'unsafe-inline' https://vercel.live; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' https://fonts.gstatic.com; connect-src 'self' https://api.vercel.com"
        }
      ]
    }
  ]
}
Step 3: Security Headers via Edge Middleware
typescript
// middleware.ts
import { NextResponse } from 'next/server';
import type { NextRequest } from 'next/server';

export function middleware(request: NextRequest) {
  const response = NextResponse.next();

  // Security headers
  response.headers.set('X-Content-Type-Options', 'nosniff');
  response.headers.set('X-Frame-Options', 'DENY');
  response.headers.set('Referrer-Policy', 'strict-origin-when-cross-origin');
  response.headers.set(
    'Strict-Transport-Security',
    'max-age=63072000; includeSubDomains; preload'
  );

  // Remove server version headers
  response.headers.delete('X-Powered-By');

  return response;
}
Step 4: Deployment Protection
json
// vercel.json
{
  "deploymentProtection": {
    "preview": "vercel-authentication",
    "optedOutFrom": []
  }
}

Protection options:

  • vercel-authentication — requires Vercel team login to view preview deploys
  • standard-protection — uses bypass header for automation
  • Deployment Protection Bypass — for CI/CD and health checks:
bash
# Generate a bypass secret in Vercel dashboard > Settings > Deployment Protection
# Use in CI with:
curl -H "x-vercel-protection-bypass: your-bypass-secret" \
  https://my-app-preview.vercel.app/api/health
Step 5: Access Token Best Practices
bash
# Create scoped tokens — restrict to one team and project
# Settings > Tokens > Create Token:
# - Scope: Team → your-team
# - Expiration: 90 days (for CI)
# - Permissions: Deployment-only (no team admin)

# Rotate tokens on a schedule
# In CI (GitHub Actions):
# Store as GitHub Secret: VERCEL_TOKEN
# Set expiry alerts in your calendar

Token security rules:

  1. Never commit tokens to git — use .env.local or CI secrets
  2. Scope tokens to the minimum required permissions
  3. Set expiration dates (90 days for CI, 30 days for dev)
  4. Rotate immediately if exposed
  5. Use separate tokens per environment/pipeline
Step 6: API Route Authentication
typescript
// api/protected.ts
import type { VercelRequest, VercelResponse } from '@vercel/node';

export default function handler(req: VercelRequest, res: VercelResponse) {
  // Verify API key from header
  const apiKey = req.headers['x-api-key'];
  if (!apiKey || apiKey !== process.env.INTERNAL_API_KEY) {
    return res.status(401).json({ error: 'Unauthorized' });
  }

  // Verify origin for CORS
  const origin = req.headers.origin;
  const allowedOrigins = (process.env.ALLOWED_ORIGINS ?? '').split(',');
  if (origin && !allowedOrigins.includes(origin)) {
    return res.status(403).json({ error: 'Forbidden origin' });
  }

  res.json({ data: 'protected content' });
}

Security Checklist

CheckStatus
No secrets in NEXT_PUBLIC_* variablesRequired
Sensitive env vars use type: sensitiveRequired
Security headers configuredRequired
HSTS enabled with preloadRecommended
Preview deployments protectedRecommended
Access tokens scoped and rotatedRequired
CSP configured for your domainsRecommended
.env.local in .gitignoreRequired

Output

  • Environment variables properly scoped and typed as sensitive
  • Security headers applied to all responses
  • Deployment protection enabled for preview URLs
  • Access tokens scoped with expiration dates
Show full SKILL.md (154 more words)Show less

Error Handling

ErrorCauseSolution
Secret visible in client bundlePrefixed with NEXT_PUBLIC_Remove prefix, redeploy, rotate the secret
CSP blocking resourcesPolicy too restrictiveAdd the blocked domain to the relevant directive
Preview accessible without authDeployment protection disabledEnable in vercel.json or dashboard
Token expiredPast expiration dateGenerate new token, update CI secrets

Examples

Respond to a secret accidentally bundled into client code

Treat the exposed value as compromised: revoke or rotate it at the provider, remove the client-side reference, and move the required operation behind an authenticated server route. Deploy the correction to preview, use a bundle inspection to confirm the old string is absent, then promote through the normal release workflow. Do not paste the secret into tickets, logs, or commit messages; record only the rotation reference and verification outcome.

Resources

Next Steps

For production deployment checklist, see vercel-prod-checklist.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/.curated/vercel-security-basics of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/errors.md
  • references/examples.md
  • references/implementation.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Vercel Security Basics next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Vercel Security Basics compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Vercel Security Basics this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.9kAutomated safety check: NotesMIT
Discover Securityrand/cc-polymath181—~1.9kAutomated safety check: PassMIT
Security Hardeningrohitg00/awesome-claude-code-toolkit2.7k—~1.5kAutomated safety check: NotesApache-2.0
Security Review ChecklistZeroDeng01/sublinkPro1.7k—~2.3kAutomated safety check: PassMIT
Cb Security HardeningBlkLeg/CircuitBreaker201—~2.1kAutomated safety check: PassMIT
Codewhale Security Reviewcodewhale-hq/Codewhale41k—~844Automated safety check: PassMIT

Similar skills

  • Discover Security

    rand/cc-polymath

    Automatically discover security skills when working with authentication, authorization, input validation, security headers, vulnerability assessment, or secrets management.

    181 GitHub stars~1.9k tokensUpdated 7 mo ago
    SecurityAuto-check passed
  • Security Hardening

    rohitg00/awesome-claude-code-toolkit

    Application security covering input validation, auth, headers, secrets management, and dependency auditing

    2.7k GitHub stars~1.5k tokensUpdated 5 mo ago
    DevOps & CloudAuto-check: notes
  • Security Review Checklist

    ZeroDeng01/sublinkPro

    Checklist-driven security review for changes to authentication, authorization, MFA, secrets, input validation and other security-critical code.

    1.7k GitHub stars~2.3k tokensUpdated 2 days ago
    SecurityAuto-check passed
  • Cb Security Hardening

    BlkLeg/CircuitBreaker

    Enforces Circuit Breaker security hardening conventions across backend, frontend, Docker, and nginx.

    201 GitHub stars~2.1k tokensUpdated 5 days ago
    Backend & APIsAuto-check passed
  • Codewhale Security Review

    codewhale-hq/Codewhale

    Reviews a diff, module or network surface for exploitable defects, mapping trust boundaries and sinks, then reports only findings with a verified reachable path and a fix.

    41k GitHub stars~844 tokensUpdated today
    SecurityAuto-check passed
  • Robotics Security

    arpitg1304/robotics-agent-skills

    Security hardening and best practices for robotic systems, covering SROS2 DDS security, network segmentation, secrets management, secure boot, and the physical-cyber safety intersection.

    369 GitHub stars~7.8k tokensUpdated 2 mo ago
    DevOps & CloudAuto-check: warnings

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Questions about Vercel Security Basics

What does Vercel Security Basics do?

Apply Vercel security best practices for secrets, headers, and access control. Vercel Security Basics is an agent skill from jeremylongshore/tons-of-skills-marketplace. Apply Vercel security best practices for secrets, headers, and access control.

When should I use Vercel Security Basics?

Vercel Security Basics fits situations like: securing API keys; configuring security headers; auditing Vercel security configuration; with phrases like vercel security.

How do I install Vercel Security Basics in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill vercel-security-basics -a claude-code`. Or copy the skill folder (skills/.curated/vercel-security-basics in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/vercel-security-basics in your project. Claude Code loads it when a task matches its description.

How do I install Vercel Security Basics in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill vercel-security-basics -a codex`. Or copy the skill folder (skills/.curated/vercel-security-basics in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/vercel-security-basics in your project. Codex loads it when a task matches its description.

Can I use Vercel Security Basics in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill vercel-security-basics -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/vercel-security-basics, .gemini/skills/vercel-security-basics, .github/skills/vercel-security-basics and .opencode/skills/vercel-security-basics in your project.

What does Vercel Security Basics need to run?

Going by SKILL.md and its folder, Vercel Security Basics needs the command-line tools its instructions call (vercel and curl) and credentials named API_SECRET, VERCEL_TOKEN and INTERNAL_API_KEY. Our summary lists: A credential in API_SECRET; A credential in VERCEL_TOKEN. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(vercel:*), Grep. Compatibility (from SKILL.md): Designed for Claude Code.

Does Vercel Security Basics access the network?

SKILL.md names 2 domains. In commands or code: api.vercel.com; the agent is likely to contact it when it follows the instructions. As links in the text: vercel.com. This is read from the text; nothing was executed.

Is Vercel Security Basics safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Vercel Security Basics use?

Vercel Security Basics is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Vercel Security Basics use?

About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 737 tokens, read only when the agent opens those files.

What are the alternatives to Vercel Security Basics?

Skills that share tags, products or a category with Vercel Security Basics: Discover Security (rand/cc-polymath, 181 stars), Security Hardening (rohitg00/awesome-claude-code-toolkit, 2.7k stars), Security Review Checklist (ZeroDeng01/sublinkPro, 1.7k stars) and Cb Security Hardening (BlkLeg/CircuitBreaker, 201 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Vercel Security Basics?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.