Pdd Pr Create logo

Pdd Pr Create

Community
wonderslife
pdd-pr-create

创建 PR 并执行自动化审查。支持 GitHub 模式和本地模式(GitHub 不可访问时自动降级)。支持中文触发:创建PR、提交PR、新建PR、PR创建。

Overview

Publisherwonderslife
Repositorypdd-skills
Skill namepdd-pr-create
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 Create 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-create
  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-create .claude/skills/pdd-pr-create
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pdd Pr Create 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 Create 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 Create 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-create

Description: 创建 PR 并执行自动化审查。支持 GitHub 模式和本地模式(GitHub 不可访问时自动降级)。

Details: 创建 PR 并执行自动化审查

Input: OpenSpec Change ID 或功能点 ID

执行流程

1. 模式检测

启动时检测:
├── 尝试连接 GitHub API (gh auth status)
├── 成功 → GitHub 模式
└── 失败 → 本地模式(提示用户)

2. 准备阶段

1. 解析参数
   ├── 获取 change_id
   └── 确认 Change 目录存在

2. 检查 Change 状态
   ├── 读取 tasks.md
   ├── 确认所有任务已完成
   └── 如有未完成任务,提示用户

3. 检查当前分支状态
   ├── 确认在正确的分支
   ├── 确认所有代码已提交
   └── 如有未提交代码,提示用户

3. 分支管理

GitHub 模式:
├── 创建 Feature Branch: change/{change-id}
├── 推送到远程仓库
└── 创建 GitHub PR (Draft)

本地模式:
├── 创建 Feature Branch: change/{change-id}
├── 记录分支信息到 pr-record.md
└── 不推送(等待用户手动推送)

4. 自动化审查

1. 运行单元测试
   ├── Java: mvn test -pl {module}
   ├── Node.js: npm test
   └── 记录测试结果

2. 检查测试覆盖率
   ├── Java: JaCoCo report
   ├── Node.js: Jest coverage
   └── 与阈值比较

3. 运行代码质量检查
   ├── Java: SonarQube / SpotBugs
   ├── Node.js: ESLint
   └── 记录问题列表

4. 检查文档完整性
   ├── 确认 spec.md 存在
   ├── 确认 tasks.md 已更新
   └── 记录检查结果

5. 安全扫描(可选)
   └── 检查敏感信息泄露

5. 生成审查报告

创建: openspec/changes/{change-id}/review-report.md

内容:
├── 审查摘要
├── Blocking 问题列表
├── Warning 问题列表
├── Suggestion 列表
├── 测试覆盖详情
└── 建议操作

6. 创建 PR 记录

GitHub 模式:
├── 创建 GitHub PR
├── 设置标题: feat(xxx): {change-name}
├── 设置描述: 包含 Change 链接、审查摘要
└── 添加标签: change-id, priority

本地模式:
├── 创建 pr-record.md
├── 记录分支信息
├── 记录审查结果
└── 记录创建时间

7. 输出结果

输出摘要:
├── PR 编号 / 本地记录路径
├── 分支信息
├── 审查结果摘要表
├── 审查报告路径
└── 下一步操作提示

输出格式

GitHub 模式

markdown
## PR 创建完成

**PR 编号**: #123
**分支**: change/c-001-xxx → main
**状态**: Draft

### 自动化审查结果

| 检查项 | 状态 | 详情 |
|--------|------|------|
| 单元测试 | ✅ 通过 | 15/15 用例通过 |
| 测试覆盖率 | ✅ 85% | 阈值: 70% |
| 代码质量 | ⚠️ 2 Warning | 详情见报告 |
| 安全扫描 | ✅ 通过 | 无漏洞 |
| 文档完整性 | ✅ 通过 | spec.md 已更新 |

### 审查报告

详细报告: `openspec/changes/c-001-xxx/review-report.md`

### 下一步操作

- 确认通过: `/pdd-pr-merge c-001-xxx`
- 查看详情: `/pdd-pr-review c-001-xxx`
- 修复问题后重新审查: `/pdd-pr-create c-001-xxx --re-review`

本地模式

markdown
## PR 创建完成(本地模式)

⚠️ GitHub 不可访问,已切换到本地模式

**Change ID**: c-001-xxx
**分支**: change/c-001-xxx → main
**状态**: 等待审查

### 自动化审查结果

| 检查项 | 状态 | 详情 |
|--------|------|------|
| 单元测试 | ✅ 通过 | 15/15 用例通过 |
| 测试覆盖率 | ✅ 85% | 阈值: 70% |
| 代码质量 | ⚠️ 2 Warning | 详情见报告 |

### PR 记录

已创建: `openspec/changes/c-001-xxx/pr-record.md`

### 下一步操作

- 确认合并: `/pdd-pr-merge c-001-xxx`
- 查看详情: `/pdd-pr-review c-001-xxx`
- 网络恢复后推送: `git push origin change/c-001-xxx`

参数

参数类型必需默认值描述
change_idstring是-OpenSpec Change ID
draftboolean否true是否创建为 Draft PR
coverage_thresholdnumber否70测试覆盖率阈值
re_reviewboolean否false是否重新审查

审查检查项

🔴 Blocking(必须通过)

检查项描述失败条件
unit_test单元测试通过有测试失败
coverage测试覆盖率达标覆盖率 < 阈值
critical_issues无 Critical 问题有 Critical 问题
build构建成功构建失败

🟡 Warning(警告)

检查项描述触发条件
lint代码风格有 lint 问题
documentation文档完整性spec.md 未更新
coverage_warning覆盖率警告覆盖率 < 90% 但 ≥ 70%

💡 Suggestion(建议)

检查项描述
optimization可优化的代码模式
performance潜在的性能问题
naming更好的命名建议

错误处理

Change 未完成

❌ Change 任务未完成

**Change ID**: c-001-xxx
**未完成任务**: 2/10

请先完成所有任务:
- [ ] 4.1 Code Review
- [ ] 5.1 运行单元测试

完成后再执行 `/pdd-pr-create c-001-xxx`

有未提交代码

❌ 有未提交的代码变更

**文件**:
- src/main/java/Example.java (modified)
- src/test/java/ExampleTest.java (new)

请先提交代码:
git add .
git commit -m "feat: xxx"

然后再执行 `/pdd-pr-create c-001-xxx`

有 Blocking 问题

❌ 存在 Blocking 问题,无法创建 PR

**Blocking 问题**:
1. [B-001] 单元测试失败: testAddMethod
2. [B-002] 测试覆盖率不足: 45% < 70%

请修复这些问题后重新执行 `/pdd-pr-create c-001-xxx`

与其他技能的协作

pdd-pr-create
    │
    ├── 被调用方
    │   ├── openspec-apply-change (完成后可选调用)
    │   ├── pdd-implement-feature (每个功能点完成后调用)
    │   └── 用户直接调用
    │
    └── 调用方
        ├── pdd-pr-review (查看审查结果)
        └── pdd-pr-merge (合并 PR)

PR管理规范

触发时机

  • 创建PR: 用户手动触发
  • 命令: /pdd-pr-create [change-id]
  • 前提条件:
    • 模块所有功能点验证通过
    • 质量改进任务已处理(如有)

PR粒度

  • 标准: 一个Change一个PR
  • Change定义:
    • 功能点的逻辑分组
    • 通常对应一个完整的业务功能
    • 包含相关的前后端代码、SQL、配置等

归档时机

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

PDD实施规范引用

本Skill遵循PDD框架实施规范,详见 pdd-framework-design.md 第9章。


配置

yaml
# .trae/config/pr-config.yaml
pr:
  coverage_threshold: 70
  warning_threshold: 3
  
  blocking_checks:
    - unit_test
    - coverage
    - critical_issues
    - build
  
  warning_checks:
    - lint
    - documentation
    - coverage_warning

Frequently asked questions

What does the Pdd Pr Create AI skill do?

创建 PR 并执行自动化审查。支持 GitHub 模式和本地模式(GitHub 不可访问时自动降级)。支持中文触发:创建PR、提交PR、新建PR、PR创建。

Why use Pdd Pr Create on TypingMind?

Because you install it once and use it with any model. Pdd Pr Create 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 Create in TypingMind?

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

Which AI models can use Pdd Pr Create?

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 Create?

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

Is the Pdd Pr Create 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 👇