Vercel

From rawveg/skillsforge-marketplace · View interactive version

Vercel is an AI agent skill from the GitHub repository rawveg/skillsforge-marketplace. Vercel Platform and API Documentation

How to use this skill

Skill file

Vercel Skill

Comprehensive assistance with Vercel deployment, API integration, and platform features. This skill provides practical guidance for building and deploying modern web applications on Vercel's AI Cloud platform.

When to Use This Skill

This skill should be triggered when:

Quick Reference

Authentication with Access Token

# Using cURL with Vercel API
curl -X GET "https://api.vercel.com/v9/projects" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json"

Basic CLI Deployment

# Deploy to production
vercel --prod

# Deploy with environment variables
vercel --env NEXT_PUBLIC_API_URL=https://api.example.com

# Force new deployment without cache
vercel --force

# Deploy with build logs
vercel --logs

CI/CD Deployment Workflow

# Pull environment variables and project settings
vercel pull --yes --environment=preview --token=$VERCEL_TOKEN

# Build locally
vercel build --token=$VERCEL_TOKEN

# Deploy pre-built artifacts
vercel deploy --prebuilt --token=$VERCEL_TOKEN

vercel.json - Cron Jobs Configuration

{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "crons": [
    {
      "path": "/api/every-minute",
      "schedule": "* * * * *"
    },
    {
      "path": "/api/every-hour",
      "schedule": "0 * * * *"
    },
    {
      "path": "/api/daily-cleanup",
      "schedule": "0 0 * * *"
    }
  ]
}

vercel.json - Build Configuration

{
  "buildCommand": "npm run build",
  "outputDirectory": "dist",
  "framework": "nextjs",
  "installCommand": "npm install"
}

Environment Variables Configuration

{
  "env": {
    "API_URL": "https://api.example.com",
    "FEATURE_FLAG": "true"
  },
  "build": {
    "env": {
      "BUILD_TIME": "@now"
    }
  }
}

Accessing Team Resources via API

# Get team deployments
curl -X GET "https://api.vercel.com/v6/deployments?teamId=TEAM_ID" \
  -H "Authorization: Bearer YOUR_TOKEN"

# Create deployment for team project
curl -X POST "https://api.vercel.com/v13/deployments?teamId=TEAM_ID" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-project", "files": []}'

Bun Runtime Configuration

{
  "bunVersion": "1.0.0",
  "functions": {
    "api/**/*.ts": {
      "runtime": "bun"
    }
  }
}

Serverless Function Example

// api/hello.js
export default function handler(req, res) {
  const { name = 'World' } = req.query;
  res.status(200).json({
    message: `Hello ${name}!`,
    timestamp: new Date().toISOString()
  });
}

Edge Function Example

// middleware.js
export const config = {
  matcher: '/api/:path*',
};

export default function middleware(req) {
  const response = NextResponse.next();
  response.headers.set('x-custom-header', 'my-value');
  return response;
}

Key Concepts

REST API Architecture

The Vercel REST API operates at https://api.vercel.com following REST principles. All requests require:

Rate Limiting

API responses include rate limit headers:

Exceeding limits returns HTTP 429 with "too_many_requests" error.

Pagination

Token Security

Deployment Workflow

  1. Preview Deployments: Automatic deployments for every git push to non-production branches
  2. Production Deployments: Deployments to production domain from main branch or via --prod flag
  3. Build Artifacts: Local builds with vercel build upload only compiled output
  4. Environment Variables: Different values for development, preview, and production

Reference Files

This skill includes comprehensive documentation in references/:

Use view to read specific reference files when detailed information is needed.

Working with This Skill

For Beginners

Start with basic deployment workflows:

  1. Install Vercel CLI: npm i -g vercel
  2. Authenticate: vercel login
  3. Deploy your first project: vercel
  4. Learn about vercel.json configuration basics

For Intermediate Users

Focus on:

For Advanced Users

Explore:

Navigation Tips

Platform Capabilities

Computing Infrastructure

Development Features

AI Capabilities

Performance & Optimization

Common Use Cases

  1. Marketing Sites: Rapid deployment with preview environments
  2. E-commerce Platforms: Composable commerce with serverless architecture
  3. SaaS Applications: Multi-tenant applications with edge computing
  4. AI Applications: AI-powered apps with intelligent infrastructure
  5. API Backends: Hosting RESTful APIs and GraphQL servers
  6. Static Sites: Optimized static site delivery
  7. Jamstack Applications: Modern web architectures

Resources

Official Documentation

references/

Organized documentation extracted from official sources. These files contain:

scripts/

Add helper scripts here for common automation tasks such as:

assets/

Add templates, boilerplate, or example projects here such as:

Best Practices

  1. Security
  1. Performance
  1. Configuration
  1. API Integration

Notes

Updating

To refresh this skill with updated documentation:

  1. Re-run the documentation scraper with Vercel URLs
  2. Update reference files with latest API changes
  3. Verify code examples against current API versions
  4. Test configurations with latest CLI version
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.