Skip to content
Skills Library
Programming · Planning

pr

/pr

引導 pull request 建立、審查自動化與合併策略。 Use when: 建立 PR、自動化審查流程、設定合併政策。 Not for: 審查本身的內容實質——請用 /code-review;分支命名與合併策略——請用 /git-workflow-guide。 Keywords: pull request, PR, merge, review, GitHub, GitLab, 合併請求, 審查自動化, 合併策略.

Licence
MIT
Last repository change
08.11.2026

Assessment and security

95/ 100Class: good
Format20 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
4
Deprecation

No signals detected. Repository changed on 08.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

引導 pull request 建立、審查自動化與合併策略。 Use when: 建立 PR、自動化審查流程、設定合併政策。 Not for: 審查本身的內容實質——請用 /code-review;分支命名與合併策略——請用 /git-workflow-guide。 Keywords: pull request, PR, merge, review, GitHub, GitLab, 合併請求, 審查自動化, 合併策略.

Arguments

/pr [branch name or PR number | 分支名稱或 PR 編號]
Original author description

引導 pull request 建立、審查自動化與合併策略。 Use when: 建立 PR、自動化審查流程、設定合併政策。 Not for: 審查本身的內容實質——請用 /code-review;分支命名與合併策略——請用 /git-workflow-guide。 Keywords: pull request, PR, merge, review, GitHub, GitLab, 合併請求, 審查自動化, 合併策略.

How it works

  1. PR 建立檢查清單
  2. PR 描述模板
  3. 合併策略決策
  4. 自動審查觸發條件
  5. 工作流程
  6. 使用方式
  7. 下一步引導
  8. 參考
  9. 版本歷史
  10. AI 代理行為
Original SKILL.md headings · 102 lines, 322 words
SKILL.md preview
---
name: pr
scope: universal
source: ../../../../skills/pr-automation-assistant/SKILL.md
source_version: 1.0.0
translation_version: 1.1.0
last_synced: 2026-10-12
source_hash: a54acd269f70
status: current
description: |
  引導 pull request 建立、審查自動化與合併策略。
  Use when: 建立 PR、自動化審查流程、設定合併政策。
  Not for: 審查本身的內容實質——請用 /code-review;分支命名與合併策略——請用 /git-workflow-guide。
  Keywords: pull request, PR, merge, review, GitHub, GitLab, 合併請求, 審查自動化, 合併策略.
allowed-tools: Read, Grep, Glob, Bash(git:*, gh:*)
argument-hint: "[branch name or PR number | 分支名稱或 PR 編號]"
---

# PR 自動化助手

> **語言**: [English](https://github.com/AsiaOstrich/universal-dev-standards/blob/main/skills/pr-automation-assistant/SKILL.md) | 繁體中文

> ⚠️ **狀態:參考用(非可執行流程)** — PR 生命週期協調(5 步驟 CREATE→REVIEW→APPROVE→MERGE→CLEANUP、>400 行 size gate、CI gate、squash/merge 策略、gh CLI 整合)已於 2026-04-28 移至 **adoption layer(XSPEC-095)**。此處保留 PR 描述模板、合併策略決策矩陣、auto-review 觸發規則供參考;需要強制執行的流程請改用你的 adoption layer 工具鏈。

簡化從建立到合併的 Pull Request 生命週期。

## PR 建立檢查清單

| 項目 | 規則 |
|------|------|
| 標題 | `<type>(<scope>): <summary>`,70 字元內 |
| 描述 | 使用結構化模板 |
| 標籤 | 至少一個分類標籤 |
| 審查者 | 依 CODEOWNERS 或領域指派 |
| 分支 | 與基礎分支同步 |

## PR 描述模板

```markdown
## 摘要
<1-3 個重點描述變更>

## 變更內容
- 新增 / 修改 / 移除 ...

## 測試計畫
- [ ] 單元測試通過
- [ ] 手動驗證步驟

## 截圖
(如有 UI 變更)
```

## 合併策略決策

| 策略 | 使用時機 |
|------|----------|
| **Squash merge** | 功能分支,提交記錄零散 |
| **Merge commit** | 發布分支,保留完整歷史 |
| **Rebase** | 線性歷史,小幅變更 |

## 自動審查觸發條件

| 觸發條件 | 閾值 | 動作 |
|----------|------|------|
| PR 大小 | > 400 行變更 | 要求拆分 |
| 無測試 | 0 個測試檔案變更 | 阻止合併 |
| CI 失敗 | 任何檢查失敗 | 阻止合併 |
| 過期 PR | > 7 天無活動 | 通知作者 |
| 草稿 PR | 標記為草稿 | 跳過審查者指派 |

## 工作流程

```
CREATE ──► REVIEW ──► APPROVE ──► MERGE ──► CLEANUP
```

1. **建立(Create)** — 建立分支、提交、推送,並以模板開啟 PR
2. **審查(Review)** — 自動化檢查 + 人工審查
3. **核准(Approve)** — 所有檢查通過,且達到必要的核准數
4. **合併(Merge)** — 套用選定的合併策略
5. **清理(Cleanup)** — 刪除來源分支,更新關聯的 issue

## 使用方式

- `/pr` - 引導建立當前分支的 PR
- `/pr create` - 使用模板建立 PR
- `/pr --template` - 顯示 PR 描述模板
- `/pr review 123` - 審查特定 PR

## 下一步引導

`/pr` 完成後,AI 助手應建議:

> **PR 操作完成。建議下一步:**
> - 執行 `/code-review` 進行詳細程式碼審查 ⭐ **推薦**
> - 執行 `/commit` 修正審查發現的問題
> - 執行 `/changelog` 更新變更日誌
> - 檢查 CI 狀態 → `gh pr checks`

## 參考

- 核心規範:[code-review-checklist.md](https://github.com/AsiaOstrich/universal-dev-standards/blob/main/core/code-review-checklist.md)
- 核心規範:[git-workflow.md](https://github.com/AsiaOstrich/universal-dev-standards/blob/main/core/git-workflow.md)

## 版本歷史

| 版本 | 日期 | 變更說明 |
|------|------|----------|
| 1.0.0 | 2026-03-23 | 初始版本 |

## AI 代理行為

> 完整的 AI 行為定義請參閱對應的命令文件:[`/pr`](https://github.com/AsiaOstrich/universal-dev-standards/blob/main/skills/commands/pr.md#ai-agent-behavior--ai-代理行為)

## 授權

CC BY 4.0 — 文件內容

Versions

RepositoryScoreLicence
This page · AsiaOstrich/universal-dev-standards95MIT
harlan-zw/harlan-claude-code100MIT
harlan-zw/harlan-agent-kit100MIT
jongio/skills100MIT
windmill-labs/windmill100Apache-2.0
opsmill/infrahub100Apache-2.0
nesquikm/dev-process-toolkit100MIT
tony/skills100MIT
tony/skills100MIT

Database snapshot: 13.11.2026 · package version 29d8eef01113 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 84pr-automation-assistant
    引导 pull request 创建、审查自动化与合并策略。 Use when: 创建 PR、自动化审查流程、配置合并策略。 Not for: 审查本身的内容实质——请用 /code-review;分支命名与合并策略——请用 /git-workflow-guide。 Keywords: pull request, PR, merge, review, GitHub, GitLab, 合并请求, 审查自动化, 合并策略.
  • 100pull-merge-request-creation
    Generate pull request (GitHub) or merge request (GitLab) descriptions following repository templates. Use when creating PRs/MRs to communicate changes, impact, and value. Triggers: "create pr", "create mr", "pull request", "merge request", "pr description", "mr description".
  • 100git-workflow-guide
    Guide Git branching strategies, branch naming, and merge operations. Use when: creating branches, merging, pull requests, Git workflow questions. Not for: composing the commit message — use /commit; the safety checks around pushing — use /push. Keywords: branch, merge, PR, pull…
  • 100create-github-pr
    Create GitHub pull requests using the gh CLI. Use when the user wants to create a new PR, submit code for review, or open a pull request. Trigger keywords - create PR, pull request, new PR, submit for review, code review.
  • 100merge-pr
    Safely merges GitHub pull requests using gh CLI. Use when the user wants to merge a PR, merge a pull request, or complete code review.
  • 100review-pr
    Review a pull request for code quality and security issues. Use when the user wants to review a PR, check PR code changes, or audit a pull request. Triggers on: "review PR", "review pull request", "check this PR", "the `review-pr` skill".

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.