zsxh1990 / pr-genius

Listed

PR Genius — 提交前改进顾问 + 大型开源项目 PR 知识库

mainOther View source

Installation

npx -y @deepseek-ai/dsh plugin --profile web add github:zsxh1990/pr-genius

This installation command is an unverified starting point generated from the GitHub repository address.

README

Maintainer-authored documentation snapshot.

View on GitHub ↗
Commit addc111Synced Aug 18, 2026

type: Knowledge Bundle title: PR Genius — Pre-submission PR Advisor description: Evidence-backed PR contribution advisor for large open-source projects version: 1.4.0 created: 2026-07-01 updated: 2026-07-22 author: zsxh1990 conforms_to: OKF v0.1 (Sudhakaran88/okf-conformance) + agent_guidelines extension

mcp-name: io.github.zsxh1990/pr-genius

PR Genius — The advisor that knows which PRs get closed

1355 loaded patterns across 61 repos. 100% quality pass rate. Clone → paste MCP config → ask "Should I open this PR to encode/httpx?"

CI PyPI Python License Glama score DSH Plugin


🎯 What is PR Genius?

PR Genius is not a PR dashboard. It's an Outbound PR CRM for professional OSS contributors and AI agents:

Manage PRs you've submitted to other repos — when to fix CI, rebase, wait, ping, or abandon.

Capabilitygh CLIPR Genius
Cross-repo PR list
Status classification✅ (9 states)
Stale detection
Action suggestions
Repo-specific policy
Snapshot & transitions

Status heartbeat runs daily via cron, auto-detecting:

  • 🔴 NEEDS_REBASE / CI_FAILING — fix immediately
  • 🟡 STALE_REVIEW — ping after threshold
  • 🟡 STALE_NO_REVIEW — consider abandoning
  • 🟢 CLEAN / WAITING — continue waiting

🛡️ Why PR Genius?

PR Genius doesn't write PRs for you. It knows which PRs get closed.

CapabilityLLM directlyScraper AgentPR Genius
Knowledge sourceTraining dataReal-time scrape1355 structured patterns
Repo understandingGenericSurface data (stars)17-field agent_guidelines
Failure patternsUnknownUnknown752 anti-patterns
Success patternsUnknownUnknown703 success patterns
Maintainer preferenceGuessRecent PRsStructured policy files
Merge probabilityCan't estimateCan't estimateBased on repo merge rate + signals

Real cases (PR Genius helped avoid these rejections):

PRRepoWhat happenedPR Genius would have flagged
#491MisakaNet"Destructive README rewrite" — closedbreaking_change_no_compat anti-pattern
#47434huggingface/transformers"We'll handle internally" — closedmaintainer_internal_handling anti-pattern
#10393awesome-mcp-serversMissing Glama badge — auto-flaggedawesome-mcp-servers-glama-badge-required anti-pattern
#282punkpeye/fastmcp+271 lines, first PR — closed without reviewfastmcp-282-too-large anti-pattern
#2902soxoj/maigretCI failure (tag dev not recognized) — fixed, mergedmaigret-tag-validation pattern

🚀 Quick Start

pip install prgenius-core

# Analyze 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 ++-"

# Status heartbeat (outbound PR monitoring)
python3 -m prgenius status --author zsxh1990
python3 -m prgenius status --author zsxh1990 --format json --save-snapshot

# Profile writeback suggestions (dry-run)
python3 -m prgenius profile writeback --author zsxh1990

🤖 GitHub Action

Use PR Genius as a GitHub Action in any repo:

# .github/workflows/pr-genius.yml
name: PR Genius Check
on:
  pull_request:
    types: [opened, synchronize]

jobs:
  pr-genius:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: zsxh1990/pr-genius/.github/actions/pr-genius-check@main
        id: pr-genius
        with:
          title: ${{ github.event.pull_request.title }}
          repo: ${{ github.repository }}
          body: ${{ github.event.pull_request.body }}
      - name: Comment on PR
        if: always()
        uses: actions/github-script@v7
        with:
          script: |
            const tier = '${{ steps.pr-genius.outputs.tier }}';
            const emoji = tier === 'high_risk' ? '🔴' : tier === 'medium_risk' ? '🟡' : '🟢';
            await github.rest.issues.createComment({
              owner: context.repo.owner,
              repo: context.repo.repo,
              issue_number: context.issue.number,
              body: `## ${emoji} PR Genius: ${tier}`
            });

🤖 MCP Configuration

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

Docker: docker run --rm -i ghcr.io/zsxh1990/pr-genius:1.3.0

8 MCP Tools

ToolPurposeRequired Args
analyze_prMerge probability + optimization path + 3-tier risktitle, repo
coach_prGo/no-go decision (pass/fail)title, repo
triage_prMaintainer policy check (9 rules)title, repo
get_repo_profileRepo profile (17 fields)repo
list_open_prsOpen PR listrepo
get_case_studyPR case study detailscase_id
search_patternsAnti-pattern/success-pattern searchquery
schema_infoOKF schema versions(none)

Tool Parameter Notes

  • title (required for analyze_pr, coach_pr, triage_pr): The PR title, e.g. "fix: timeout in connection pool"
  • repo (required for most tools): Repository in owner/name format, e.g. "encode/httpx"
  • pr_description (optional): Additional PR body text for deeper analysis
  • query (required for search_patterns): Search keywords, e.g. "connection timeout"

📊 Data Scale

DimensionCount
Repo profiles61
Case studies50+
Success patterns687 (431 .md + 256 .json)
Anti-patterns668 (561 .md + 107 .json)
Total patterns1355 (all loaded)
Quality pass rate100% (994/994 markdown ≥75分)
Covered repos35+ (react, kubernetes, rust, uv, pydantic, etc.)

按仓库规模分布

规模SuccessAnti总计
大仓 (>10k ⭐)208205413
中仓 (1k-10k ⭐)16988257
小仓 (<1k ⭐)16988257
通用203414617
其他 (特定仓库)312260572

🤖 Robots / Agents

  1. docs/index.md — file map
  2. AGENT_GUIDELINES_SCHEMA.md — agent_guidelines schema
  3. ROUNDS_SCHEMA.md — rounds schema
  4. BLACKLIST.md — repos we don't track

📖 Contributing

See CONTRIBUTING.md. AI-assisted PRs welcome.

🤝 Community

中文文档

中文版 README:README.zh-CN.md

Citation

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

Project files and signals

Shown items are public repository signals detected in the directory snapshot.

TestsDetected
Security policyDetected
Contributing guideDetected
DocumentationDetected
ExamplesDetected

Repository information

Language
Python
License
MIT
Latest release
v1.6.3
Last updated
Aug 18, 2026, 9:41 AM

Install deliberately

Review source code, permissions, lifecycle hooks, dependencies and network access. Test untrusted plugins in an isolated environment.