Pdd Pr Merge logo

Pdd Pr Merge

Community
wonderslife
pdd-pr-merge

合并 PR 并触发归档流程。支持 GitHub 模式和本地模式。支持中文触发:合并PR、PR归档、合并请求、归档流程。

Overview

Publisherwonderslife
Repositorypdd-skills
Skill namepdd-pr-merge
Stars
41
Forks
11
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by wonderslife on GitHub. Read the source before you install it.

Installation

Install the Pdd Pr Merge AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/wonderslife/pdd-skills/tree/main/pdd-pr-merge
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wonderslife/pdd-skills.git /tmp/pdd-skills
mkdir -p .claude/skills
cp -r /tmp/pdd-skills/pdd-pr-merge .claude/skills/pdd-pr-merge
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pdd Pr Merge in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Pdd Pr Merge on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Pdd Pr Merge is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

pdd-pr-merge

Description: 合并 PR 并触发归档流程。支持 GitHub 模式和本地模式。

Details: 合并 PR 并触发归档

Input: OpenSpec Change ID 或 PR 编号

执行流程

1. 前置检查

1. 获取 PR 状态
   ├── GitHub 模式: 从 GitHub API 获取
   └── 本地模式: 从 pr-record.md 获取

2. 确认 PR 状态为 Open
   └── 已合并/已关闭的 PR 无法再次合并

3. 确认无 Blocking 问题
   ├── 有 Blocking → 提示用户修复
   └── force=true → 跳过检查

4. 确认用户有合并权限
   └── 本地模式: 跳过权限检查

2. 合并 PR

GitHub 模式:
├── 执行 GitHub Merge
│   ├── squash=true → Squash and merge
│   └── squash=false → Merge commit
├── 添加合并记录
└── 更新 PR 状态为 merged

本地模式:
├── 切换到 main 分支
├── 合并 Feature Branch
│   ├── squash=true → git merge --squash
│   └── squash=false → git merge
├── 提交合并
└── 更新 pr-record.md 状态

3. 清理分支

GitHub 模式:
├── 删除远程 Feature Branch
└── 删除本地 Feature Branch

本地模式:
└── 删除本地 Feature Branch

4. 触发归档

根据来源触发归档:

OpenSpec Change:
├── 执行 /openspec-archive-change {change-id}
└── 移动到 archive 目录

PDD 功能点:
├── 更新功能点状态为 completed
└── 更新功能点矩阵

批量 PR:
├── 逐个归档所有 Change
└── 更新批量 PR 记录

5. 推送到远程

GitHub 模式:
└── 自动推送(已通过 GitHub API)

本地模式:
├── 不自动推送(等网络通后人工 push)
├── 只提交到本地 Git
└── 提示用户手动推送命令

6. 生成合并报告

输出:
├── 合并摘要
├── 变更统计
├── 归档状态
└── 后续操作

输出格式

GitHub 模式

markdown
## PR 合并完成

**PR 编号**: #123
**Change ID**: c-001-xxx
**合并方式**: Squash
**合并时间**: 2026-03-21 15:30:00

### 合并内容

- 提交数: 3
- 文件变更: 5
- 新增行数: +150
- 删除行数: -20

### 归档状态

- OpenSpec Change: ✅ 已归档
- 归档路径: `openspec/changes/archive/2026-03-21-c-001-xxx/`

### 后续操作

- 查看归档内容: `openspec/changes/archive/2026-03-21-c-001-xxx/`
- 查看主规格: `openspec/specs/workflow-permission-control/spec.md`

本地模式

markdown
## PR 合并完成(本地模式)

**Change ID**: c-001-xxx
**分支**: change/c-001-xxx → main
**合并方式**: Squash
**合并时间**: 2026-03-21 15:30:00

### 合并内容

- 文件变更: 5
- 新增行数: +150
- 删除行数: -20

### 归档状态

- OpenSpec Change: ✅ 已归档
- 归档路径: `openspec/changes/archive/2026-03-21-c-001-xxx/`

### ⚠️ 推送提醒

本地模式已合并到本地 main 分支,**未推送到远程**。

网络恢复后请手动推送:
```bash
git push origin main

后续操作

  • 查看归档内容: openspec/changes/archive/2026-03-21-c-001-xxx/

## 参数

| 参数 | 类型 | 必需 | 默认值 | 描述 |
|------|------|------|--------|------|
| `change_id` | string | 否 | - | OpenSpec Change ID |
| `pr_number` | number | 否 | - | GitHub PR 编号 |
| `force` | boolean | 否 | false | 强制合并(忽略 Warning) |
| `squash` | boolean | 否 | true | 是否 Squash 合并 |

## 错误处理

### 有 Blocking 问题

❌ 存在 Blocking 问题,无法合并

Blocking 问题:

  1. [B-001] 单元测试失败
  2. [B-002] 测试覆盖率不足

请修复问题后重新审查: /pdd-pr-create c-001-xxx --re-review

如需强制合并: /pdd-pr-merge c-001-xxx --force


### PR 已合并

❌ PR 已合并

PR 编号: #123 合并时间: 2026-03-21 14:00:00

该 PR 已经合并,无需重复操作。


### 推送失败(本地模式)

⚠️ 推送到远程失败

错误: Network error

请手动推送:

bash
git push origin main

推送后确认归档完成。


## 与其他技能的协作

pdd-pr-merge │ ├── 被调用方 │ ├── pdd-pr-review (确认后调用) │ └── 用户直接调用 │ └── 调用方 └── openspec-archive-change (触发归档)


## 合并策略

### Squash Merge(默认)

优点: ├── 保持 main 分支历史整洁 ├── 每个 Change 对应一个提交 └── 便于回滚整个 Change

缺点: ├── 丢失详细提交历史 └── 不适合多人协作的 Change


### Merge Commit

优点: ├── 保留完整提交历史 ├── 便于追踪每个小改动 └── 适合多人协作

缺点: ├── main 分支历史复杂 └── 回滚需要多个操作


---

## PR管理规范

详见 [pdd-pr-create SKILL.md](./pdd-pr-create/SKILL.md#pr管理规范)

### 归档时机

- **归档**: 用户手动触发
- **命令**: `/openspec-archive-change [change-id]`
- **前提条件**:
  - PR已合并
  - 用户确认归档

---

## PDD实施规范引用

本Skill遵循PDD框架实施规范,详见 [pdd-framework-design.md 第9章](../docs/pdd-framework-design.md#9-pdd-实施规范)。

Frequently asked questions

What does the Pdd Pr Merge AI skill do?

合并 PR 并触发归档流程。支持 GitHub 模式和本地模式。支持中文触发:合并PR、PR归档、合并请求、归档流程。

Why use Pdd Pr Merge on TypingMind?

Because you install it once and use it with any model. Pdd Pr Merge is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Pdd Pr Merge in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wonderslife/pdd-skills/tree/main/pdd-pr-merge. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Pdd Pr Merge?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Pdd Pr Merge?

As many as you like. As long as a model supports skills, you can use Pdd Pr Merge with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Pdd Pr Merge AI skill free?

Yes. It is published on GitHub by wonderslife under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇