Skip to content
Agentmart
Submit a tool

pr-finish

PR 收尾:整合目标分支并解决冲突、清理基线既有问题、合并 PR、交接后续工作、关闭关联问题、回收工作树与分支。仅限用户主动调用。

Skill by gitbobobo

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/gitbobobo-pr-finish

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

PR 收尾:整合目标分支并解决冲突、清理基线既有问题、合并 PR、交接后续工作、关闭关联问题、回收工作树与分支。仅限用户主动调用。

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/pr-finish

What's inside

Skill name
pr-finish
Description
PR 收尾:整合目标分支并解决冲突、清理基线既有问题、合并 PR、交接后续工作、关闭关联问题、回收工作树与分支。仅限用户主动调用。
License
MIT
Instructions
22 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# pr-finish

PR 已审查收敛,用户下达收尾指令后执行。与目标分支的整合在这里一次完成:对最新目标分支整合、验证、合并。

仓库特有的部分一律读仓库自己的文档(`AGENTS.md`、贡献指南、质量门禁文档):检查入口、合并入口、合并方式、交接约定。仓库没有声明时用下文的默认做法。

## 步骤

1. **核对起点**:PR 为 OPEN,本地 HEAD 等于远端 PR head,工作区干净。有未提交改动先按 `$git-prefs`「提交」处理。
2. **整合目标分支**:fetch 后把最新的 `origin/<base>` 合进当前分支(`git merge origin/<base>`)。仓库文档规定了整合方式就照它。默认用 merge:分支已推送、已审查,merge 只需把每处冲突解决一次,保留已推送的历史和审查评论的锚点。
3. **清理基线**:目标分支上既有的编译、lint、测试错误和警告一并修掉,与本 PR 的改动分开提交。提交并推送后跑仓库声明的合并前检查。完成标准:合并前检查在远端 PR head 上全部通过。
4. **判断是否复审**:冲突解决或基线修复改变了本 PR 自身代码的语义时,按 `$pr-review-loop` 请求一轮复审,范围限于整合与修复提交;无冲突、或冲突只在文档与生成物上,跳过复审。
5. **合并**:用仓库声明的合并入口合并;没有声明时 `gh pr merge <号> --match-head-commit <HEAD>`,合并方式取仓库默认。其间目标分支又前进了,回到第 2 步。完成标准:PR 状态为 MERGED。
6. **交接后续工作**:仓库约定了后续交接(如跨端适配、下一阶段 PR)时,按约定输出交接提示词,并说明发给谁。
7. **关闭关联问题**:PR 关联了问题追踪条目,且整条需求已经全部落地,按对应技能把它标为完成;需求还有后续 PR 时保持进行中。
8. **回收分支与工作树**:本技能被调用即视为用户明确要求删除当前工作树。
   - 删除远端分支(合并时已自动删除则跳过);
   - 记下主仓库 git 目录(`git rev-parse --path-format=absolute --git-common-dir`)和当前分支名;
   - 当前在链接工作树里时,按 `$git-prefs`「删除当前工作树」清空,再 `git --git-dir <主仓库 git 目录> branch -D <分支>`;在主检出上则切回目标分支、拉取后删除本地分支。
   - 本机装了 T3 Code(有 `~/.t3/worktrees`)时,再跑 `$t3-code` 的 `t3-worktree-gc.mjs --purge-build` 预演,回收其他已终结线程留下的工作树和构建产物;结论确认无误后加 `--apply`。
9. **汇报**:合并提交、整合时解决的冲突与基线修复、是否复审、交接提示词、关联问题状态、回收结果。

From gitbobobo/skills, MIT.

More from gitbobobo/skills

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 19, 2026 (9 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from gitbobobo

Cite this page

pr-finish skill. Agent Mart. https://agentmart.dev/skills/gitbobobo-pr-finish (last updated 2026-10-24)