AgentSkillsCN

Deployment

部署

SKILL.md

Skill: Deployment

Description

Handles deployment to hosting provider (Vercel, Docker, AWS, etc.).

When to Use

  • User triggers /deploy workflow
  • After merging to main branch
  • Setting up initial deployment

Instructions

Pre-Deploy Checklist

  1. All tests pass (npm test)
  2. Lint clean (npm run lint)
  3. Type check (npx tsc --noEmit)
  4. Environment variables set in hosting provider
  5. No secrets in codebase
  6. Health check endpoint exists

Vercel Deployment

bash
# Link project (first time)
vercel link

# Preview deploy
vercel

# Production deploy
vercel --prod

Environment Variables

  • Compare .env.example with hosting provider settings
  • Flag any missing variables
  • Never deploy with missing required env vars

Post-Deploy Verification

  1. Visit live URL — confirm it loads
  2. Check key user flows (login, core feature)
  3. Monitor error logs for 5 minutes
  4. Update .ai/memory/current-state.md with deploy info
  5. Log deployment to .ai/logbook/

Rollback

If deployment fails:

  1. Revert to previous deployment (Vercel: instant rollback)
  2. Log failure reason to .ai/logbook/alerts.json
  3. Notify user with root cause analysis