一键导入
do-deploy-example
Template for a repo-specific /do-deploy skill. Use when creating a production deployment skill: copy to do-deploy/ and customize.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Template for a repo-specific /do-deploy skill. Use when creating a production deployment skill: copy to do-deploy/ and customize.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Pre-publish editorial gate for external-audience content: removes AI-writing tells and blocks hollow drafts. Use on documents, presentations, emails, posts, or web copy once a first draft exists. Triggered by 'de-slop this', 'editorial pass', 'humanize this', 'remove the AI tells', or invoked as a mandatory gate by email, do-presentation, linkedin, and x-com.
Stage, launch, grade, and schedule a Claude Managed Agent (CMA) from a build-sheet. Triggered by 'build the agent', 'launch this agent', 'deploy a managed agent', or as /imagine-agent's handoff.
Create/review/maintain Claude Code Routines (cloud scheduled agents, aka 'Cowork'). Triggered by 'set up a routine', 'schedule a cloud agent', 'cowork task', 'migrate to a routine'.
Create a polished Marp slide deck about a feature, concept, or system. Triggered by 'make a presentation', 'create slides', 'do-presentation', or 'explain this as a deck'.
Use when reading, searching, drafting, or sending email. Triggered by 'read my email', 'check my inbox', 'send an email', 'reply to that email', 'search my mail', or any request to read/send mail.
Use when reading posts or engaging on LinkedIn. Triggered by requests to comment on LinkedIn, browse the feed, write or interact with posts, check DMs, or read/reply to LinkedIn messages.
| name | do-deploy-example |
| description | Template for a repo-specific /do-deploy skill. Use when creating a production deployment skill: copy to do-deploy/ and customize. |
| 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 template's installed command (in this repo, /do-deploy <argument>). Extract whatever follows the command as the value of DEPLOY_ARG. Do NOT stop or report an error; just use the argument from the message.
For cross-project work, check whether the GH_REPO environment variable is set (some agent harnesses export it automatically; otherwise export GH_REPO=owner/name yourself). The gh CLI natively respects this env var, so all gh commands target that repository — no --repo flags or manual parsing needed. When it is unset, gh targets the repo of the current working directory.
If your environment exports a filesystem path to the deploy target's checkout (this template calls it DEPLOY_TARGET_REPO; adapt the name to your repo's convention, or default to the current directory), 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:
# Adapt DEPLOY_TARGET_REPO to your repo's target-path env var (see Cross-Repo Resolution)
REPO="${DEPLOY_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 DEPLOYMENT_PROCESS.md inside the .claude/skills/do-deploy/ directory 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-global/do-deploy-example .claude/skills/do-deploy (in a repo without a skills-global/ split, copy from wherever this template lives to a sibling do-deploy/ directory)SKILL.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