AGENT SKILL

vercel-known-pitfalls

Execute identify and avoid Vercel anti-patterns and common integration mistakes. Use when reviewing Vercel code for issues, onboarding new developers, or auditing existing Vercel integrations for best practices violations. Trigger with phrases like "vercel mistakes", "vercel anti-patterns", "vercel pitfalls", "vercel what not to do", "vercel code review".

License 许可
MIT
最近更新
2026-05-26
Stars
★ 0
Forks
0

01 前言 Front Matter

name
vercel-known-pitfalls
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
version
1.0.0
description
Execute identify and avoid Vercel anti-patterns and common integration mistakes. Use when reviewing Vercel code for issues, onboarding new developers, or auditing existing Vercel integrations for best practices violations. Trigger with phrases like "vercel mistakes", "vercel anti-patterns", "vercel pitfalls", "vercel what not to do", "vercel code review".
allowed-tools
Read, Grep
compatible-with
claude-code, codex, openclaw

02 资源文件 2

03 SKILL.md 正文

Vercel Known Pitfalls

Prerequisites

  • Access to Vercel codebase for review
  • Understanding of async/await patterns
  • Knowledge of security best practices
  • Familiarity with rate limiting concepts

Instructions

Vercel anti-patterns cluster around three areas: configuration mistakes (hardcoded secrets in code instead of environment variables, wrong output directory settings, ignoring build cache directives), serverless function mistakes (performing expensive work outside the handler instead of warming it lazily, not handling cold starts, setting unrealistic timeout limits), and edge runtime mistakes (using Node.js-only APIs that are not available in the edge runtime). Addressing these systematically reduces deployment failures and cold-start latency.

Step 1: Review for Anti-Patterns

Scan the codebase for each pitfall pattern. Look for environment-specific URLs or API keys hardcoded in source files rather than referenced via process.env. Check serverless function files for module-level initialization of heavy objects like database connection pools, which bloats cold-start time. Audit any files using the export const runtime = 'edge' directive for incompatible Node.js API usage.

Step 2: Prioritize Fixes

Address security issues first: any hardcoded secrets must be rotated and moved to environment variables immediately. Then fix cold-start performance issues since they directly impact user experience on first load. Finally, address configuration issues that cause intermittent build failures.

Step 3: Implement Better Approach

Replace anti-patterns with recommended patterns. Move all secrets to Vercel environment variables, initialize heavy resources lazily inside handler functions, and use the @vercel/edge compatible API surface in edge runtime files.

Step 4: Add Prevention

Set up ESLint rules that flag hardcoded URL patterns matching your environments and add a CI step that validates edge runtime compatibility before deployment.

Output

  • Anti-patterns identified and classified by severity
  • Security, performance, and configuration fixes implemented
  • ESLint and CI prevention measures blocking future regressions
  • Code quality improved with documented rationale for each change

Error Handling

See ${CLAUDE_SKILL_DIR}/references/errors.md for comprehensive error handling.

Examples

See ${CLAUDE_SKILL_DIR}/references/examples.md for detailed examples.

Resources

Overview

Execute identify and avoid Vercel anti-patterns and common integration mistakes.

04 同仓库更多 Skills

SamuelChien
SamuelChien/mega-skills-collection

zustand-store-ts

Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state/action separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zustand-store-creator

Zustand Store Creator - Auto-activating skill for Frontend Development. Triggers on: zustand store creator, zustand store creator Part of the Frontend Development skill category.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zero-trust-config-helper

Zero Trust Config Helper - Auto-activating skill for Security Advanced. Triggers on: zero trust config helper, zero trust config helper Part of the Security Advanced skill category.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zapier-integration-helper

Zapier Integration Helper - Auto-activating skill for Business Automation. Triggers on: zapier integration helper, zapier integration helper Part of the Business Automation skill category.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zai-cli

Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP. Use when user needs image/video analysis, OCR, UI-to-code conversion, error diagnosis, real-time web search, web page to markdown extraction, or GitHub code exploration. Trigger with phrases like "analyze this image", "search the web for", "read this page", "explore this repo", or "use zai". Requires Z_AI_API_KEY.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

yt-research

Research competitor YouTube channels, niches, and trending topics for your content strategy. Use this skill whenever the user says "research channels", "analyze competitors", "find trending topics", "niche analysis", "competitive research", "what are other creators doing", "scrape YouTube channels", or wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.

★ 0