Logo Vercel Deployment

Vercel Deployment

Cộng đồng
Omar-Obando
vercel-deployment

Use when deploying applications to Vercel, configuring serverless functions, edge computing, caching strategies, and optimizing Next.js deployments. Includes Vercel CLI, Edge Functions, and performance optimization. Based on Vercel Certified Developer and modern web deployment best practices.

Tổng quan

Nhà phát hànhOmar-Obando
Kho mãqwen-orchestrator
Tên kỹ năngvercel-deployment
Sao
53
Bản fork
13
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được Omar-Obando công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Vercel Deployment trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/Omar-Obando/qwen-orchestrator/tree/main/skills/vercel-deployment
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Omar-Obando/qwen-orchestrator.git /tmp/qwen-orchestrator
mkdir -p .claude/skills
cp -r /tmp/qwen-orchestrator/skills/vercel-deployment .claude/skills/vercel-deployment
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Vercel Deployment trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Vercel Deployment ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Vercel Deployment với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Vercel Deployment Skill — Serverless & Edge Computing

Overview

This skill provides comprehensive guidance for deploying applications to Vercel, configuring serverless functions, edge computing, caching strategies, and optimizing Next.js deployments. It includes Vercel CLI, Edge Functions, and performance optimization. Based on Vercel Certified Developer and modern web deployment best practices.

When to Use

Use this skill when:

  • Deploying Next.js applications to Vercel
  • Configuring serverless functions for Vercel Functions
  • Setting up edge computing with Vercel Edge Functions
  • Optimizing caching strategies (edge caching, static asset caching)
  • Using Vercel CLI for development (vercel dev) and deployment
  • Configuring environment variables and secrets in Vercel
  • Setting up preview deployments for pull requests
  • Configuring custom domains and SSL certificates
  • Optimizing Next.js build configurations for Vercel
  • Implementing middleware at the edge
  • Using Vercel Analytics and monitoring
  • Deploying with Git integration (GitHub, GitLab, Bitbucket)
  • Setting up automatic deployments on push
  • Configuring build environment variables

Do NOT use this skill when:

  • Writing application business logic (use developer skill or specific framework skill)
  • Designing database schema (use database-design skill)
  • Creating UI components (use frontend-design skill)
  • Managing non-Vercel cloud infrastructure (use aws-serverless, azure-cloud, or gcp-cloud skills)
  • Performing security audits (use security-auditor skill)
  • Setting up Kubernetes deployments (use devops-pipeline skill)
  • Deploying to Cloudflare Pages (use cloudflare-pages skill)
  • Developing Cloudflare Workers (use cloudflare-workers skill)

Why avoid: Vercel is specific to Next.js and Vercel infrastructure. For other platforms or infrastructure, use targeted skills.

Deployment Targets

Serverless Functions

javascript
// next.config.js
module.exports = {
  target: 'serverless',
  // Other options are still valid
};

Characteristics:

  • Minimal lambda size (~49KB)
  • Optimized cold start performance
  • No runtime dependencies
  • Self-contained build output

Edge Functions

typescript
// middleware.ts
import { edgeFunction } from '@vercel/edge';

export default edgeFunction({
  deploymentTarget: 'v8-worker',
  entrypoint: 'middleware.js',
  environment: {
    FEATURE_FLAG: 'true',
  },
  regions: 'all', // or ['iad1', 'cdg1']
});

Characteristics:

  • Runs on Cloudflare Workers runtime
  • Global distribution
  • Low latency
  • No cold starts

Vercel CLI Commands

Development

bash
# Start development server
vercel dev

# Deploy with preview
vercel --prod

# Deploy with production
vercel --prod --prod

# Deploy with environment variables
vercel --prod --env NODE_ENV=production

Deployment

bash
# Deploy to production
vercel --prod

# Deploy with custom domain
vercel --prod --prod-domain=example.com

# Deploy with build environment
vercel --prod --build-env NODE_ENV=production

Configuration

json
// vercel.json
{
  "buildCommand": "npm run build",
  "devCommand": "npm run dev",
  "installCommand": "npm install",
  "framework": "nextjs",
  "regions": ["sfo1", "iad1"],
  "headers": [
    {
      "source": "/api/(.*)",
      "headers": [
        {
          "key": "Cache-Control",
          "value": "no-store"
        }
      ]
    }
  ]
}

Performance Optimization

Caching Strategies

typescript
// API route with caching
export default async function handler(req, res) {
  res.setHeader('Cache-Control', 'public, max-age=31536000, immutable');
  res.status(200).json({ data: 'cached' });
}

Image Optimization

jsx
import Image from 'next/image';

export default function MyImage() {
  return (
    <Image
      src="/logo.png"
      alt="Logo"
      width={200}
      height={100}
      priority
      loading="eager"
    />
  );
}

Edge Caching

typescript
// Edge function with caching
export default async function request(request: Request) {
  const url = new URL(request.url);

  if (url.pathname === '/api/data') {
    return new Response(JSON.stringify({ data: 'cached' }), {
      headers: {
        'Cache-Control': 'public, max-age=86400',
      },
    });
  }

  return new Response('Not Found', { status: 404 });
}

Environment Variables

Project Settings

bash
# Set environment variable
vercel env add DATABASE_URL

# Set production environment variable
vercel env add DATABASE_URL production

# List environment variables
vercel env ls

# Remove environment variable
vercel env rm DATABASE_URL

Vercel Dashboard

  1. Navigate to project settings
  2. Go to "Environment Variables"
  3. Add variables for each environment
  4. Set "Production", "Preview", or "Development" scope

Deployment Strategies

Preview Deployments

bash
# Create preview deployment
vercel --prod

# Deploy with custom branch
vercel --prod --prod-branch=feature-branch

Production Deployments

bash
# Production deployment
vercel --prod

# Production deployment with custom domain
vercel --prod --prod-domain=example.com

Edge Function Examples

Authentication Edge Function

typescript
// middleware.ts
import { edgeFunction } from '@vercel/edge';

export default edgeFunction({
  deploymentTarget: 'v8-worker',
  entrypoint: 'middleware.js',
});

// middleware.js
export default async function handler(request) {
  const url = new URL(request.url);

  // Skip static assets
  if (url.pathname.startsWith('/_next') || url.pathname.includes('.')) {
    return null;
  }

  // Check authentication
  const token = request.headers.get('Authorization');
  if (!token && url.pathname !== '/login') {
    return new Response('Unauthorized', { status: 401 });
  }

  return null; // Continue to next handler
}

API Routing Edge Function

typescript
// api/middleware.ts
export default async function handler(request) {
  const url = new URL(request.url);

  switch (url.pathname) {
    case '/api/users':
      return handleUsers(request);
    case '/api/products':
      return handleProducts(request);
    default:
      return new Response('Not Found', { status: 404 });
  }
}

async function handleUsers(request) {
  // Handle users API
  return new Response(JSON.stringify({ users: [] }), {
    headers: { 'Content-Type': 'application/json' },
  });
}

Common Anti-Patterns

❌ Bad: Large Lambda Functions

javascript
// ❌ BAD: Large lambda with many dependencies
import { bigLibrary } from 'big-library';

export default async function handler(req, res) {
  // Heavy initialization
  const result = bigLibrary.process(req.body);
  res.json(result);
}

Problems:

  • Slow cold starts
  • High memory usage
  • Expensive execution

✅ Good: Optimized Lambda

javascript
// ✅ GOOD: Optimized lambda
export default async function handler(req, res) {
  // Lightweight processing
  const result = processRequest(req.body);
  res.json(result);
}

function processRequest(body) {
  // Simple, focused logic
  return { processed: true };
}

❌ Bad: No Caching

typescript
// ❌ BAD: No caching on static assets
export default async function handler(request) {
  const file = await readFile('/public/image.png');
  return new Response(file, {
    headers: {
      'Content-Type': 'image/png',
      // Missing Cache-Control header
    },
  });
}

✅ Good: With Caching

typescript
// ✅ GOOD: With caching
export default async function handler(request) {
  const file = await readFile('/public/image.png');
  return new Response(file, {
    headers: {
      'Content-Type': 'image/png',
      'Cache-Control': 'public, max-age=31536000, immutable',
    },
  });
}

Real-World Impact

Before this skill:

  • Slow deployments
  • Poor caching
  • High latency
  • Expensive Lambda functions

After this skill:

  • Fast deployments
  • Optimal caching
  • Low latency
  • Cost-effective functions

Cross-References

  • devops-pipeline - For CI/CD integration
  • architecture-patterns - For serverless architecture design
  • testing-strategy - For testing serverless functions

References

Câu hỏi thường gặp

Kỹ năng AI Vercel Deployment làm được gì?

Use when deploying applications to Vercel, configuring serverless functions, edge computing, caching strategies, and optimizing Next.js deployments. Includes Vercel CLI, Edge Functions, and performance optimization. Based on Vercel Certified Developer and modern web deployment best practices.

Vì sao nên dùng Vercel Deployment trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Vercel Deployment là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Vercel Deployment trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Omar-Obando/qwen-orchestrator/tree/main/skills/vercel-deployment. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Vercel Deployment?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Vercel Deployment với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Vercel Deployment với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Vercel Deployment có miễn phí không?

Có. Kỹ năng này được Omar-Obando phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇