with one click
do-deploy-example
// Template for creating a repo-specific /do-deploy skill. Copy this directory to do-deploy/ and customize DEPLOYMENT_PROCESS.md and HEALTH_CHECKS.md for your repo's production deployment process.
// Template for creating a repo-specific /do-deploy skill. Copy this directory to do-deploy/ and customize DEPLOYMENT_PROCESS.md and HEALTH_CHECKS.md for your repo's production deployment process.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | do-deploy-example |
| description | Template for creating a repo-specific /do-deploy skill. Copy this directory to do-deploy/ and customize DEPLOYMENT_PROCESS.md and HEALTH_CHECKS.md for your repo's production deployment process. |
| argument-hint | <pr-number-or-branch> |
| context | fork |
| disable-model-invocation | true |
This is a template. Copy this directory to .claude/skills/do-deploy/ and customize it for your repo. See the bottom of this file for what to change.
You are the production deployment operator. You verify a merge is complete, execute the production deployment process, and confirm the deployment succeeded. You do not write code, run tests, or create PRs.
This skill is not part of the SDLC pipeline. The SDLC pipeline ends at merge, which already handles dev/staging deployment as a side effect. This skill is invoked separately when the team is ready to promote merged changes to production.
| Sub-file | Load when... |
|---|---|
DEPLOYMENT_PROCESS.md | Starting the deploy (repo-specific production steps, rollback) |
HEALTH_CHECKS.md | After production deployment completes (verification commands, expected outputs) |
DEPLOY_ARG: $ARGUMENTS
If DEPLOY_ARG is empty or literally $ARGUMENTS: The skill argument substitution did not run. Look at the user's original message in the conversation -- they invoked this as /do-deploy <argument>. Extract whatever follows /do-deploy as the value of DEPLOY_ARG. Do NOT stop or report an error; just use the argument from the message.
For cross-project work, the GH_REPO environment variable is automatically set by sdk_client.py. The gh CLI natively respects this env var, so all gh commands automatically target the correct repository. No --repo flags or manual parsing needed.
When SDLC_TARGET_REPO is set, use it for all local filesystem and git operations.
Detect argument type:
DEPLOY_ARG starts with # or is a pure number: treat as PR numberDEPLOY_ARG is a branch name: find the associated merged PR# By PR number:
gh pr view $PR_NUMBER --json number,title,state,mergedAt,mergeCommit,headRefName
# Most recent merge:
gh pr list --state merged --limit 1 --json number,title,mergedAt,mergeCommit,headRefName
Verify the PR is merged. If state is not MERGED, stop and report:
Deploy blocked: PR #N is not merged (state: {state}).
Merge the PR first, then re-run /do-deploy.
Record:
PR_NUMBER: The PR numberPR_TITLE: The PR titleMERGE_COMMIT: The merge commit SHAMERGE_BRANCH: The base branch the PR was merged intoBefore deploying, verify the environment is ready:
REPO="${SDLC_TARGET_REPO:-.}"
# 1. Confirm local repo is on the merge target branch and up to date
git -C "$REPO" checkout main && git -C "$REPO" pull
# 2. Verify the merge commit exists locally
git -C "$REPO" log --oneline -1 $MERGE_COMMIT
# 3. Check for deployment blockers (customize per repo)
# Examples: active incidents, deploy freezes, dependency issues
If the merge commit is not present locally after pull, stop and report the discrepancy.
This step is repo-specific. Load DEPLOYMENT_PROCESS.md for the actual deployment commands.
If DEPLOYMENT_PROCESS.md does not exist, use this fallback template:
No DEPLOYMENT_PROCESS.md found. This skill needs to be customized for this repo.
Create .claude/skills/do-deploy/DEPLOYMENT_PROCESS.md with:
1. Production environment details (URLs, infrastructure, access)
2. Production deployment commands
3. Rollback procedure
4. Required credentials or access
See /do-deploy-example for a complete template.
Production deployment rules:
This step is repo-specific. Load HEALTH_CHECKS.md for verification commands.
If HEALTH_CHECKS.md does not exist, use basic checks:
# Generic health checks (customize per repo)
# 1. Service is responding
# 2. No new errors in logs since deployment
# 3. Key endpoints return expected status codes
Health check rules:
Report deployment status with structured evidence:
## Deploy Report: PR #{PR_NUMBER}
**PR**: {PR_TITLE}
**Commit**: {MERGE_COMMIT}
**Environment**: Production
**Status**: {SUCCESS | FAILED | PARTIAL}
**Timestamp**: {deployment timestamp}
### Health Checks
- [ ] Service responding: {status}
- [ ] Error rate normal: {status}
- [ ] Key flows verified: {status}
### Evidence
{deployment output, health check results, log snippets}
### Rollback
{If failed: rollback steps. If succeeded: "No rollback needed."}
Before writing any config, have a conversation with your team (or with the PM session) to answer these questions. Every repo's deploy is different -- there is no universal answer.
Questions to answer:
Write the answers into DEPLOYMENT_PROCESS.md and HEALTH_CHECKS.md. The SKILL.md orchestration (Steps 1-5 above) stays the same across repos -- only the sub-files change.
cp -r .claude/skills/do-deploy-example .claude/skills/do-deploySKILL.md frontmatter:
name: to do-deploydescription: specific to your repo's production deploymentdisable-model-invocation: trueDEPLOYMENT_PROCESS.md with your production deployment commands, rollback procedure, and any deploy freeze checksHEALTH_CHECKS.md with your production health verification commands/do-deploy after your next merge