DeepSeek Harness 插件

zsxh1990/pr-genius

Star 数 ★ 3 分类 Git 与代码评审 收录于 2026-08-16

PR 评估和改进顾问:基于历史反模式和成功模式评估 PR 成功率,一键评分并提供可操作的改进建议。

安装

# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)

dsh plugin --profile web add github:zsxh1990/pr-genius

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。

README


type: Knowledge Bundle title: PR Genius — 提交前改进顾问 description: 大型开源项目 PR 知识库 + 提交前改进顾问,Agent 可读结构化数据 version: 1.3.0 created: 2026-07-01 updated: 2026-07-22 author: zsxh1990

PR Genius — 知道什么 PR 会被关的顾问

550+ 真实案例,帮你找到合并概率最大的提 PR 路径。

English | 中文


🛡️ 为什么用 pr-genius

pr-genius 不是"会写 PR 的 AI",而是"知道什么 PR 会被关的顾问"。

能力 大模型直接提 PR 爬虫 Agent pr-genius
知识来源 训练数据 实时爬取 550+ 结构化 case studies
仓库理解 通用知识 stars/issues 17 字段 agent_guidelines
失败模式 不知道 不知道 68 anti-patterns
维护者偏好 猜 看最近 PR 结构化 policy
合并概率 无法估算 无法估算 基于仓库合并率

真实教训(只有被关过才知道):

  • MisakaNet 不接受"破坏性 README 重写"(#491, #496)
  • huggingface 要"内部处理"tokenizers 版本(#47434)
  • encode/httpx 不接受外部贡献者(restricted interactions)
  • Glama badge 是 awesome-mcp-servers 的必须项(#10393)

🚀 Quick Start

pip install prgenius-core

# 分析 PR
python3 -m prgenius analyze "feat: add feature" --repo org/repo --body "Fixes #123"

# Coach (pass/fail)
python3 -m prgenius coach "feat: add feature" --repo org/repo

# Triage (policy check)
python3 -m prgenius triage "docs: typo" --repo org/repo --diff-stat "docs/faq.md | 3 ++-"

🤖 MCP 配置

{
  "mcpServers": {
    "pr-genius": {
      "command": "python",
      "args": ["-m", "prgenius", "mcp", "serve"]
    }
  }
}

8 个 MCP Tools

Tool 用途
analyze_pr 合并概率 + 优化路径 + 三档风险
coach_pr go/no-go 决策(pass/fail)
triage_pr 维护者政策检查(9 条规则)
get_repo_profile 仓库画像(17 字段)
list_open_prs open PR 列表
get_case_study PR 案例详情
search_patterns 反模式/成功模式搜索
schema_info OKF schema 版本

📊 数据规模

维度 数量
Repo profiles 58
Case studies 50+
Anti-patterns 68
Coach accuracy 87% (257 cases)
已覆盖仓库 35+

📖 Contributing

See CONTRIBUTING.md

引用

@misc{pr-genius-2026,
  title  = {PR Genius — Evidence-backed PR Contribution Advisor},
  author = {zsxh1990},
  year   = {2026},
  url    = {https://github.com/zsxh1990/pr-genius}
}

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →

社区评论

评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。