npx claudepluginhub mountainunicorn/add --plugin addThis skill is limited to using the following tools:
Execute environment-aware deployment: commit changes, push to remote, trigger CI/CD, and verify successful deployment.
Deploys features to dev/staging/prod via adaptive CI/CD pipelines based on project level (Starter/Dynamic/Enterprise), generating GitHub Actions, Docker, Terraform, Kubernetes configs with promotion gates and rollback.
Deploys applications to Vercel, Netlify, AWS, GCP, DigitalOcean, or VPS after pre-deploy tests, security scans, build verification, and health checks. Activates on 'deploy', 'push to production', 'ship it'.
Guides tag-based production deployments in CI/CD pipelines using git tags for deliberate releases, approval gates, environment matrices, pre-commit Terraform validation, and risks of branch-based prod deploys.
Share bugs, ideas, or general feedback.
Execute environment-aware deployment: commit changes, push to remote, trigger CI/CD, and verify successful deployment.
The Deploy skill orchestrates the final step of the development workflow:
The skill is environment-aware: deployment to production is gated with additional safety checks and requires human approval.
Deployment flows:
Verify code quality
Load configuration
Verify git repository
Determine environment
Check for uncommitted changes
git statusVerify feature branch
Check for session handoff
.add/handoff.md if it existsUnless --skip-verify:
# Run full quality gates
npm test # all tests pass
npm run lint # no lint errors
npm run build # builds successfully
# or Python equivalent
python -m pytest # all tests pass
python -m flake8 # no lint errors
# or other language equivalents
Capture results:
If any verification fails:
Compose a detailed commit message following conventions:
Format:
{Type}: {Short description under 50 chars}
{Longer description explaining the change}
Acceptance Criteria:
- AC-001: ✓ Implemented and tested
- AC-002: ✓ Implemented and tested
Test Coverage:
- {N} tests passing
- {N}% code coverage
Quality Gates:
- ✓ Lint passing
- ✓ Types passing
- ✓ Tests passing
- ✓ Spec compliance verified
Closes: #{issue-number} (if applicable)
Types:
Example:
feat: Add form submission with email validation
Implement user-facing form with client-side and server-side
validation. Integrates with existing email service for
verification. Handles network errors with retry logic.
Acceptance Criteria:
- AC-001: ✓ User can submit valid form data
- AC-002: ✓ Form shows validation errors
- AC-003: ✓ Network failures handled gracefully
Test Coverage:
- 8 tests passing
- 87% code coverage
- All ACs verified
Quality Gates:
- ✓ Lint: 0 errors
- ✓ Types: 0 errors (TypeScript strict)
- ✓ Tests: 32 passing
- ✓ Coverage: 87% (target: 80%)
- ✓ Spec compliance: 5/5 ACs tested
Closes: #1234
Stage relevant files (not sensitive files):
# Stage implementation files
git add src/
git add tests/
git add docs/
# Verify staging
git status
git diff --cached
# Do NOT stage:
# - .env files
# - Secrets or credentials
# - node_modules/
# - Build artifacts (unless necessary)
# - .DS_Store, IDE files
Ask user to verify staged changes:
Staged files:
- src/form.ts
- src/api/submit.ts
- tests/form.test.ts
- tests/api.test.ts
- docs/performance.md
Proceed with commit? [yes/no]
Wait for explicit confirmation before committing.
Create commit:
git commit -m "$(cat <<'EOF'
feat: Add form submission with email validation
[full message as prepared in Step 2]
EOF
)"
Verify commit:
git log -1 --oneline
# Output: abc1234 feat: Add form submission with email validation
For Dev/Staging Environments:
Determine target branch:
Push to remote:
git push origin {feature-branch}
# or
git push -u origin {feature-branch}
Verify push succeeded:
For Production Environment:
Production requires PR/merge request workflow:
Create PR/MR with:
Request reviews:
Merge to main:
# After PR approved and CI passes
git checkout main
git pull origin main
git merge {feature-branch}
# or use GitHub/GitLab merge button
Tag release:
git tag -a v{version} -m "Release {feature-name} v{version}"
git push origin v{version}
CI/CD Pipeline:
Check if CI is enabled in config (ci.enabled):
If enabled:
Trigger CI (if not automatic)
Monitor pipeline progress
Check gate results
CI Pipeline Status: 🟡 In Progress
Jobs:
- Lint: ✓ PASSED (2 min)
- Type Check: ✓ PASSED (3 min)
- Unit Tests: 🟡 IN PROGRESS (4/32 tests)
- Integration Tests: ⊘ PENDING
- Deploy to Staging: ⊘ PENDING
Elapsed: 5 minutes
ETA: 8 minutes
Wait for completion
If CI disabled:
For production deployments only:
Present deployment plan
⚠️ PRODUCTION DEPLOYMENT
Feature: Form submission with email validation
Commit: abc1234
Branch: feature/form-submission
Target: main
Changes:
- 3 files modified
- 450 lines added, 20 lines removed
Testing:
- ✓ All 32 tests passing
- ✓ 87% code coverage
- ✓ Lint and type checks passing
Acceptance Criteria Verified:
- AC-001: ✓ User can submit valid form
- AC-002: ✓ Validation errors shown
- AC-003: ✓ Network errors handled
Risk Assessment:
- Integration Points: 1 (Email service)
- Database Changes: None
- Breaking Changes: None
- Rollback Plan: Revert commit + redeploy previous tag
Requires explicit approval to proceed.
Require human approval
Record approval
Proceed only with approval
For Dev Environment:
# Direct deploy (no CI required)
npm run deploy:dev
# or
./scripts/deploy-dev.sh
For Staging Environment:
# After CI passes
npm run deploy:staging
# or
./scripts/deploy-staging.sh
For Production Environment:
# After approval, merge to main, and CI passes
npm run deploy:production
# or
./scripts/deploy-production.sh
# This typically:
# - Pulls latest from main
# - Builds production bundle
# - Uploads to production servers
# - Runs database migrations if needed
# - Restarts services
# - Runs health checks
Monitor deployment:
After deployment completes:
Run smoke tests
npm run test:smoke -- --environment production
# or equivalent
Smoke tests check:
Verify application health
curl https://api.example.com/health
# Response should indicate health: 200 OK
Check user-facing changes
Monitor error logs
Verify metrics
Success Criteria:
Failure Response:
Upon successful deployment, output:
# Deployment Complete ✓
## Deployment Summary
- Environment: {env}
- Feature: {feature-name}
- Commit: {short-hash}
- Branch: {branch-name}
- Timestamp: {ISO timestamp}
- Duration: {X minutes}
## Code Changes
- Files modified: {count}
- Lines added: {count}
- Lines removed: {count}
- Acceptance criteria: {N}/{N} verified
## Quality Gates (Pre-Deploy)
- Lint: ✓ PASS
- Types: ✓ PASS
- Tests: ✓ PASS (32/32)
- Coverage: ✓ PASS (87%)
- Spec compliance: ✓ PASS
## CI/CD Pipeline
- Status: ✓ ALL JOBS PASSED
- Lint: ✓ 2 minutes
- Type Check: ✓ 3 minutes
- Unit Tests: ✓ 4 minutes
- Integration Tests: ✓ 2 minutes
## Post-Deployment Verification
- Smoke Tests: ✓ PASS (6/6)
- Health Check: ✓ OK
- Error Rate: Normal
- Response Time: {Xms avg} (target: <100ms)
## Deployment Details
- Strategy: {direct|blue-green|canary}
- Rollback Plan: Revert commit {hash} and redeploy
## Deployed Files
- API endpoints: ✓ Updated and responding
- Database migrations: {N} applied
- Static assets: Served from CDN
- Service restart: ✓ Complete
## Notifications
- Slack notification sent ✓
- Email notification sent ✓
- Deployment log: logs/deploy-2025-02-07-1234.txt
## Next Steps
1. Monitor application for issues (next 1 hour)
2. Check user feedback and error tracking
3. Validate feature is used as expected
4. Consider follow-up optimizations
Use TaskCreate and TaskUpdate to report progress through the CLI spinner. Create tasks at the start of each major phase and mark them completed as they finish.
Tasks to create:
| Phase | Subject | activeForm |
|---|---|---|
| Pre-deploy | Running pre-deploy checks | Running pre-deploy checks... |
| Prepare | Preparing deployment artifacts | Preparing deployment... |
| Deploy | Executing deployment | Executing deployment... |
| Smoke tests | Running post-deploy smoke tests | Running smoke tests... |
Mark each task in_progress when starting and completed when done. This gives the user real-time visibility into skill execution.
Quality gates fail (--skip-verify not set)
Uncommitted changes detected
Branch protection rules block push
CI pipeline fails
Smoke tests fail after deployment
Production deployment approval timeout
Deployment script fails
When deploying to a multi-environment project (Tier 2+), the deploy skill supports automatic promotion through environments:
--promote)When invoked with --promote (or during away mode), the skill climbs the promotion ladder:
verifyCommand for that environmentautoPromote: true → deploy to next environmentautoPromote: false is reached/add:deploy --promote --env dev
→ deploys to dev
→ runs dev verifyCommand (integration tests)
→ PASS → auto-promotes to staging
→ runs staging verifyCommand (e2e + perf)
→ PASS → stops (production requires human approval)
→ logs: "Verified through staging. Production queued for human approval."
If verification fails after deploying to an environment:
rollbackStrategy from config for that environment:
revert-commit: git revert {commit} && git push → redeployredeploy-previous-tag: find last stable tag → checkout → redeployDuring away mode, the deploy skill automatically uses --promote behavior:
autoPromote: true environmentsautoPromote: false environment (always production)--promote for automatic environment ladder climbing{
"git": {
"defaultBranch": "main",
"requirePR": false,
"requireReviews": 2
},
"ci": {
"enabled": true,
"provider": "github",
"timeout": 1800
},
"deployment": {
"strategy": "direct",
"rollbackEnabled": true,
"smokeTestScript": "npm run test:smoke"
},
"environments": {
"dev": {
"branch": "develop",
"requireApproval": false,
"targetHost": "dev.example.com"
},
"staging": {
"branch": "staging",
"requireApproval": false,
"targetHost": "staging.example.com"
},
"production": {
"branch": "main",
"requireApproval": true,
"requireReviews": 2,
"targetHost": "api.example.com"
}
}
}
Before deploying to production:
If production deployment fails:
# Immediate rollback
git revert {problematic-commit}
git push origin main
# Or tag-based rollback
git checkout {previous-stable-tag}
git push origin main
# Deploy previous version
npm run deploy:production
# Verify health
npm run test:smoke -- --environment production
Document:
After production deployment:
After completing this skill, do BOTH:
Append one observation line to .add/observations.md:
{YYYY-MM-DD HH:MM} | deploy | {one-line summary of outcome} | {cost or benefit estimate}
If .add/observations.md does not exist, create it with a # Process Observations header first.
Write a structured JSON learning entry per the checkpoint trigger in rules/learning.md (section: "After Deployment"). Classify scope, write to the appropriate JSON file (.add/learnings.json or ~/.claude/add/library.json), and regenerate the markdown view.