本文へスキップ
Skillpedia
デプロイとクラウド(DevOps)33k · #8810

vercel-deployment

できること

このスキルは、Vercel上でNext.jsアプリを動かすためのベストプラクティスを紹介します。デプロイを安全で速く、管理しやすくしたい開発者向けです。

使う場面

  • ✓Next.jsアプリをVercelに初めて設定するとき。
  • ✓プレビューと本番の環境変数を管理する必要があるとき。
  • ✓Vercelのビルドが遅い、またはFunctionsのコールドスタートに問題があるとき。

スキルのリンク

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

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/vercel-deployment/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“公開前に、Next.js向けのVercelの設定を確認し、直すべき点を教えてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、秘密の値を公開用の変数に入れないことや、エッジとサーバーレスのランタイムを適切に選ぶこと、ビルドキャッシュを使うことなどの原則に照らして、設定を確認します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

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

よくある質問

よくある間違いには何がありますか?

秘密の値をNEXT_PUBLICの変数に入れることです。これではブラウザーに値が公開されてしまいます。

エッジとサーバーレスの選択を助けてくれますか?

はい。APIルートに適したランタイムの選び方を説明します。

プレビューのデプロイで本番のデータベースを使ってよいですか?

いいえ。環境ごとに別のデータベースを使うよう勧めています。

詳細

作者による元の説明

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

repo: davila7/claude-code-templates

人気

GitHubのスター
33k
ランキング
#8810
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル