vercel-functions

Configure and optimize Vercel Functions across Node.js, Bun, Python, and container runtimes.

Updated Sep 17, 2026
One-click install
npx skills add https://github.com/ridhijain709/AIPORSCHE --skill vercel-functions-ridhijain709
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-functions
Source: https://github.com/ridhijain709/AIPORSCHE/tree/main/.agents/skills/vercel-functions
Command: npx skills add https://github.com/ridhijain709/AIPORSCHE --skill vercel-functions-ridhijain709

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Serverless code on Vercel fails in predictable ways — 504 timeouts, 250 MB bundle errors, Edge runtime limitations, and ephemeral filesystem writes — and this Skill provides the expert guidance to configure, debug, and optimize Vercel Functions correctly. ## Core Features & Use Cases - Runtime Selection & Migration: Choose between Node.js, Bun, Python, Rust, and Docker/OCI container images, with concrete guidance for migrating off the deprecated Edge runtime. - Duration & Bundle Limits: Configure maxDuration up to 1800s (30 min beta), enable 5 GB large functions, and shrink bundles with excludeFiles and output tracing. - Validation & Anti-Pattern Detection: Built-in rules flag default exports in route handlers, local filesystem writes, in-process caches, manual retry loops, and Express usage, with upgrade paths to Workflow, AI SDK, and Vercel Storage. - Use Case: A developer hits a 504 FUNCTION_INVOCATION_TIMEOUT on a long-running AI report endpoint; the Skill guides them to set per-function maxDuration, stream heartbeats, or move the work to Vercel Workflow. ## Quick Start Ask the assistant to review your Vercel route handler and recommend the correct runtime, duration, and bundle configuration.

Frequently Asked Questions about vercel-functions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I increase the Vercel function timeout limit?

Set maxDuration in your route file (export const maxDuration = 800) or in vercel.json under functions. Pro and Enterprise support up to 800s generally and 1800s via the extended-duration beta; Hobby is capped at 300s.

Should I use the Edge runtime or Node.js on Vercel?

Use Node.js. Vercel recommends migrating from Edge to Node.js, and Next.js 16.3+ no longer supports the Edge runtime. Node.js on Fluid Compute offers full APIs, longer durations, and larger bundles at the same price.

How do I fix the 250 MB unzipped maximum size error on Vercel?

Enable large functions (5 GB bundles) by setting the VERCEL_SUPPORT_LARGE_FUNCTIONS environment variable and redeploying, which requires Fluid Compute. Alternatively, shrink the bundle with excludeFiles in vercel.json or outputFileTracingExcludes in next.config.js.

Can I run a Docker container as a Vercel Function?

Yes. Add a Dockerfile.vercel or Containerfile.vercel at the project root and Vercel builds it into an autoscaling, scale-to-zero Function. This supports custom system libraries like FFmpeg or Chromium and languages like Go or Ruby.

Why does writing files to disk fail in a Vercel serverless function?

Serverless functions have ephemeral, read-only filesystems, so writeFile and createWriteStream do not persist data. Use Vercel Blob, Neon, or Upstash for persistent storage instead of local filesystem writes.

Do Vercel Functions support WebSockets and streaming?

Yes. Node.js functions support zero-config streaming by returning a ReadableStream, and WebSockets are supported on Fluid Compute. Stream progress or heartbeats for long-running handlers since HTTP/1.1 clients may close idle connections.