vercel-functions

Configure, debug, and optimize Vercel Serverless and Edge Functions with runtime guidance.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers building server-side code on Vercel often misuse runtimes, hit timeout limits, write to ephemeral filesystems, or assume WebSockets and streaming require third-party services. This Skill provides expert guidance on Vercel Functions so you configure the right runtime, avoid common pitfalls, and use platform-native features correctly. ## Core Features & Use Cases - Runtime Selection & Configuration: Choose between Node.js Serverless, Edge, Bun, and Rust runtimes, and configure maxDuration, memory, and regions via vercel.json. - Streaming, WebSockets & Cron: Implement SSE streaming, native WebSocket servers (ws, Socket.IO, experimental_upgradeWebSocket), and scheduled Cron Jobs with proper authentication. - Diagnostics & Validation: Diagnose 500 errors, timeouts, cold starts, and Edge invocation failures, with built-in lint rules that flag anti-patterns like filesystem writes, in-memory caches, and manual retry loops. - Use Case: You are adding a realtime chat feature to a Next.js app and assume you need Pusher. This Skill shows you how to serve WebSockets directly from a Vercel Function using Fluid Compute, with reconnection and external state guidance. ## Quick Start Ask the assistant to help you create or debug a Vercel Function, such as setting up a WebSocket endpoint or fixing a function timeout in your Next.js API route.

Frequently Asked Questions about vercel-functions

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

FAQPage Schema
How do I add WebSockets to a Vercel serverless function?

Vercel Functions support native WebSockets on Fluid Compute with no third-party service required. Export an http.Server with the ws library, or use experimental_upgradeWebSocket from @vercel/functions inside a Next.js route handler.

Do I need the Edge runtime for streaming or SSE on Vercel?

No, streaming and Server-Sent Events work on the default Node.js runtime with zero config. Staying on Node.js keeps full npm package access and longer durations; Edge offers no streaming advantage.

What is the difference between Vercel Serverless and Edge Functions?

Serverless Functions run full Node.js with all npm packages and up to 800s duration, while Edge Functions use V8 isolates with under 1ms cold starts but a limited Web-standard API surface and a 25s hard timeout.

Why does my Vercel function fail when writing files?

Serverless functions have ephemeral, read-only filesystems, so writeFile and createWriteStream fail or lose data between invocations. Use Vercel Blob, Neon, or Upstash for persistent storage instead.

How do I fix Vercel function timeout errors?

All plans default to 300s with Fluid Compute, and Pro or Enterprise can configure up to 800s via maxDuration in vercel.json. For tasks lasting hours, move the logic to the Vercel Workflow SDK for durable execution.

Can I use Express.js in Vercel Functions?

Express middleware, req/res objects, and app.listen do not work in the serverless model. Use Next.js route handlers with exported GET/POST functions or the Web Request/Response API instead.