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-vercelClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
Deploy to Vercel
Deploy a Next.js application to Vercel with production configuration.
When to Use
- Deploying a Next.js app for the first time
- Setting up preview deployments for pull requests
- Configuring custom domains
- Managing environment variables in production
Inputs
- Required: Next.js application that builds successfully locally
- Required: GitHub repository (recommended) or local project
- Optional: Custom domain
- Optional: Environment variables for production
Procedure
Step 1: Verify Local Build
npm run build
Got: Build succeeds with no errors.
If fail: Fix build errors before deploying. Common: TypeScript errors, missing dependencies, invalid imports.
Step 2: Install Vercel CLI
npm install -g vercel
Got: The vercel command is available globally and vercel --version prints the installed version.
If fail: If permission errors occur, use sudo npm install -g vercel or configure npm to use a user-local prefix. Verify Node.js is installed with node --version.
Step 3: Link and 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
Got: Preview URL provided (e.g., https://my-app-xxx.vercel.app).
If fail: If vercel login fails, check internet connectivity and try browser-based authentication. If the deploy fails, review the build output for errors -- Vercel uses a clean environment, so all dependencies must be in package.json.
Step 4: Configure Environment Variables
# Add environment variables
vercel env add DATABASE_URL production
vercel env add API_KEY production preview
# List environment variables
vercel env ls
Or configure through the Vercel dashboard: Project Settings > Environment Variables.
Got: vercel env ls shows all required environment variables configured for the correct environments (production, preview, development).
If fail: If variables are not appearing at runtime, verify the target environment matches (production vs preview). Redeploy after adding variables -- existing deployments do not pick up new variables automatically.
Step 5: Deploy to Production
vercel --prod
Got: Production URL available (e.g., https://my-app.vercel.app).
If fail: Check deployment logs with vercel logs or in the Vercel dashboard. Common issues include missing environment variables in the production environment and build commands differing from local setup.
Step 6: Connect GitHub for Auto-Deploy (Recommended)
- Go to https://vercel.com/new
- Import your GitHub repository
- Vercel automatically deploys on:
- Push to main -> Production deployment
- Pull request -> Preview deployment
Got: The Vercel dashboard shows the GitHub repository connected, and subsequent pushes to main trigger production deployments automatically.
If fail: If the repository does not appear in the import list, check that the Vercel GitHub app has access to the repository. Go to GitHub Settings > Applications > Vercel and grant access.
Step 7: Configure Custom Domain
vercel domains add my-domain.com
Or through dashboard: Project Settings > Domains.
Update DNS records as instructed by Vercel (typically CNAME or A record).
Got: vercel domains ls shows the custom domain as configured, and after DNS propagation (up to 48 hours), the domain resolves to the Vercel deployment.
If fail: If the domain shows "Invalid Configuration," verify DNS records match Vercel's instructions exactly. Use dig my-domain.com or an online DNS checker to confirm propagation.
Step 8: Optimize Configuration
Create vercel.json for advanced settings:
{
"framework": "nextjs",
"regions": ["iad1"],
"headers": [
{
"source": "/api/(.*)",
"headers": [
{ "key": "Cache-Control", "value": "no-store" }
]
}
]
}
Got: vercel.json is saved in the project root and the next deployment picks up the configuration (visible in the Vercel dashboard build logs).
If fail: If the configuration is ignored, verify vercel.json is valid JSON with jq . vercel.json. Check the Vercel docs for your framework version, as some settings may have moved to next.config.ts.
Validation
-
npm run buildsucceeds locally - Preview deployment works and is accessible
- Production deployment serves the application correctly
- Environment variables are available in production
- Custom domain resolves (if configured)
- GitHub integration triggers deployments on push
Pitfalls
- Build failing on Vercel but not locally: Vercel uses a clean environment. Ensure all dependencies are in
package.json, not installed globally. - Environment variables missing: Variables must be added to Vercel, not
.env.local. Different environments (production, preview, development) have separate variable sets. - Node.js version mismatch: Set the Node.js version in Project Settings or
package.jsonengines field. - Large deployments: Vercel has size limits. Use
.vercelignoreto exclude unnecessary files. - API route timeouts: Vercel serverless functions have a 10s timeout on the Hobby plan. Optimize or upgrade.
Related Skills
scaffold-nextjs-app- create the app to deploysetup-tailwind-typescript- configure styling before deploymentconfigure-git-repository- Git setup for auto-deploy integration
GitHub 저장소
연관 스킬
llamaguard
기타LlamaGuard는 폭력 및 혐오 발언 등 6가지 안전 범주에서 LLM 입력과 출력을 조정하기 위한 Meta의 70-80억 파라미터 모델입니다. 94-95% 정확도를 제공하며 vLLM, Hugging Face 또는 Amazon SageMaker를 사용해 배포할 수 있습니다. 이 기술을 사용하여 AI 애플리케이션에 콘텐츠 필터링 및 안전 가드레일을 손쉽게 통합하세요.
cost-optimization
기타이 Claude Skill은 리소스 적정화, 태깅 전략, 지출 분석을 통해 개발자들이 클라우드 비용을 최적화할 수 있도록 지원합니다. AWS, Azure, GCP에서 클라우드 비용을 절감하고 비용 거버넌스를 구현하기 위한 프레임워크를 제공합니다. 인프라 비용을 분석하거나, 리소스를 적정화하거나, 예산 제약을 충족해야 할 때 사용하세요.
quantizing-models-bitsandbytes
기타이 스킬은 bitsandbytes를 사용하여 LLM을 8비트 또는 4비트 정밀도로 양자화하며, 최소한의 정확도 손실로 50-75%의 메모리 감소를 달성합니다. 제한된 GPU 메모리에서 더 큰 모델을 실행하거나 추론을 가속화하는 데 이상적이며, INT8, NF4, FP4와 같은 형식을 지원합니다. 이 스킬은 HuggingFace Transformers와 통합되어 QLoRA 학습 및 8비트 옵티마이저를 가능하게 합니다.
dispatching-parallel-agents
기타이 Claude Skill은 3개 이상의 독립적인 문제를 동시에 조사하고 해결하기 위해 다중 에이전트를 배치합니다. 공유 상태나 의존성 없이 해결 가능한 무관련 장애 시나리오에 맞게 설계되었습니다. 핵심 기능은 병렬 문제 해결로, 각 독립 문제 영역마다 하나의 에이전트를 할당하여 효율성을 극대화합니다.
