How Vercel Works
development
Manages Vercel deployments, debugging, and configuration. Use when deploying apps, investigating production errors, checking deployment status, or configuring vercel.json. Integrates with Vercel MCP for API access. Related: `using-neon` for database errors, `configuring-mcps` for MCP setup.
Using Vercel
Vercel deployment and debugging for CaseMark projects. For more information, context7 their documentation.
Related Skills
| Skill | Use When |
|---|---|
using-neon | Database connection errors, investigating production data |
using-linear | Creating tickets for deployment issues |
configuring-mcps | Setting up Vercel MCP, troubleshooting MCP connections |
contributing | Deploying branches, PR previews |
Vercel MCP Tools
Prefer MCP over CLI when available. See configuring-mcps for setup.
| Tool | Purpose |
|---|---|
vercel_list_projects | List all projects in a team |
vercel_get_project | Get project details |
vercel_list_deployments | List recent deployments |
vercel_get_deployment | Get deployment details by ID or URL |
vercel_get_deployment_build_logs | View build logs |
// List deployments
vercel_list_deployments({ projectId: "prj_xxx", teamId: "casemark-ai" })
// Get deployment (works with production URL)
vercel_get_deployment({ idOrUrl: "api.case.dev", teamId: "casemark-ai" })
// View build logs
vercel_get_deployment_build_logs({ idOrUrl: "<deployment-id>", teamId: "casemark-ai", limit: 200 })
Debug Workflow
Production Debug Checklist:
- [ ] Get deployment details via MCP
- [ ] Check build logs for errors
- [ ] If database error → load `using-neon` skill
- [ ] If CLI needed → ask user to run `vercel link`
- [ ] Pull env vars: `vercel env pull --scope casemark-ai`
- [ ] Check runtime logs: `vercel logs <url> --scope casemark-ai`
Agent Limitation: TUI Commands
The Vercel CLI uses a TUI for auth/linking. Ask the user to run:
vercel link --scope casemark-ai
Then use non-interactive commands: vercel logs, vercel env.
Error Pattern → Skill Routing
| Error | Load Skill |
|---|---|
| "Database connection failed" | using-neon |
| "Environment variable missing" | Check vercel env ls, may need contributing for env setup |
| "Authentication failed" | Check auth secrets match environment |
| "Build succeeded, runtime fails" | Check for hardcoded dev URLs |
CLI Commands
# Deployments
vercel list --scope casemark-ai
vercel logs <url> --scope casemark-ai
vercel logs <url> --scope casemark-ai --follow
# Environment
vercel env ls --scope casemark-ai
vercel env pull --scope casemark-ai
# Deploy
vercel --scope casemark-ai # Preview
vercel --prod --scope casemark-ai # Production
vercel promote <url> --scope casemark-ai
Environments
| Environment | Trigger | URL Pattern |
|---|---|---|
| Production | Merge to main | Custom domains |
| Preview | PR/branch push | *-git-<branch>-casemark-ai.vercel.app |
| Local | bun dev | localhost:{port} |
vercel.json
{
"crons": [{ "path": "/api/cron/job", "schedule": "0 6 1 * *" }],
"headers": [{ "source": "/(.*)", "headers": [{ "key": "X-Frame-Options", "value": "DENY" }] }]
}
Cron jobs only run in production.
Stop and Ask
Stop and ask if:
- Modifying production environment variables
- Deployment failing after multiple attempts
- Rolling back production
Proceed if:
- Checking status/logs (read-only)
- Debugging with MCP tools
External References
Use context7_query-docs for quick Vercel lookups, or: