vercel-deployment
Best practices for Vercel deployment including Edge Functions, build optimization, environment variables, and multi-project deployment. Use when deploying, configuring Vercel, or troubleshooting deployment issues.
- License 许可
- MIT
- 最近更新
- 2026-05-18
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- vercel-deployment
- description
- Best practices for Vercel deployment including Edge Functions, build optimization, environment variables, and multi-project deployment. Use when deploying, configuring Vercel, or troubleshooting deployment issues.
03 SKILL.md 正文
Vercel Deployment Best Practices for Aurion Studio
Build Optimization
- Vite builds:
npm run buildproducesdist/ - Next.js (Studio only):
pnpm buildproduces.next/ - Minimize bundle size before deploying
- Check
npm run typecheckpasses before deploy
vercel.json Configuration
- Headers: CORS, CSP, security headers in
vercel.json - Rewrites: API routes, SPA fallback
- Functions: memory and duration limits for Edge Functions
- Regions: deploy close to users (auto by default)
Environment Variables
- Set via Vercel dashboard or
npx vercel env add [KEY] production - Critical vars: OPENROUTER_API_KEY, SUPABASE_URL, SUPABASE_SERVICE_ROLE_KEY, TOOL_AUTH_SECRET
- Stripe: STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET
- Use different values for preview vs production
- Never commit secrets to git
Edge Functions (api/*.ts)
- Keep functions fast (<10s execution)
- Middleware stack: auth → CSRF → rate-limit → handler
- Return proper HTTP status codes
- Handle CORS preflight (OPTIONS requests)
- Use streaming for long responses (SSE)
Multi-Project Deployment
- Main landing: root project
- Each tool: separate Vercel project in tools-deploy/
- Deploy individual tool:
cd tools-deploy/[tool] && npx vercel --prod --yes - Deploy all:
node scripts/deploy-all-tools.cjs - Deploy everything:
npm run deploy:everything
Deployment URLs
| Project | URL |
|---|---|
| Landing | aurion.studio |
| Chat | chat-aurion1.vercel.app |
| IDE | ide-aurion1.vercel.app |
| Agent AI | agent-ai-cyan.vercel.app |
| Text Editor | text-editor-aurion1.vercel.app |
| Studio | studio-aurion1.vercel.app |
| UIForge | uiforge-eight.vercel.app |
| 1code | 1code-omega.vercel.app |
| Code Editor | code-editor-aurion1.vercel.app |
| Cowork | cowork-mauve.vercel.app |
| AI Marketing | ai-marketing-xi.vercel.app |
Troubleshooting
- Build fails: check TypeScript errors, missing env vars
- 500 errors: check Vercel function logs
- CORS issues: verify vercel.json headers
- Cold starts: optimize function size, use Edge runtime
- Rate limits: Vercel has deployment limits per day on free tier
04 同仓库更多 Skills
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
web-design-guidelines
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
vercel-react-view-transitions
Guide for implementing smooth, native-feeling animations using React's View Transition API (`<ViewTransition>` component, `addTransitionType`, and CSS view transition pseudo-elements). Use this skill whenever the user wants to add page transitions, animate route changes, create shared element animations, animate enter/exit of components, animate list reorder, implement directional (forward/back) navigation animations, or integrate view transitions in Next.js. Also use when the user mentions view transitions, `startViewTransition`, `ViewTransition`, transition types, or asks about animating between UI states in React without third-party animation libraries.
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
vercel-composition-patterns
React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.
vercel-cli-with-tokens
Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".