Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)33k · #8810

vercel-deployment

Skill này làm gì

Skill này chia sẻ các thực hành tốt nhất để chạy ứng dụng Next.js trên Vercel. Nó dành cho lập trình viên muốn việc triển khai an toàn, nhanh và dễ quản lý.

Khi nào nên dùng

  • ✓Khi bạn thiết lập ứng dụng Next.js trên Vercel lần đầu.
  • ✓Khi bạn cần quản lý biến môi trường cho bản xem trước và production.
  • ✓Khi build Vercel của bạn chậm hoặc các function gặp vấn đề cold start.

Liên kết skill

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/vercel-deployment/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/vercel-deployment/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy xem lại thiết lập Vercel cho Next.js của tôi và cho tôi biết cần sửa gì trước khi ra mắt.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent kiểm tra thiết lập của bạn theo một bộ nguyên tắc, chẳng hạn giữ bí mật khỏi biến công khai, chọn runtime edge hoặc serverless, và dùng build cache.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Vercel Deployment

You are a Vercel deployment expert. You understand the platform's capabilities, limitations, and best practices for deploying Next.js applications at scale.

Your core principles:

  1. Environment variables - different for dev/preview/production
  2. Edge vs Serverless - choose the right runtime
  3. Build optimization - minimize cold starts and bundle size
  4. Preview deployments - use for testing before production
  5. Monitoring - set up analytics and error tracking

Capabilities

  • vercel
  • deployment
  • edge-functions
  • serverless
  • environment-variables

Requirements

  • nextjs-app-router

Patterns

Environment Variables Setup

Properly configure environment variables for all environments

Edge vs Serverless Functions

Choose the right runtime for your API routes

Build Optimization

Optimize build for faster deployments and smaller bundles

Anti-Patterns

❌ Secrets in NEXT_PUBLIC_

❌ Same Database for Preview

❌ No Build Cache

⚠️ Sharp Edges

Issue Severity Solution
NEXT_PUBLIC_ exposes secrets to the browser critical Only use NEXT_PUBLIC_ for truly public values:
Preview deployments using production database high Set up separate databases for each environment:
Serverless function too large, slow cold starts high Reduce function size:
Edge runtime missing Node.js APIs high Check API compatibility before using edge:
Function timeout causes incomplete operations medium Handle long operations properly:
Environment variable missing at runtime but present at build medium Understand when env vars are read:
CORS errors calling API routes from different domain medium Add CORS headers to API routes:
Page shows stale data after deployment medium Control caching behavior:

Related Skills

Works well with: nextjs-app-router, supabase-backend

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

Một lỗi phổ biến mà nó cảnh báo là gì?

Đặt giá trị bí mật trong biến NEXT_PUBLIC, khiến chúng bị lộ ra trình duyệt.

Nó có giúp chọn giữa edge và serverless không?

Có. Nó giải thích cách chọn đúng runtime cho các API route của bạn.

Bản xem trước có nên dùng cơ sở dữ liệu production không?

Không. Skill khuyên dùng cơ sở dữ liệu riêng cho từng môi trường.

Chi tiết

Mô tả gốc của tác giả

Expert knowledge for deploying to Vercel with Next.js Use when: vercel, deploy, deployment, hosting, production.

repo: davila7/claude-code-templates

Độ phổ biến

Sao GitHub
33k
Vị trí xếp hạng
#8810
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự