← 返回 Skills 市场
zlszhonglongshen

PR Quality Gate

作者 zlszhonglongshen · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
66
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install pr-quality-gate
功能描述
Code Review + AI 修复 + GitHub Issue 追踪的 PR 质量门禁工作流,确保代码合入前经过系统性 Review。
使用说明 (SKILL.md)

PR Quality Gate

代码合并前的系统性质量门禁工作流,自动完成 Code Review → 问题修复 → Issue 追踪的完整闭环。

工作原理

当收到 PR Review 请求时,按顺序执行以下 Skill:

  1. code-review → 读取 PR diff,分析代码质量维度,输出 Review 报告
  2. github-issues → 发现 Bug 或 Feature 建议时,自动创建 Issue 并关联 PR
  3. kimi-cli / giga-coding-agent → 高优先级问题触发 AI Coding Agent 修复建议
  4. github → 最终通过 gh pr merge 或带条件合并

触发方式

在对话中提及以下关键词即触发:

  • "review 这个 PR"
  • "帮我 review PR#123"
  • "检查这个 pull request"
  • "PR 质量 Gate"
  • "merge 前检查"

使用示例

用户:review github.com/owner/repo/pull/456
↓ 激活 pr-quality-gate
↓ code-review: 拉取 diff,分析质量维度(逻辑/安全/性能/可读性/测试)
↓ 发现 2 个 Medium 问题,1 个 High 问题
↓ github-issues: 自动创建 3 个关联 Issue
↓ 高优先级问题触发 kimi-cli 修复建议
↓ 输出 Review 报告 + 关联 Issue 列表

输出格式

Review 报告

## PR Quality Gate Report

**PR:** owner/repo#456 — "feat: 新增支付模块"

### 质量评分
- 逻辑正确性: ⭐⭐⭐⭐☆ (4/5)
- 安全性:      ⭐⭐⭐⭐⭐ (5/5)
- 性能:        ⭐⭐⭐☆☆ (3/5)
- 可读性:      ⭐⭐⭐⭐☆ (4/5)
- 测试覆盖:    ⭐⭐☆☆☆ (2/5)

### 问题汇总
| # | 严重度 | 位置 | 问题描述 | 状态 |
|---|--------|------|----------|------|
| 1 | High   | payment.js:23 | 未做空值校验 | 🔴 Open |
| 2 | Medium | auth.py:45 | 硬编码密钥应从 env 读取 | 🟡 Open |
| 3 | Medium | utils.js:12 | 重复计算可缓存 | 🟡 Open |

### 关联 Issue
- #issue 123: payment.js:23 空值校验缺失
- #issue 124: auth.py:45 密钥硬编码
- #issue 125: utils.js:12 性能优化

### 建议
✅ 可以合并(条件:通过所有 High 问题)
⚠️ 阻塞:Issue #123 未解决前不建议合并

质量维度

维度 检查内容
逻辑正确性 边界条件、异常处理、核心算法
安全性 注入风险、认证授权、敏感数据
性能 N+1 查询、不必要的循环、内存泄漏
可读性 命名规范、注释完整性、函数长度
测试覆盖 单元测试、集成测试、边界用例

与其他 Skill 的关系

pr-quality-gate 编排以下 Skill:

code-review        核心:结构化 Code Review 流程
github-issues     发现问题时创建 Issue 并关联 PR
kimi-cli          High 严重度问题触发 AI 修复建议
github            最终执行 gh pr merge / 评论

注意事项

  • 本 Skill 不会自动合并 PR,最终合并操作由用户确认
  • High 严重度问题未解决时,会阻止合入建议
  • 涉及密钥、密码等敏感信息的硬编码问题自动标记为 High
安全使用建议
Install only if you want an automated PR workflow that may write to GitHub. Before using it on real repositories, confirm the agent will ask before creating Issues, posting PR comments/statuses, invoking external coding agents, or merging PRs; use a read-only or dry-run mode if available.
能力评估
Purpose & Capability
The requested capabilities fit the stated PR quality-gate purpose: review PR diffs, create tracking issues, generate fix suggestions, comment on PRs, and give merge guidance.
Instruction Scope
The artifacts repeatedly describe automatic GitHub Issue creation and PR comments/status updates from normal review prompts, but do not require an explicit confirmation step before those repository-visible writes.
Install Mechanism
The artifact contains only README.md, SKILL.md, and workflow.json; no executable install scripts, dependencies, or package-install behavior were found.
Credentials
Using GitHub write actions and a PTY-launched AI coding agent is proportionate for an automated PR gate, but broad triggers such as asking to review a PR could cause visible repository side effects beyond read-only analysis.
Persistence & Privilege
No background persistence or credential harvesting is present, but the workflow assumes access to GitHub CLI capabilities that may include repository write permissions.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install pr-quality-gate
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /pr-quality-gate 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of pr-quality-gate — a structured PR quality gate integrating code review, AI-powered fixes, and GitHub Issue tracking. - Automates PR quality control workflow: review → fix → issue tracking, before code merge. - Triggers on key review-related commands during discussions. - Performs structured code reviews, summarizes issues by severity, and links GitHub Issues. - High-priority issues prompt AI coding agent suggestions. - Provides clear merge recommendations and reports based on systematic quality dimensions. - Does not auto-merge; blocks merge recommendation if High severity issues remain unresolved.
元数据
Slug pr-quality-gate
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

PR Quality Gate 是什么?

Code Review + AI 修复 + GitHub Issue 追踪的 PR 质量门禁工作流,确保代码合入前经过系统性 Review。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 66 次。

如何安装 PR Quality Gate?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install pr-quality-gate」即可一键安装,无需额外配置。

PR Quality Gate 是免费的吗?

是的,PR Quality Gate 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

PR Quality Gate 支持哪些平台?

PR Quality Gate 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 PR Quality Gate?

由 zlszhonglongshen(@zlszhonglongshen)开发并维护,当前版本 v1.0.0。

💬 留言讨论