Verify you are on a clean git branch with no uncommitted changes:
git status --porcelain
Run the test suite (unless --skip-tests was passed):
npm run test:ci
Check that the build succeeds:
npm run build
Verify environment configuration exists for the target:
ls -la config/deploy/$0.env
Deploy
If --dry-run was passed, show what would be deployed and stop:
npm run deploy -- --env $0 --dry-run
Otherwise, execute the deployment:
npm run deploy -- --env $0
Wait for health checks to pass (up to 5 minutes):
npm run deploy:health-check -- --env $0 --timeout 300
Post-deploy
Tag the release in git:
git tag -a "deploy-$0-$(date +%Y%m%d-%H%M%S)" -m "Deployed to $0"
Notify the team (if production):
if [ "$0" = "production" ]; then
curl -X POST https://hooks.slack.example.com/deploy \
-H "Content-Type: application/json" \
-d "{\"text\": \"Production deploy complete: $(git rev-parse --short HEAD)\"}"
fi
Rollback
If the deployment fails at any step:
Run the rollback command:
npm run deploy:rollback -- --env $0
Verify health checks pass after rollback.
Report the failure with the error details.
Additional Resources
For detailed deployment configuration, see deployment-guide.md.
For environment-specific notes, see environments/.
1---2name: examples3description: Deploy Skill4---56# Deploy Skill78Deploy the application to the specified environment.910## Arguments1112- `$ARGUMENTS[0]` (or `$0`): Target environment (`staging`, `production`, `canary`). Defaults to `staging`.13- Additional flags are parsed from `$ARGUMENTS`.1415## Dynamic Context1617Current branch and recent commits:18!`git log --oneline -5`1920Current deployment status:21!`curl -s https://deploy.internal.example.com/api/status 2>/dev/null || echo "Status endpoint unavailable"`2223## Deployment Procedure2425### Pre-flight Checks26271. Verify you are on a clean git branch with no uncommitted changes:28 ```bash29 git status --porcelain30 ```31322. Run the test suite (unless `--skip-tests` was passed):33 ```bash34 npm run test:ci35 ```36373. Check that the build succeeds:38 ```bash39 npm run build40 ```41424. Verify environment configuration exists for the target:43 ```bash44 ls -la config/deploy/$0.env45 ```4647### Deploy48495. If `--dry-run` was passed, show what would be deployed and stop:50 ```bash51 npm run deploy -- --env $0 --dry-run52 ```53546. Otherwise, execute the deployment:55 ```bash56 npm run deploy -- --env $057 ```58597. Wait for health checks to pass (up to 5 minutes):60 ```bash61 npm run deploy:health-check -- --env $0 --timeout 30062 ```6364### Post-deploy65668. Tag the release in git:67 ```bash68 git tag -a "deploy-$0-$(date +%Y%m%d-%H%M%S)" -m "Deployed to $0"69 ```70719. Notify the team (if production):72 ```bash73 if [ "$0" = "production" ]; then74 curl -X POST https://hooks.slack.example.com/deploy \75 -H "Content-Type: application/json" \76 -d "{\"text\": \"Production deploy complete: $(git rev-parse --short HEAD)\"}"77 fi78 ```7980## Rollback8182If the deployment fails at any step:83841. Run the rollback command:85 ```bash86 npm run deploy:rollback -- --env $087 ```88892. Verify health checks pass after rollback.90913. Report the failure with the error details.9293## Additional Resources9495For detailed deployment configuration, see [deployment-guide.md](deployment-guide.md).96For environment-specific notes, see [environments/](environments/).
Run npx skillmds@latest add gabrielmoreira/examples in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Deploy Skill It is listed under DevOps & Infra on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: CAUTION, Skill Scanner: PASS. Capability flags: makes network calls. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
gabrielmoreira (@gabrielmoreira) published this skill. Their other Agent Skills are listed on their SkillMD profile.