一键导入
promote-to-prod
After a PR is merged, monitor CI/CD, approve PROD deploy, and validate
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
After a PR is merged, monitor CI/CD, approve PROD deploy, and validate
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | promote-to-prod |
| description | After a PR is merged, monitor CI/CD, approve PROD deploy, and validate |
| user-invocable | true |
| allowed-tools | ["Bash","Glob","Grep","Read","Agent"] |
Promote merged changes to PROD by monitoring CI/CD, approving the production deployment, and validating the live bot.
Execute these steps sequentially. Stop and report if any step fails.
After a PR merge, the "Run Terraform" workflow triggers automatically. Find the latest run:
gh run list --workflow terraform.yml --branch master --limit 3 --json databaseId,status,conclusion,createdAt
Identify the most recent run that is in_progress or queued. Save the databaseId.
Poll the workflow run every 30 seconds until the plan jobs complete:
gh run view <RUN_ID> --json jobs --jq '.jobs[] | {name, status, conclusion}'
Wait for the plan jobs (names containing "plan") to reach completed status.
The PROD apply job pauses for GitHub Environment approval. Poll for the pending deployment:
gh api repos/{owner}/{repo}/actions/runs/<RUN_ID>/pending_deployments
When a pending deployment appears for the production environment, approve it:
gh api repos/{owner}/{repo}/actions/runs/<RUN_ID>/pending_deployments \
-X POST \
-f environment_ids[]='<ENV_ID>' \
-f state=approved \
-f comment='Approved by Claude Code'
If no pending deployment appears after 10 minutes, check if the workflow auto-approved or if there's an error.
Poll the workflow run every 60 seconds until it completes. This typically takes 15-30 minutes:
STATUS=$(gh run view <RUN_ID> --json status,conclusion --jq '.status')
completed with success — proceed to validationcompleted with failure — stop and report the failure. Use gh run view <RUN_ID> --log-failed to get error details.Message the PROD bot in Slack to validate the deployed changes work:
Use the Slack MCP tools (slack_send_message, slack_read_thread) for all interactions.
Report to the user:
/deploy-worker-dev and /deploy-worker-prod skills