一键导入
smaqit-release-git-pr
Execute git operations for PR-based releases (commit, push via report_progress)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Execute git operations for PR-based releases (commit, push via report_progress)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when manually generating or updating the canonical 3-workflow GitHub Actions CI/CD set (deploy.yml, provision.yml, post-merge-deploy.yml) for a Node.js + React application deployed to a VM via Terraform and Docker Compose. Also use when an operator invokes /cicd.generate, or when updating existing workflows to match project conventions. In `smaqit.new-greenfield-project`, the deployment agent generates workflows during Phase 5 using these patterns as reference — invoke this skill directly only when generating CI/CD outside the zero-to-prod flow. Note: `copilot-setup-steps.yml` is provided by the smaqit framework and is not generated by this skill.
Use when deploying a Node.js backend + React frontend application to a remote VM via rsync. Used in the Phase 5 dev environment sweep of `smaqit.new-greenfield-project` to validate the deployment approach locally before CI/CD. Also use as a manual fallback for direct VM deployment outside the CI/CD pipeline.
Use after any deployment to confirm the application is healthy before closing the task or proceeding. Checks the health endpoint, verifies the deployed commit SHA against the current local commit, and validates the SPA root HTTP response. Produces a PASS/FAIL report per check with a final summary. Also use when a deployment task asks to confirm success or when re-verifying after a fix.
Use when configuring a custom domain with a Let's Encrypt TLS certificate for a running nginx server. Covers DNS propagation verification, nginx server_name update, Certbot certificate issuance, HTTPS smoke tests, and auto-renewal verification. Also use when activating a purchased domain for a deployed application, setting up HTTPS post-deployment, or when a spec references INF-TOPOLOGY-004 through INF-TOPOLOGY-007 as pending TLS configuration.
Use when writing deploy stamp files (DEPLOY_SHA, DEPLOY_TIME) to the VM after a successful deployment, or when re-stamping without a full redeploy. Also use when the health endpoint returns "sha":"unknown" after deployment, when a deployed PR needs a notification comment, or when smaqit.infrastructure-deploy-rsync invokes the post-deploy stamp step. Produces DEPLOY_SHA and DEPLOY_TIME files in /opt/him/backend/ on the VM and optionally posts a deploy comment on the merged PR.
Use when validating staged files before committing to catch .env files, plaintext API keys/secrets, draft spec files on main-branch commits, and large files over 1 MB. Also use when setting up the automated git pre-commit hook via the bundled install script so checks run automatically on every commit. Produces a PASS/FAIL report per check, with filenames and matching lines listed for failures.
| name | smaqit.release-git-pr |
| description | Execute git operations for PR-based releases (commit, push via report_progress) |
| metadata | {"version":"0.3.0"} |
Execute git operations required for PR-based releases: stage changes, commit to PR branch, and push via report_progress tool.
Use this skill for PR-based releases (running in CI/CD or agent workflow) after all files have been prepared. This skill:
report_progress tool (handles credentials internally)Do NOT use this skill for local releases - use release-git-local instead.
Stage CHANGELOG.md and any confirmed version files:
git add CHANGELOG.md
If version files were updated:
git add package.json pyproject.toml
Verify staged changes:
git --no-pager diff --cached --name-only
Create commit with release preparation message:
git commit -m "Prepare release vX.Y.Z"
Use "Prepare release" not "Release" because the actual release happens after PR merge to main.
Verify commit was created:
git --no-pager log -1 --oneline
Use the report_progress tool to push changes to the PR branch:
This tool:
git pushDo NOT:
git push directly (credentials not available in agent environment)CRITICAL: This step is not optional. A wrong PR title causes the post-merge release workflow to skip all jobs silently.
Check the current PR title:
gh pr view --json title -q .title
The PR title MUST match one of these patterns:
Prepare release vX.Y.ZRelease vX.Y.ZIf the title does NOT match, update it immediately:
gh pr edit --title "Prepare release vX.Y.Z"
Common failure patterns to watch for:
Post-merge workflow automatically:
vX.Y.ZNo manual intervention required!
Document in PR description:
## Post-Merge Automation
When this PR is merged to `main`, the post-merge workflow will automatically:
✅ Create git tag `vX.Y.Z`
✅ Build binaries for Linux, macOS, Windows (amd64/arm64)
✅ Publish GitHub Release with binaries and changelog
Workflow: `.github/workflows/post-merge-release.yml`
Provide a summary of PR operations:
success: true
commit_sha: abc123def456
pr_updated: true
pr_branch: feature/release-v0.3.0
pr_title: "Prepare release vX.Y.Z"
post_merge_automation: true
Output fields:
success: Boolean indicating all operations completedcommit_sha: SHA of the release preparation commitpr_updated: Boolean indicating PR was updated successfullypr_branch: The feature branch containing release changespr_title: The PR title that triggers post-merge automationpost_merge_automation: Boolean indicating workflow will handle release| Error | Likely Cause | Suggested Action |
|---|---|---|
nothing to commit | Files unchanged or not staged | Verify changes were made and staged correctly |
report_progress fails | PR update failed | Check PR status and retry |
| Already on main branch | Wrong workflow used | Use release-git-local skill for local releases |
| Aspect | release-git-local | release-git-pr |
|---|---|---|
| Branch | main | Feature/PR branch |
| Commit message | "Release vX.Y.Z" | "Prepare release vX.Y.Z" |
| Tag creation | ✅ Yes, immediately | ❌ No, after merge to main |
| Push method | git push directly | report_progress tool |
| Git credentials | User's local credentials | Handled by report_progress |
| When to use | Developer's local machine | CI/CD or agent workflow |
report_progress tool handles authentication - no need for credential setup.github/workflows/post-merge-release.yml for workflow details