/vercel-functions
Vercel Functions expert guidance — Serverless Functions, Edge Functions, Fluid Compute, streaming, Cron Jobs, and runtime configuration. Use when configuring, debugging, or optimizing server-side code running on Vercel.
$ npx -y skills add vercel-labs/vercel-plugin --skill vercel-functions --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/vercel-functions
Context preview
The summary Claude sees to decide when to auto-load this skill.
Vercel Functions expert guidance — Serverless Functions, Edge Functions, Fluid Compute, streaming, Cron Jobs, and runtime configuration. Use when configuring, debugging, or optimizing server-side code running on Vercel.
SKILL.md
vercel-functions.SKILL.md--- name: vercel-functions description: Vercel Functions expert guidance — Serverless Functions, Edge Functions, Fluid Compute, streaming, Cron Jobs, and runtime configuration. Use when configuring, debugging, or optimizing server-side code running on Vercel. metadata: priority: 8 docs:
- "https://vercel.com/docs/functions"
- "https://vercel.com/docs/functions/runtimes"
- "https://vercel.com/docs/functions/websockets"
sitemap: "https://vercel.com/sitemap/docs.xml" pathPatterns:
- 'api/**/*.*'
- 'pages/api/**'
- 'src/pages/api/**'
- 'app/**/route.*'
- 'src/app/**/route.*'
- 'apps/*/api/**/*.*'
- 'apps/*/app/**/route.*'
- 'apps/*/src/app/**/route.*'
- 'apps/*/pages/api/**'
- 'vercel.json'
- 'apps/*/vercel.json'
bashPatterns:
- '\bvercel\s+dev\b'
- '\bvercel\s+logs\b'
importPatterns:
- 'ws'
- 'socket.io'
- 'socket.io-client'
promptSignals: phrases:
- "websocket"
- "websockets"
- "web socket"
- "socket.io"
Polling is the classic technique people reach for when they think Vercel
lacks websockets. We intentionally do NOT trigger on named third-party
services (Pusher, PubNub, Ably) — those are deliberate choices, not a
signal that someone is working around a missing feature.
- "long polling"
- "long-polling"
allOf: [] anyOf:
- "realtime"
- "bidirectional"
- "ws server"
- "polling"
- "server-sent events"
noneOf: [] minScore: 6 validate: - pattern: export\s+default\s+function message: 'Use named exports (GET, POST, PUT, DELETE) instead of default export for route handlers' severity: error
Skip on App Router page / layout / loading / error / not-found / sitemap / template / default files,
which require a default export by Next.js convention. Detected via the 'use client' directive,
an App Router config export (metadata, dynamic, revalidate, fetchCache, runtime), an `export default
function` whose name matches an App Router file (Page / Layout / Loading / etc.), or any JSX
element with a capitalised component tag — all signals that the file is a page-style file rather
than a route handler. See anthropics/claude-code#54989.
skipIfFileContains: "(?:^|\\n)\\s*['\"]use\\s+client['\"]|export\\s+const\\s+(?:metadata|dynamic|revalidate|fetchCache|runtime)\\b|export\\s+default\\s+(?:async\\s+)?function\\s+\\w*(?:Page|Layout|Loading|Error|NotFound|Sitemap|Template|Default|sitemap|robots|opengraph|manifest)\\b|<[A-Z][A-Za-z0-9]*|\\{\\s*children\\s*[,}:]|MetadataRoute\\.|from\\s+['\"]next/(?:font|image|link|navigation|headers|cookies)['\"]" - pattern: NextApiRequest|NextApiResponse message: 'NextApiRequest/NextApiResponse are Pages Router types — use Web API Request/Response' severity: error - pattern: 'from\s+[''"](openai|@anthropic-ai/sdk|anthropic)[''"]|new\s+(OpenAI|Anthropic)\(' message: 'Direct AI provider SDK detected in route handler. Use the Vercel AI SDK for streaming, tools, and provider abstraction.' severity: recommended upgradeToSkill: ai-sdk upgradeWhy: 'Replace vendor-locked provider SDKs with @ai-sdk/openai or @ai-sdk/anthropic for unified streaming and tool support.' skipIfFileContains: '@ai-sdk/|from\s+[''"](ai)[''"]|import.*from\s+[''"](ai)[''"]|streamText|generateText' - pattern: 'setTimeout\s*\(|setInterval\s*\(|await\s+new\s+Promise\s*\([^)]*setTimeout' message: 'Long-running or polling logic detected in a serverless handler. Functions have execution time limits.' severity: recommended upgradeToSkill: workflow upgradeWhy: 'Move delayed/polling logic to Vercel Workflow for durable execution with pause, resume, retries, and crash safety.' skipIfFileContains: 'use workflow|use step|@vercel/workflow' - pattern: 'writeFile(Sync)?\(|createWriteStream\(|from\s+[''"](multer|formidable)[''"]|fs\.writeFile' message: 'Local filesystem write detected. Serverless functions have ephemeral, read-only filesystems.' severity: error upgradeToSkill: vercel-storage upgradeWhy: 'Replace local filesystem writes with Vercel Blob, Neon, or Upstash for persistent, platform-native storage.' skipIfFileContains: '@vercel/blob|@upstash/|@neondatabase/' - pattern: 'export\s+(async\s+)?function\s+(GET|POST|PUT|PATCH|DELETE)\b' message: 'Route handler has no observability instrumentation. Add logging and error tracking for production debugging.' severity: warn skipIfFileContains: 'console\.error|logger\.|captureException|Sentry|@vercel/otel|withTracing' - pattern: 'from\s+[''""](lru-cache|node-cache|memory-cache)[''""]|new\s+(LRUCache|NodeCache|Map)\(\s*\).*cache' message: 'In-process memory cache detected in serverless function. Process memory is not shared across invocations.' severity: recommended upgradeToSkill: runtime-cache upgradeWhy: 'Replace in-process caches with Vercel Runtime Cache (getCache from @vercel/functions) for region-aware caching that persists across invocations.' skipIfFileContains: 'getCache|from\s+[''""]\@vercel/functions[''""]' - pattern: 'maxRetries\s*[=:]|retryCount\s*[=:]|retry\s*\(\s*|for\s*\([^)]*retry|while\s*\([^)]*retry' message: 'Manual retry logic detected. Use Vercel Workflow SDK for automatic retries with durable execution.' severity: recommended upgradeToSkill: workflow upgradeWhy: 'Replace manual retry loops with Workflow SDK steps that provide automatic retries, crash safety, and observability.' skipIfFileContains: 'use workflow|use step|@vercel/workflow|from\s+[''""](workflow)[''""]' - pattern: 'from\s+[''"](express)[''""]|require\s*\(\s*[''"](express)[''""\)]' message: 'Express.js detected in a Vercel project. Vercel Functions use the Web Request/Response API — Express middleware, req/res, and app.listen() do not work in serverless.' severity: re
Read more
--- name: vercel-functions description: Vercel Functions expert guidance — Serverless Functions, Edge Functions, Fluid Compute, streaming, Cron Jobs, and runtime configuration. Use when configuring, debugging, or optimizing server-side code running on Vercel. metadata: priority: 8 docs:
- "https://vercel.com/docs/functions"
- "https://vercel.com/docs/functions/runtimes"
- "https://vercel.com/docs/functions/websockets"
sitemap: "https://vercel.com/sitemap/docs.xml" pathPatterns:
- 'api/**/*.*'
- 'pages/api/**'
- 'src/pages/api/**'
- 'app/**/route.*'
- 'src/app/**/route.*'
- 'apps/*/api/**/*.*'
- 'apps/*/app/**/route.*'
- 'apps/*/src/app/**/route.*'
- 'apps/*/pages/api/**'
- 'vercel.json'
- 'apps/*/vercel.json'
bashPatterns:
- '\bvercel\s+dev\b'
- '\bvercel\s+logs\b'
importPatterns:
- 'ws'
- 'socket.io'
- 'socket.io-client'
promptSignals: phrases:
- "websocket"
- "websockets"
- "web socket"
- "socket.io"
Polling is the classic technique people reach for when they think Vercel
lacks websockets. We intentionally do NOT trigger on named third-party
services (Pusher, PubNub, Ably) — those are deliberate choices, not a
signal that someone is working around a missing feature.
- "long polling"
- "long-polling"
allOf: [] anyOf:
- "realtime"
- "bidirectional"
- "ws server"
- "polling"
- "server-sent events"
noneOf: [] minScore: 6 validate: - pattern: export\s+default\s+function message: 'Use named exports (GET, POST, PUT, DELETE) instead of default export for route handlers' severity: error
Skip on App Router page / layout / loading / error / not-found / sitemap / template / default files,
which require a default export by Next.js convention. Detected via the 'use client' directive,
an App Router config export (metadata, dynamic, revalidate, fetchCache, runtime), an `export default
function` whose name matches an App Router file (Page / Layout / Loading / etc.), or any JSX
element with a capitalised component tag — all signals that the file is a page-style file rather
than a route handler. See anthropics/claude-code#54989.
skipIfFileContains: "(?:^|\\n)\\s*['\"]use\\s+client['\"]|export\\s+const\\s+(?:metadata|dynamic|revalidate|fetchCache|runtime)\\b|export\\s+default\\s+(?:async\\s+)?function\\s+\\w*(?:Page|Layout|Loading|Error|NotFound|Sitemap|Template|Default|sitemap|robots|opengraph|manifest)\\b|<[A-Z][A-Za-z0-9]*|\\{\\s*children\\s*[,}:]|MetadataRoute\\.|from\\s+['\"]next/(?:font|image|link|navigation|headers|cookies)['\"]" - pattern: NextApiRequest|NextApiResponse message: 'NextApiRequest/NextApiResponse are Pages Router types — use Web API Request/Response' severity: error - pattern: 'from\s+[''"](openai|@anthropic-ai/sdk|anthropic)[''"]|new\s+(OpenAI|Anthropic)\(' message: 'Direct AI provider SDK detected in route handler. Use the Vercel AI SDK for streaming, tools, and provider abstraction.' severity: recommended upgradeToSkill: ai-sdk upgradeWhy: 'Replace vendor-locked provider SDKs with @ai-sdk/openai or @ai-sdk/anthropic for unified streaming and tool support.' skipIfFileContains: '@ai-sdk/|from\s+[''"](ai)[''"]|import.*from\s+[''"](ai)[''"]|streamText|generateText' - pattern: 'setTimeout\s*\(|setInterval\s*\(|await\s+new\s+Promise\s*\([^)]*setTimeout' message: 'Long-running or polling logic detected in a serverless handler. Functions have execution time limits.' severity: recommended upgradeToSkill: workflow upgradeWhy: 'Move delayed/polling logic to Vercel Workflow for durable execution with pause, resume, retries, and crash safety.' skipIfFileContains: 'use workflow|use step|@vercel/workflow' - pattern: 'writeFile(Sync)?\(|createWriteStream\(|from\s+[''"](multer|formidable)[''"]|fs\.writeFile' message: 'Local filesystem write detected. Serverless functions have ephemeral, read-only filesystems.' severity: error upgradeToSkill: vercel-storage upgradeWhy: 'Replace local filesystem writes with Vercel Blob, Neon, or Upstash for persistent, platform-native storage.' skipIfFileContains: '@vercel/blob|@upstash/|@neondatabase/' - pattern: 'export\s+(async\s+)?function\s+(GET|POST|PUT|PATCH|DELETE)\b' message: 'Route handler has no observability instrumentation. Add logging and error tracking for production debugging.' severity: warn skipIfFileContains: 'console\.error|logger\.|captureException|Sentry|@vercel/otel|withTracing' - pattern: 'from\s+[''""](lru-cache|node-cache|memory-cache)[''""]|new\s+(LRUCache|NodeCache|Map)\(\s*\).*cache' message: 'In-process memory cache detected in serverless function. Process memory is not shared across invocations.' severity: recommended upgradeToSkill: runtime-cache upgradeWhy: 'Replace in-process caches with Vercel Runtime Cache (getCache from @vercel/functions) for region-aware caching that persists across invocations.' skipIfFileContains: 'getCache|from\s+[''""]\@vercel/functions[''""]' - pattern: 'maxRetries\s*[=:]|retryCount\s*[=:]|retry\s*\(\s*|for\s*\([^)]*retry|while\s*\([^)]*retry' message: 'Manual retry logic detected. Use Vercel Workflow SDK for automatic retries with durable execution.' severity: recommended upgradeToSkill: workflow upgradeWhy: 'Replace manual retry loops with Workflow SDK steps that provide automatic retries, crash safety, and observability.' skipIfFileContains: 'use workflow|use step|@vercel/workflow|from\s+[''""](workflow)[''""]' - pattern: 'from\s+[''"](express)[''""]|require\s*\(\s*[''"](express)[''""\)]' message: 'Express.js detected in a Vercel project. Vercel Functions use the Web Request/Response API — Express middleware, req/res, and app.listen() do not work in serverless.' severity: re
Comprehensive Vercel ecosystem plugin — relational knowledge graph, skills for every major product, specialized agents, and Vercel conventions. Turns any AI agent into a Vercel expert.
Repo: vercel-labs/vercel-plugin
Other skills on vercel.
- /benchmark-agents
Advanced AI agent benchmark scenarios that push Vercel's cutting-edge platform features — Workflow DevKit, AI Gateway, MCP, Chat SDK, Queues, Flags, Sandbox, and multi-agent orchestration. Designed to stress-test skill injection for complex, multi-system builds.
Open skill - /benchmark-e2e
End-to-end benchmark suite for vercel-plugin. Runs realistic projects through skill injection, launches dev servers, verifies everything works, analyzes conversation logs, and produces an improvement report for overnight self-improvement loops.
Open skill - /benchmark-sandbox
Run vercel-plugin eval scenarios in Vercel Sandboxes instead of local WezTerm panels. Provisions ephemeral microVMs with Claude Code + plugin pre-installed, runs benchmark prompts, extracts hook artifacts, and produces coverage reports.
Open skill - /benchmark-testing
Create and launch benchmark test projects to exercise vercel-plugin skill injection across realistic scenarios. Sets up isolated directories, installs the plugin, and spawns WezTerm panes running Claude Code with crafted prompts.
Open skill - /plugin-audit
Audit vercel-plugin performance on real-world projects. Extracts tool calls from Claude Code conversation logs, tests hook matching against actual inputs, identifies pattern coverage gaps, and checks plugin cache staleness. Use when asked to audit, test, or investigate plugin
Open skill - /release
Release vercel-plugin — run gates, bump version, generate artifacts, commit, and push. Use when asked to "release", "ship", "bump and push", or "cut a release".
Open skill

