<< All versions
Skill v1.0.1
currentAutomated scan100/100hoodini/ai-agents-skills/vercel
1 files
──Details
PublishedJune 28, 2026 at 01:01 AM
Content Hashsha256:307410ddb90f2f2c...
Git SHA83e2083e3ec8
Bump Typepatch
──Files
Files (1 file, 4.1 KB)
SKILL.md4.1 KBactive
SKILL.md · 206 lines · 4.1 KB
version: "1.0.1" name: vercel description: Deploy and configure applications on Vercel. Use when deploying Next.js apps, configuring serverless functions, setting up edge functions, or managing Vercel projects. Triggers on Vercel, deploy, serverless, edge function, Next.js deployment.
Vercel Deployment
Deploy and scale applications on Vercel's edge network.
Quick Start
bash
# Install Vercel CLInpm i -g vercel# Deployvercel# Production deployvercel --prod
vercel.json Configuration
json
{"buildCommand": "npm run build","outputDirectory": ".next","framework": "nextjs","regions": ["iad1", "sfo1"],"functions": {"api/**/*.ts": {"memory": 1024,"maxDuration": 30}},"rewrites": [{ "source": "/api/:path*", "destination": "/api/:path*" },{ "source": "/:path*", "destination": "/" }],"headers": [{"source": "/api/:path*","headers": [{ "key": "Access-Control-Allow-Origin", "value": "*" }]}],"env": {"DATABASE_URL": "@database-url"}}
Serverless Functions
typescript
// api/hello.tsimport type { VercelRequest, VercelResponse } from '@vercel/node';export default function handler(req: VercelRequest, res: VercelResponse) {const { name = 'World' } = req.query;res.status(200).json({ message: `Hello ${name}!` });}
Edge Functions
typescript
// api/edge.tsexport const config = {runtime: 'edge',};export default function handler(request: Request) {return new Response(JSON.stringify({ message: 'Hello from Edge!' }), {headers: { 'content-type': 'application/json' },});}
Next.js App Router
typescript
// app/api/route.tsimport { NextResponse } from 'next/server';export async function GET(request: Request) {const { searchParams } = new URL(request.url);const name = searchParams.get('name') ?? 'World';return NextResponse.json({ message: `Hello ${name}!` });}export async function POST(request: Request) {const body = await request.json();return NextResponse.json({ received: body });}
ISR (Incremental Static Regeneration)
typescript
// app/posts/[id]/page.tsxexport const revalidate = 60; // Revalidate every 60 secondsexport async function generateStaticParams() {const posts = await getPosts();return posts.map((post) => ({ id: post.id }));}export default async function Post({ params }: { params: { id: string } }) {const post = await getPost(params.id);return <article>{post.content}</article>;}
Vercel KV (Redis)
typescript
import { kv } from '@vercel/kv';// Setawait kv.set('user:123', { name: 'Alice', visits: 0 });// Getconst user = await kv.get('user:123');// Incrementawait kv.incr('user:123:visits');// Hash operationsawait kv.hset('session:abc', { userId: '123', expires: Date.now() + 3600000 });const session = await kv.hgetall('session:abc');
Vercel Postgres
typescript
import { sql } from '@vercel/postgres';// Queryconst { rows } = await sql`SELECT * FROM users WHERE id = ${userId}`;// Insertawait sql`INSERT INTO users (name, email) VALUES (${name}, ${email})`;// Transactionawait sql.query('BEGIN');try {await sql`UPDATE accounts SET balance = balance - ${amount} WHERE id = ${from}`;await sql`UPDATE accounts SET balance = balance + ${amount} WHERE id = ${to}`;await sql.query('COMMIT');} catch (e) {await sql.query('ROLLBACK');throw e;}
Environment Variables
bash
# Add secretvercel env add DATABASE_URL production# Pull env vars locallyvercel env pull .env.local# List env varsvercel env ls
Cron Jobs
json
// vercel.json{"crons": [{"path": "/api/daily-job","schedule": "0 0 * * *"}]}
typescript
// api/daily-job.tsexport default function handler(req, res) {// Verify it's from Vercel Cronif (req.headers['authorization'] !== `Bearer ${process.env.CRON_SECRET}`) {return res.status(401).end();}// Run jobawait runDailyJob();res.status(200).end();}
Resources
- Vercel Docs: https://vercel.com/docs
- Next.js on Vercel: https://vercel.com/docs/frameworks/nextjs