deploy-to-vercel
について
このスキルは、Next.jsアプリケーションのVercelへのデプロイを自動化し、プロジェクトのリンク、環境変数の設定、デプロイ構成を処理します。初回デプロイ、プルリクエスト用プレビューデプロイの設定、カスタムドメインの構成を目的として設計されています。Vercel上の本番環境とプレビュー環境の管理プロセスを効率化するためにご利用ください。
クイックインストール
Claude Code
推奨npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/deploy-to-vercelこのコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします
ドキュメント
Deploy to Vercel
Next.js → Vercel w/ prod config.
Use When
- First-time Next.js deploy
- Preview deploys → PRs
- Custom domains
- Prod env vars
In
- Required: Next.js app builds locally
- Required: GitHub repo (rec) or local
- Optional: Custom domain
- Optional: Prod env vars
Do
Step 1: Verify local build
npm run build
→ Build OK, no errs.
If err: Fix build before deploy. Common: TS errs, missing deps, bad imports.
Step 2: Install Vercel CLI
npm install -g vercel
→ vercel cmd available, vercel --version works.
If err: Perm errs → sudo or user-local prefix. node --version.
Step 3: Link + deploy
# Login to Vercel
vercel login
# Deploy (first time: creates project)
vercel
# Follow prompts:
# - Set up and deploy? Y
# - Which scope? (select your account)
# - Link to existing project? N (for new projects)
# - Project name: my-app
# - Directory: ./
# - Override settings? N
→ Preview URL (e.g., https://my-app-xxx.vercel.app).
If err: vercel login fail → check net, try browser auth. Deploy fail → review build out. Clean env → all deps in package.json.
Step 4: Env vars
# Add environment variables
vercel env add DATABASE_URL production
vercel env add API_KEY production preview
# List environment variables
vercel env ls
Or dashboard: Project Settings > Environment Variables.
→ vercel env ls shows all vars in correct envs.
If err: Not at runtime → target env matches. Redeploy → existing deploys don't pick up new vars.
Step 5: Prod deploy
vercel --prod
→ Prod URL (e.g., https://my-app.vercel.app).
If err: vercel logs or dashboard. Common: missing prod env vars, build cmd diff from local.
Step 6: GitHub auto-deploy (rec)
https://vercel.com/new- Import GH repo
- Auto-deploy on:
- Push main → prod
- PR → preview
→ Dashboard shows repo connected, pushes trigger prod auto.
If err: Repo not in list → Vercel GH app access. GitHub Settings > Applications > Vercel.
Step 7: Custom domain
vercel domains add my-domain.com
Or dashboard: Project Settings > Domains. Update DNS per Vercel.
→ vercel domains ls shows configured, after propagation (≤48h) resolves.
If err: "Invalid Configuration" → DNS matches exactly. dig my-domain.com or DNS checker.
Step 8: Optimize config
vercel.json:
{
"framework": "nextjs",
"regions": ["iad1"],
"headers": [
{
"source": "/api/(.*)",
"headers": [
{ "key": "Cache-Control", "value": "no-store" }
]
}
]
}
→ vercel.json in root, next deploy picks up.
If err: Ignored → jq . vercel.json valid. Framework ver → some moved to next.config.ts.
Check
-
npm run buildOK locally - Preview deploy works
- Prod deploy serves app
- Env vars in prod
- Custom domain resolves (if config'd)
- GH integration triggers deploys
Traps
- Build fail Vercel not local: Clean env → all deps in
package.json, not just global - Env vars missing: Add to Vercel not
.env.local. Envs separate. - Node ver mismatch: Set in Project Settings or
package.jsonengines - Large deploys: Size limits.
.vercelignoreexcludes. - API timeout: Hobby plan 10s. Optimize or upgrade.
→
scaffold-nextjs-app— create app to deploysetup-tailwind-typescript— config styling pre-deployconfigure-git-repository— Git setup for auto-deploy
GitHub リポジトリ
関連スキル
llamaguard
その他LlamaGuardは、暴力やヘイトスピーチなど6つの安全性カテゴリーにおいて、LLMの入力と出力をモデレートするMetaの70-80億パラメータモデルです。94〜95%の精度を提供し、vLLM、Hugging Face、Amazon SageMakerを使用してデプロイ可能です。このスキルを使用して、AIアプリケーションにコンテンツフィルタリングと安全策を簡単に統合できます。
cost-optimization
その他このClaudeスキルは、リソースの適正サイジング、タグ付け戦略、支出分析を通じて、開発者がクラウドコストを最適化することを支援します。AWS、Azure、GCPにわたるクラウド支出の削減とコストガバナンスの実施のためのフレームワークを提供します。インフラコストの分析、リソースの適正サイジング、または予算制約への対応が必要な際にご利用ください。
quantizing-models-bitsandbytes
その他このスキルは、bitsandbytesを使用してLLMを8ビットまたは4ビット精度に量子化し、精度の低下を最小限に抑えつつ50〜75%のメモリ削減を実現します。限られたGPUメモリでより大規模なモデルを実行したり、推論を高速化するのに理想的で、INT8、NF4、FP4などのフォーマットをサポートしています。HuggingFace Transformersと統合され、QLoRAトレーニングや8ビットオプティマイザーを可能にします。
dispatching-parallel-agents
その他このClaudeスキルは、複数のエージェントを配備し、3つ以上の独立した問題を並行して調査・修正します。共有状態や依存関係がなく解決可能な、無関係な障害が発生するシナリオ向けに設計されています。中核となる機能は並列問題解決であり、効率を最大化するために独立した問題領域ごとに1つのエージェントを割り当てます。
