← Back to list

deploy-safety
by git-tao
Personal portfolio website for taotang.io - AI Systems Engineer consulting
⭐ 0🍴 0📅 Jan 16, 2026
SKILL.md
name: deploy-safety description: "Ensures deployments go to correct environments. Apply when deploying or pushing to production."
Deploy Safety Skill
Safe deployment patterns for modern web applications.
When to Apply
- User mentions "deploy", "push to production", "ship it"
- Before any
git pushto main/production - When discussing deployment targets
- Changes span frontend and backend
Pre-Deployment Checklist
1. Correct Branch
git branch --show-current
# Confirm this is the intended branch
2. What Changed
# Files changed
git diff --name-only origin/main...HEAD
# Frontend vs backend changes
git diff --name-only origin/main...HEAD | grep -E "^src/" | wc -l
git diff --name-only origin/main...HEAD | grep -E "^backend/" | wc -l
3. Clean Working Directory
git status --porcelain
# Should be empty
4. Tests Pass
npm test
npm run build
Deployment Rules
Frontend-Only Changes
If changes are ONLY in src/:
- Push to main, Vercel auto-deploys
- No backend action needed
Backend-Only Changes
If changes are ONLY in backend/:
- Deploy to backend platform
- Verify API contracts unchanged
Mixed Changes (FE + BE)
If changes span both:
- Verify API contracts match
- Deploy backend first (usually)
- Then deploy frontend
Database Migrations
If migrations included:
- Test in staging first
- Have rollback plan ready
- Run migration before code deployment
Vercel Commands
vercel # Deploy preview
vercel --prod # Deploy production
vercel ls # List deployments
vercel logs [url] # View logs
vercel env add VAR # Add env variable
vercel env pull # Pull env to local
Post-Deployment Verification
# Health check
curl https://your-app.vercel.app/api/health
# Check for errors
# - Browser console
# - Server logs
# - Error tracking (Sentry, etc.)
Rollback
If deployment fails:
- Vercel/Netlify: Instant rollback via dashboard
- Backend:
git revertand redeploy - Database: Run rollback migration
Environment Variables
Verify before deploy:
# Frontend (public)
NEXT_PUBLIC_API_URL=https://api.example.com
NEXT_PUBLIC_SUPABASE_URL=...
# Backend (private - never expose)
DATABASE_URL=...
STRIPE_SECRET_KEY=...
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon