vercel-functions
БесплатноБез исполняемых скриптовНе проверенVercel Functions expert guidance — Node.js/Bun/Python runtimes, Fluid Compute, long-duration (30 min) functions, large functions (5 GB bundles), Docker/OCI…
от vercel★ 356 звёзд на GitHubОб этом скилле
Vercel Functions
You are an expert in Vercel Functions — the compute layer of the Vercel platform.
Prefer Node.js over the Edge runtime
Strongly prefer Node.js. Don't reach for runtime = 'edge' in new code, and recommend migrating off it when you find it in existing code.
This follows Vercel's own documented guidance — "we recommend migrating from edge to Node.js for improved performance and reliability" — and one hard constraint: as of Next.js 16.3, runtime = 'edge' is no longer supported. Routes and pages there run on Node.js regardless of what you write, so on 16.3+ this stops being a recommendation and becomes a migration you have to do.
Everywhere else it is a strong default, not a prohibition. Both runtimes run on the same Fluid Compute infrastructure, in the same regions, under the same Active CPU pricing — so in nearly every case Edge gains you nothing while costing you most of the Node.js API surface. If you have a specific, tested reason to stay on Edge, that's a legitimate call; just make it deliberately rather than by habit.
The default to reach for
// app/api/hello/route.ts — no runtime export needed.
export async function GET() {
return Response.json({ message: 'Hello from Node.js on Fluid Compute' })
}
Node.js is the default. Omit export const runtime entirely rather than writing export const runtime = 'nodejs'.
Reasons people reach for Edge — and what to do instead
| "I need Edge because…" | Reality | Do this instead |
|---|---|---|
| "…I need to stream / SSE / AI tokens" | Streaming is zero-config on Node.js. This is the single most common false belief. | Return a ReadableStream from a normal Node.js function |
| "…I need low latency" | Both run on Fluid Compute. Fluid pre-warms instances and caches bytecode; the difference is noise next to your DB/API round trips | Stay on Node.js; pin regions near your data |
| "…auth checks / redirects / A-B tests at the edge" | That's Routing Middleware's job, and Routing Middleware supports full Node.js — it is not edge-only | Use Routing Middleware (routing-middleware skill) |
| "…it's cheaper" | Identical Active CPU pricing | Stay on Node.js |
| "…it has faster cold starts" | Fluid Compute reuses warm instances across concurrent invocations and bytecode-caches Node 20+ in production | Stay on Node.js |
| "…my function must run globally" | Edge's global execution usually hurts — every DB query crosses an ocean | Single region (iad1 default) next to your database |
What Edge actually costs you
- No
fs, no native modules, norequire()— ESM only, and most npm packages with Node.js dependencies simply will not load - No
eval/new Function/ dynamicWebAssembly.instantiate - Code size limit after gzip: 1 MB (Hobby), 2 MB (Pro), 4 MB (Enterprise) — versus 250 MB uncompressed (up to 5 GB) on Node.js
- Must begin sending a response within 25 seconds (it may then stream for up to 300s). The 300s/800s/1800s duration limits below apply to the Node.js, Bun, and Python runtimes — not to Edge
- No long-duration or large-function support of any kind
Migrating an existing Edge function
Worth doing when you're already touching the file, and required on Next.js 16.3+. An Edge function that works today isn't an emergency.
- Remove
export const runtime = 'edge'(orruntime: 'edge'invercel.json/ theconfigobject). - Replace
next/serverEdge-only imports where applicable; the WebRequest/Responsehandler signature is unchanged, so most route handlers need no other edit. - If you pinned execution with the Edge-only
preferredRegion, useregionsinvercel.jsoninstead. - Confirm Fluid Compute is on (default since April 23, 2025) and redeploy.
There is no rollback story to plan for: Node.js is a superset of what the function could do on Edge.
Function Types
Node.js (the default)
- Full Node.js runtime, all npm packages available
- Default for Next.js route handlers, Server Actions, Server Components, and any file in
/api - Node.js 26 LTS is GA and the default for new projects for builds and functions (V8 14.6, Temporal API, HTTP/2 by default for built-in
fetch; setVERCEL_FETCH_DISABLE_H2=1to keep HTTP/1.1). Existing projects move to 26 on their next deployment only ifengines.nodeallows it (e.g.>=20). Available versions: 26.x, 24.x, 22.x. Node.js 20 was deprecated on October 1, 2026: new deployments that targetnodejs20.xfail (already-deployed functions keep running), so move off it. Prebuilt deploys of Node.js 26 functions need Vercel CLI 65.8.0+ - Duration: 300s default on every plan; 800s max on Pro/Enterprise; 1800s with the extended-duration beta
Bun
Add "bunVersion": "1.x" to vercel.json to run functions on Bun instead of Node.js. ~28% lower latency for CPU-bound workloads. Supports Next.js, Express, Hono, Nitro, and Bun.serve as an entrypoint. Bun supports both large functions and extended max d
Установить vercel-functions в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл vercel-functions?
Vercel Functions expert guidance — Node.js/Bun/Python runtimes, Fluid Compute, long-duration (30 min) functions, large functions (5 GB bundles), Docker/OCI container images, plan limits, streaming, WebSockets, and legacy Cron Jobs (new scheduled work belongs to vercel-schedules). Use when configuring, debugging, or optimizing server-side code running on Vercel.
Как установить скилл vercel-functions?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл vercel-functions запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic