Agent skill
deploy-stack
Deploys multiple components to an environment. Use for coordinated deployments of backend, frontend, and landing.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/deploy-stack
SKILL.md
Deploy Stack
Deploys multiple components to an environment in the correct order.
Deployment Order
For a full stack deployment:
- Backend (first - frontend depends on API)
- Frontend (after backend API is available)
- Landing (independent, can be parallel)
Commands
Deploy All to Dev
# 1. Backend
cd back && npx sst deploy --stage dev
# 2. Frontend (after backend completes)
cd ../front && npx sst deploy --stage dev
# 3. Landing (can run in parallel with frontend)
cd ../landing && npx sst deploy --stage dev
Deploy All to Production
# 1. Backend
cd back && npx sst deploy --stage prod
# 2. Run migrations
aws lambda invoke --function-name template-saas-api-migrate-lambda-prod /dev/null
# 3. Frontend
cd ../front && npx sst deploy --stage prod
# 4. Landing
cd ../landing && npx sst deploy --stage prod
Pre-Deployment Checklist
Secrets
Ensure all secrets are set for the target stage:
Backend:
npx sst secret set DbConnStr "..." --stage <stage>
npx sst secret set ClerkSecretKey "..." --stage <stage>
npx sst secret set ClerkWebhookSecret "..." --stage <stage>
Frontend:
npx sst secret set ClerkPublishableKey "..." --stage <stage>
npx sst secret set ClerkSecretKey "..." --stage <stage>
Quality Checks
Run quality checks before deployment:
# Backend
cd back && task format && task tests
# Frontend
cd front && pnpm type-check && pnpm lint && pnpm build
# Landing
cd landing && pnpm type-check && pnpm lint && pnpm build
CI/CD Alternative
Manual stack deployment should only be needed for:
- Initial setup
- Emergency fixes
- Development testing
For normal deployments, use CI/CD:
- Push to
develop→ deploys todevstage - Push to
main→ deploys toprodstage
Rollback
If deployment fails:
-
Check SST console for errors:
bashnpx sst console --stage <stage> -
Check CloudWatch logs for Lambda errors
-
For frontend: Previous CloudFront distribution remains until new deploy succeeds
-
For backend: Revert code and redeploy
Domain Verification
After deployment, verify domains are accessible:
| Component | Dev | Prod |
|---|---|---|
| Landing | dev.{domain} |
{domain} |
| Frontend | app-dev.{domain} |
app.{domain} |
| Backend | api-dev.{domain}/health |
api.{domain}/health |
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?