Agent skill

Vercel Known Pitfalls

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

Identify and avoid Vercel anti-patterns and common integration mistakes.

MITAuto-check passedBackend & APIs

Install Vercel Known Pitfalls

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

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

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace vercel-known-pitfalls --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-known-pitfalls .claude/skills/vercel-known-pitfalls && 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-known-pitfalls
GitHub stars
2.8k
Token cost
~2.5k tokens
SKILL.md length
411 words
Files
3 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Identify and avoid Vercel anti-patterns and common integration mistakes.

  • Reviewing Vercel code for issues
  • SKILL.md covers Overview, Prerequisites, Instructions and Quick Audit Script, plus 5 more sections
  • Calls vercel and jq; needs API_KEY and NEXT_PUBLIC_API_SECRET
  • Onboarding new developers

What it does

Vercel Known Pitfalls is an agent skill from jeremylongshore/tons-of-skills-marketplace. Identify and avoid Vercel anti-patterns and common integration mistakes. Use when reviewing Vercel code for issues, onboarding new developers, or auditing existing Vercel deployments for best practice violations. Trigger with phrases like "vercel mistakes", "vercel anti-patterns", "vercel pitfalls", "vercel what not to do", "vercel code review".

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

It sits in Backend & APIs, covering Deployment and Serverless. 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

  • Reviewing Vercel code for issues
  • Onboarding new developers
  • Auditing existing Vercel deployments for best practice violations
  • With phrases like vercel mistakes

Example prompts

  • “vercel mistakes”
  • “vercel anti-patterns”
  • “vercel pitfalls”
  • “/vercel-known-pitfalls”

Requirements

  • Node.js
  • A credential in NEXT_PUBLIC_API_SECRET
  • A credential in API_SECRET
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Grep

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
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • vercel
    • jq

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

  • Network

    Links to these hosts (documentation or services it may open):

    • 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_KEY
    • NEXT_PUBLIC_API_SECRET
    • API_SECRET

    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 Known Pitfalls loads about 2.5k tokens when it runs, and up to ~2.7k if it reads all its reference files. Until then it costs about 92 tokens; SKILL.md has 411 words of instructions outside code blocks.

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

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 passed

The automated check found no risky patterns in SKILL.md.

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). 411 words, ~2,516 tokens.

Download SKILL.mdSave it as .claude/skills/vercel-known-pitfalls/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
vercel-known-pitfalls
description
Identify and avoid Vercel anti-patterns and common integration mistakes. Use when reviewing Vercel code for issues, onboarding new developers, or auditing existing Vercel deployments for best practice violations. Trigger with phrases like "vercel mistakes", "vercel anti-patterns", "vercel pitfalls", "vercel what not to do", "vercel code review".
allowed-tools
Read, Grep
compatibility
Designed for Claude Code
version
1.18.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, vercel, audit, anti-patterns, best-practices

Vercel Known Pitfalls

Overview

Catalog of the most common Vercel anti-patterns with severity ratings, detection methods, and fixes. Organized by category: secret exposure, serverless function mistakes, edge runtime violations, configuration errors, and cost traps.

Prerequisites

  • Access to Vercel codebase for review
  • Understanding of Vercel's deployment model
  • Familiarity with vercel-common-errors for error codes

Instructions

Category 1: Secret Exposure (Critical)

P1: Secrets in NEXT_PUBLIC_ variables

typescript
// BAD — exposed in client JavaScript bundle, visible to anyone
const apiKey = process.env.NEXT_PUBLIC_API_SECRET;
// This value is inlined at build time into the browser bundle

// GOOD — server-only access
const apiKey = process.env.API_SECRET;
// Only accessible in serverless functions and server components
  • Detection: grep -r 'NEXT_PUBLIC_.*SECRET\|NEXT_PUBLIC_.*KEY\|NEXT_PUBLIC_.*TOKEN' src/
  • Fix: Remove NEXT_PUBLIC_ prefix, rotate the exposed secret immediately

P2: Hardcoded credentials in source

typescript
// BAD
const client = new Client({ apiKey: 'sk_live_abc123' });

// GOOD
const client = new Client({ apiKey: process.env.API_KEY });
  • Detection: grep -rE 'sk_live|sk_test|Bearer [a-zA-Z0-9]{20,}' src/ api/
  • Fix: Move to environment variables, add pre-commit hook

P3: Secrets in vercel.json

json
// BAD — vercel.json is committed to git
{
  "env": { "API_KEY": "sk_live_abc123" }
}

// GOOD — use Vercel dashboard or CLI
// vercel env add API_KEY production
Category 2: Serverless Function Mistakes (High)

P4: Heavy initialization at module level

typescript
// BAD — runs on every cold start, adds 500ms+
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient(); // Connects on import
const cache = await loadLargeDataset(); // Blocks cold start

// GOOD — lazy initialization
let prisma: PrismaClient | null = null;
function getDb() {
  if (!prisma) prisma = new PrismaClient();
  return prisma;
}

export default async function handler(req, res) {
  const db = getDb(); // Only connects on first request
  // ...
}

P5: Not returning responses from all code paths

typescript
// BAD — some paths don't return, causing NO_RESPONSE_FROM_FUNCTION
export default function handler(req, res) {
  if (req.method === 'GET') {
    res.json({ data: 'ok' });
  }
  // POST, PUT, DELETE — no response returned!
}

// GOOD
export default function handler(req, res) {
  if (req.method === 'GET') {
    return res.json({ data: 'ok' });
  }
  return res.status(405).json({ error: 'Method not allowed' });
}

P6: Ignoring function timeout limits

typescript
// BAD — no timeout awareness, function silently killed
export default async function handler(req, res) {
  const results = await processMillionRecords(); // Takes 5 minutes
  res.json(results);
}

// GOOD — chunk work, respect timeout
export default async function handler(req, res) {
  const batch = req.query.batch ?? 0;
  const results = await processBatch(batch, 100); // Process 100 at a time
  res.json({
    results,
    nextBatch: batch + 1,
    done: results.length < 100,
  });
}

P7: Connection pool exhaustion

typescript
// BAD — each function instance creates its own connection pool
// With 100 concurrent functions × 10 pool connections = 1000 DB connections
const pool = new Pool({ max: 10 });

// GOOD — use a connection pooler
// Use Prisma Accelerate, PgBouncer, or Supabase connection pooler
// Configure pool size to 1-2 per function instance
const pool = new Pool({ max: 2 });
Category 3: Edge Runtime Violations (High)

P8: Node.js APIs in edge functions

typescript
// BAD — these crash silently in Edge Runtime
export const config = { runtime: 'edge' };

import fs from 'fs';           // Not available
import path from 'path';       // Not available
import crypto from 'crypto';   // Use crypto.subtle instead
import { Buffer } from 'buffer'; // Use Uint8Array instead

// GOOD — Web Standard APIs
const hash = await crypto.subtle.digest('SHA-256', data);
const encoded = btoa(String.fromCharCode(...new Uint8Array(hash)));
  • Detection: grep -rn "from 'fs'\|from 'path'\|from 'crypto'\|from 'child_process'" --include="*edge*" --include="*middleware*"

P9: Dynamic code evaluation in edge

typescript
// BAD — throws "Dynamic Code Evaluation not allowed"
export const config = { runtime: 'edge' };
const fn = new Function('return 42'); // Not allowed
eval('console.log("hi")');            // Not allowed

// GOOD — use static code only
const fn = () => 42;
Category 4: Configuration Errors (Medium)

P10: Missing environment variable scoping

bash
# BAD — variable only in Production, preview deployments break
vercel env add DATABASE_URL production

# GOOD — add to all environments that need it
vercel env add DATABASE_URL production preview development

P11: Using deprecated builds property

json
// BAD (deprecated)
{
  "builds": [
    { "src": "api/**/*.ts", "use": "@vercel/node" }
  ]
}

// GOOD (current)
{
  "functions": {
    "api/**/*.ts": {
      "runtime": "nodejs20.x",
      "maxDuration": 30
    }
  }
}

P12: Middleware running on static assets

typescript
// BAD — middleware runs on every request including static files
export function middleware(request) { /* auth check */ }

// GOOD — exclude static assets
export const config = {
  matcher: ['/((?!_next/static|_next/image|favicon.ico).*)'],
};
Category 5: Cost Traps (Medium)

P13: Uncached high-traffic endpoints

typescript
// BAD — every request invokes a function
export default function handler(req, res) {
  res.json({ config: getConfig() }); // No cache headers
}

// GOOD — cache at the edge, save function invocations
export default function handler(req, res) {
  res.setHeader('Cache-Control', 's-maxage=3600, stale-while-revalidate=86400');
  res.json({ config: getConfig() });
}

P14: Over-allocated function memory

json
// BAD — 3GB for a simple JSON response
{
  "functions": { "api/config.ts": { "memory": 3008 } }
}

// GOOD — right-size per endpoint
{
  "functions": {
    "api/config.ts": { "memory": 128 },
    "api/image-process.ts": { "memory": 1024 }
  }
}

P15: Middleware doing heavy work

typescript
// BAD — database query on every request
export async function middleware(request) {
  const user = await db.user.findUnique({ where: { id: token.sub } });
  // Runs on EVERY matched request, expensive at scale
}

// GOOD — validate JWT locally, no DB call
export function middleware(request) {
  const token = request.cookies.get('session')?.value;
  // Verify JWT signature locally (cheap, no external call)
}

Quick Audit Script

bash
#!/usr/bin/env bash
echo "=== Vercel Pitfall Audit ==="

echo "P1: Secrets in NEXT_PUBLIC_:"
grep -rn 'NEXT_PUBLIC_.*SECRET\|NEXT_PUBLIC_.*KEY\|NEXT_PUBLIC_.*TOKEN' src/ api/ 2>/dev/null || echo "  PASS"

echo "P2: Hardcoded credentials:"
grep -rnE 'sk_live|sk_test|Bearer [a-zA-Z0-9]{20,}' src/ api/ 2>/dev/null || echo "  PASS"

echo "P8: Node.js APIs in edge files:"
grep -rn "from 'fs'\|from 'path'\|from 'child_process'" src/middleware.ts api/*edge* 2>/dev/null || echo "  PASS"

echo "P11: Deprecated builds:"
jq -e '.builds' vercel.json 2>/dev/null && echo "  FAIL: deprecated builds" || echo "  PASS"

echo "P12: Middleware without matcher:"
grep -L 'matcher' src/middleware.ts 2>/dev/null && echo "  WARN: no matcher configured" || echo "  PASS"

Output

  • Anti-patterns identified and classified by severity (Critical/High/Medium)
  • Security issues fixed and exposed secrets rotated
  • Performance improvements from lazy initialization and caching
  • ESLint and CI prevention measures blocking future regressions
Show full SKILL.md (181 more words)Show less

Error Handling

PitfallSeverityDetectionFix
P1: NEXT_PUBLIC_ secretsCriticalgrep scanRemove prefix, rotate secret
P4: Heavy cold startsHighCold start timingLazy initialization
P5: Missing responseHigh502 errors in logsReturn from all paths
P7: Connection exhaustionHighDB connection errorsUse connection pooler
P8: Node.js in edgeHighEDGE_FUNCTION_INVOCATION_FAILEDUse Web APIs
P13: No cache headersMediumHigh function invocations billAdd s-maxage

Examples

Fix an exposed client-side secret without preserving it

When a scan finds a NEXT_PUBLIC_ value that should be private, immediately stop treating the string as a valid secret, rotate it at the upstream provider, and remove the value from code and build settings. Replace the browser call with a server-side route that enforces authorization and returns only required data. Validate the fix in preview with synthetic traffic, check that the old credential is refused, and record the rotation outcome without placing either value in logs or documentation.

Resources

Next Steps

Return to vercel-install-auth for setup or vercel-reference-architecture for project structure.

© 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 2 other files (references) in skills/.curated/vercel-known-pitfalls of jeremylongshore/tons-of-skills-marketplace.

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

Open the folder on GitHubat commit cfae287

Compare with similar skills

Vercel Known Pitfalls 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 Known Pitfalls compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Vercel Known Pitfalls this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2.5kAutomated safety check: PassMIT
Deploy Verceljohnku2011/boilerplates-with-ai-skills240—~660Automated safety check: NotesMIT
Vercel Deploymentdavila7/claude-code-templates33k5 repos~534Automated safety check: PassMIT
Frontmcp Deploymentagentfront/frontmcp146—~9.2kAutomated safety check: NotesApache-2.0
Deploy Fullstack Vercelvellum-ai/vellum-assistant1.4k—~2.8kAutomated safety check: PassMIT
Vercelhoodini/ai-agents-skills282—~1.1kAutomated safety check: NotesNone

Similar skills

  • Deploy Vercel

    johnku2011/boilerplates-with-ai-skills

    A skill your agent uses when deploying or configuring this project on Vercel — env vars, build settings, serverless limits, and production checks for Next.js or Express.

    240 GitHub stars~660 tokensUpdated 1 mo ago
    Backend & APIsAuto-check: notes
  • Vercel Deployment

    davila7/claude-code-templates

    Expert knowledge for deploying to Vercel with Next.js Use when: vercel, deploy, deployment, hosting, production.

    33k GitHub starsUsed in 5 repos~534 tokens
    DevOps & CloudAuto-check passed
  • Frontmcp Deployment

    agentfront/frontmcp

    A skill your agent uses when deploying, building for production, packaging, or shipping a FrontMCP server.

    146 GitHub stars~9.2k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Deploy Fullstack Vercel

    vellum-ai/vellum-assistant

    Build and deploy a full-stack app (React frontend + Python/FastAPI backend) or a Vellum app to Vercel as a serverless demo with seeded data

    1.4k GitHub stars~2.8k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Vercel

    hoodini/ai-agents-skills

    Deploy and configure applications on Vercel. An agent skill from hoodini/ai-agents-skills.

    282 GitHub stars~1.1k tokensUpdated 3 mo ago
    Backend & APIsAuto-check: notes
  • Deploying Applications

    ancoleman/ai-design-components

    Deployment patterns from Kubernetes to serverless and edge functions.

    525 GitHub stars~3.1k tokensUpdated 10 mo ago
    DevOps & CloudAuto-check passed

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 Known Pitfalls

What does Vercel Known Pitfalls do?

Identify and avoid Vercel anti-patterns and common integration mistakes. Vercel Known Pitfalls is an agent skill from jeremylongshore/tons-of-skills-marketplace. Identify and avoid Vercel anti-patterns and common integration mistakes.

When should I use Vercel Known Pitfalls?

Vercel Known Pitfalls fits situations like: reviewing Vercel code for issues; onboarding new developers; auditing existing Vercel deployments for best practice violations; with phrases like vercel mistakes.

How do I install Vercel Known Pitfalls in Claude Code?

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

How do I install Vercel Known Pitfalls in Codex?

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

Can I use Vercel Known Pitfalls 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-known-pitfalls -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-known-pitfalls, .gemini/skills/vercel-known-pitfalls, .github/skills/vercel-known-pitfalls and .opencode/skills/vercel-known-pitfalls in your project.

What does Vercel Known Pitfalls need to run?

Going by SKILL.md and its folder, Vercel Known Pitfalls needs the command-line tools its instructions call (vercel and jq) and credentials named API_KEY, NEXT_PUBLIC_API_SECRET and API_SECRET. Our summary lists: Node.js; A credential in NEXT_PUBLIC_API_SECRET; A credential in API_SECRET. Its frontmatter pre-approves these tools: Read, Grep. Compatibility (from SKILL.md): Designed for Claude Code.

Does Vercel Known Pitfalls access the network?

SKILL.md names 1 domain. As links in the text: vercel.com. This is read from the text; nothing was executed.

Is Vercel Known Pitfalls safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Vercel Known Pitfalls use?

Vercel Known Pitfalls 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 Known Pitfalls use?

About 2.5k tokens (SKILL.md is roughly 10k 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 210 tokens, read only when the agent opens those files.

What are the alternatives to Vercel Known Pitfalls?

Skills that share tags, products or a category with Vercel Known Pitfalls: Deploy Vercel (johnku2011/boilerplates-with-ai-skills, 240 stars), Vercel Deployment (davila7/claude-code-templates, 33k stars), Frontmcp Deployment (agentfront/frontmcp, 146 stars) and Deploy Fullstack Vercel (vellum-ai/vellum-assistant, 1.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Vercel Known Pitfalls?

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.