ship PR审查
- 作者仓库星标 0
- 作者仓库 skills-registry
Ship Current Branch
Assumes code is already committed and pushed. Handles: PR creation, CI monitoring, SonarCloud, code review, security review, fixing all issues, and merging.
IMPORTANT: NEVER include Co-Authored-By, "Generated with Claude Code", or any Claude/AI attribution in commit messages, PR descriptions, or any other artifacts.
Phase 1: Create PR
- Determine the current branch:
git branch --show-current - Check if a PR already exists:
gh pr list --head <branch> --json number,url - If no PR exists, create one:
gh pr create --base dev --title "<concise title>" --body "<description>" - Note the PR number.
Phase 2: CI Monitor
- Find the latest workflow run:
gh run list --branch <branch> --limit 1 --json status,conclusion,databaseId - If the run is in progress, watch it:
gh run watch <id> - If it failed:
- Get failed logs:
gh run view <id> --log-failed - Diagnose and fix the issue.
git add,git commit,git push.- Go back to step 1.
- Get failed logs:
- If it succeeded, proceed.
Phase 3: SonarCloud Check
- Wait 60 seconds for SonarCloud analysis to propagate.
- Use
get_project_quality_gate_statuswith project keyBrad-Edwards_aptlto check the quality gate. - Use
search_sonar_issues_in_projectsto find new issues on the current branch. - If issues found:
- Fix them.
git add,git commit,git push.- Re-run Phase 2.
- If clean, proceed.
Phase 4: Code Review
CRITICAL: You MUST use the Skill tool to invoke the built-in review skill.
- Merge dev into the current branch:
git fetch origin dev && git merge origin/dev - If there are merge conflicts, resolve them, commit, and push.
- Call the Skill tool with
skill="review"to invoke the real built-in code review. - After the review completes, fix ALL issues it identified.
- Do NOT defer ANY issues.
- Do NOT categorize issues as "low priority" to avoid work.
- You are an LLM. You have no time constraints. Fix everything.
- The ONLY reason to stop and escalate to the user is if a fix requires a significant architectural change touching 5+ files outside the current feature scope.
- After fixing, re-read all findings and confirm each one was addressed.
Phase 5: Security Review
CRITICAL: You MUST use the Skill tool to invoke the built-in security-review skill.
- Call the Skill tool with
skill="security-review"to invoke the real built-in security review. - After the review completes, fix ALL issues it identified.
- Same rules as Phase 4: fix everything, defer nothing.
- After fixing, confirm all findings were addressed.
Phase 6: Final Commit & CI
If ANY fixes were made in Phases 4-5:
git addall changed files.git commit -m "Fix code review and security review findings"git push- Re-run Phase 2 (CI Monitor).
- Re-run Phase 3 (SonarCloud).
Phase 7: Report (DO NOT MERGE)
You MUST NOT merge the PR. You MUST NOT run gh pr merge. The user reviews and merges.
- Summary of all changes made during the ship process
- Review findings and what was fixed
- Security review findings and what was fixed
- Confirmation: CI green, SonarCloud passed, PR ready for user review
- PR URL
<!-- tomevault:4.0:skill_md:2026-05-22 -->Source: Brad-Edwards/aptl — distributed by TomeVault.
- 流狐分类
- 安全
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 即装即用
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- 未声明
- 底层运行要求
- 未声明
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 检测到的网络行为
- 允许外网请求
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Determine the current branch: git branch --show-current Check if a PR already exists: gh pr list --head <branch> --json number,url If no PR exists, create one:
Find the latest workflow run: gh run list --branch <branch> --limit 1 --json status,conclusion,databaseId If the run is in progress, watch it: gh run watch <id> If it failed:
Wait 60 seconds for SonarCloud analysis to propagate. Use getprojectqualitygatestatus with project key Brad-Edwardsaptl to check the quality gate. Use searchsonarissuesinprojects to find new issues on the current branch.
CRITICAL: You MUST use the Skill tool to invoke the built-in review skill. Merge dev into the current branch: git fetch origin dev && git merge origin/dev If there are merge conflicts, resolve them, commit, and push.
CRITICAL: You MUST use the Skill tool to invoke the built-in security-review skill. Call the Skill tool with skill="security-review" to invoke the real built-in security review. After the review completes, fix ALL issues it identified.
If ANY fixes were made in Phases 4-5: git add all changed files. git commit -m "Fix code review and security review findings"
# Ship Current Branch
Assumes code is already committed and pushed. Handles: PR creation, CI monitoring, SonarCloud, code review, security review, fixing all issues, and merging.
**IMPORTANT:** NEVER include Co-Authored-By, "Generated with Claude Code", or any Claude/AI attribution in commit messages, PR descriptions, or any other artifacts.
## Phase 1: Create PR
1. Determine the current branch: `git branch --show-current`
2. Check if a PR already exists: `gh pr list --head <branch> --json number,url`
3. If no PR exists, create one:
```
gh pr create --base dev --title "<concise title>" --body "<description>"
```
4. Note the PR number.
## Phase 2: CI Monitor
1. Find the latest workflow run: `gh run list --branch <branch> --limit 1 --json status,conclusion,databaseId`
2. If the run is in progress, watch it: `gh run watch <id>`
3. If it failed:
- Get failed logs: `gh run view <id> --log-failed`
- Diagnose and fix the issue.
- `git add`, `git commit`, `git push`.
- Go back to step 1.
4. If it succeeded, proceed.
## Phase 3: SonarCloud Check
1. Wait 60 seconds for SonarCloud analysis to propagate.
2. Use `get_project_quality_gate_status` with project key `Brad-Edwards_aptl` to check the quality gate.
3. Use `search_sonar_issues_in_projects` to find new issues on the current branch.
4. If issues found:
- Fix them.
- `git add`, `git commit`, `git push`.
- Re-run Phase 2.
5. If clean, proceed.
## Phase 4: Code Review
**CRITICAL: You MUST use the Skill tool to invoke the built-in review skill.**
1. Merge dev into the current branch: `git fetch origin dev && git merge origin/dev`
2. If there are merge conflicts, resolve them, commit, and push.
3. Call the Skill tool with `skill="review"` to invoke the real built-in code review.
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Phase 1: Create PR → Phase 2: CI Monitor → Phase 3: SonarCloud Check → Phase 4: Code Review → Phase 5: Security Review → Phase 6: Final Commit & CI
要点 -> IMPORTANT · CRITICAL: You MUST use the Skill tool to invoke the built-in review skill. · Assumes code is already committed and pushed. · 1. Determine the current branch: git branch --show-current 2. · 1. Find the latest workflow run: gh run list --branch <branch> --limit 1 --json status,conclusion,databaseId 2. · 1. Wait 60 seconds for SonarCloud analysis to propagate. · 1. Merge dev into the current branch: git fetch origin dev && git merge origin/dev 2. · CRITICAL: You MUST use the Skill tool to invoke the built-in security-review skill.
文件/命令 -> git branch --show-current · gh pr list --head <branch> --json number,url · gh run list --branch <branch> --limit 1 --json status,conclusion,databaseId · gh run watch <id> · gh run view <id> --log-failed · git add · git commit · git push
内容 SHA-256 -> 69ebf2b96acb
方法与流程
适用与边界
原文中的明确线索
git branch --show-current、gh pr list --head <branch> --json number,url、gh run list --branch <branch> --limit 1 --json status,conclusion,databaseId、gh run watch <id>、gh run view <id> --log-failed、git add、git commit、git push