Skip to main content
Glama

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


Related MCP server: devflow-mcp

🎯 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.

Capability

gh CLI

PR 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.

Capability

LLM directly

Scraper Agent

PR Genius

Knowledge source

Training data

Real-time scrape

1355 structured patterns

Repo understanding

Generic

Surface data (stars)

17-field agent_guidelines

Failure patterns

Unknown

Unknown

752 anti-patterns

Success patterns

Unknown

Unknown

703 success patterns

Maintainer preference

Guess

Recent PRs

Structured policy files

Merge probability

Can't estimate

Can't estimate

Based on repo merge rate + signals

Real cases (PR Genius helped avoid these rejections):

PR

Repo

What happened

PR Genius would have flagged

#491

MisakaNet

"Destructive README rewrite" — closed

breaking_change_no_compat anti-pattern

#47434

huggingface/transformers

"We'll handle internally" — closed

maintainer_internal_handling anti-pattern

#10393

awesome-mcp-servers

Missing Glama badge — auto-flagged

awesome-mcp-servers-glama-badge-required anti-pattern

#282

punkpeye/fastmcp

+271 lines, first PR — closed without review

fastmcp-282-too-large anti-pattern

#2902

soxoj/maigret

CI failure (tag dev not recognized) — fixed, merged

maigret-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]

permissions:
  contents: read
  issues: write   # required when comment_mode != never (post/update PR comment)

jobs:
  pr-genius:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: zsxh1990/pr-genius/.github/actions/pr-genius-check@v1
        id: pr-genius
        with:
          title: ${{ github.event.pull_request.title }}
          repo: ${{ github.repository }}
          body: ${{ github.event.pull_request.body }}
          pr_number: ${{ github.event.pull_request.number }}
          comment_mode: always   # never | high_risk | always — post full analysis as a PR comment

comment_mode controls whether the full analysis is posted as a visible PR comment (mirrors pr-agent's /review):

  • never — do not post (default when unset and comment_on_high_risk is false)

  • high_risk — post only when the risk tier is high_risk

  • always — post on every run; existing comments are updated in place (no spam)

Legacy: comment_on_high_risk: true is still supported and behaves like comment_mode: high_risk.

Version Auto-Update

  • @v1 — Always points to the latest v1.x.x release (recommended)

  • @v1.7.1 — Pinned to specific version (for reproducibility)

  • @main — Latest development version (not recommended for production)

The v1 tag is automatically updated when a new version is published to PyPI.

Docker Image (Alternative)

Use PR Genius as a Docker container via GitHub Container Registry:

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

permissions:
  contents: read
  pull-requests: write

jobs:
  pr-genius:
    runs-on: ubuntu-latest
    steps:
      - name: Run PR Genius
        uses: docker://ghcr.io/zsxh1990/pr-genius:latest
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          args: coach "${{ github.event.pull_request.title }}" --repo ${{ github.repository }} --format json

Docker Image Tags:

  • ghcr.io/zsxh1990/pr-genius:latest — Latest release

  • ghcr.io/zsxh1990/pr-genius:1.7.2 — Specific version

  • ghcr.io/zsxh1990/pr-genius:1.7 — Minor version

  • ghcr.io/zsxh1990/pr-genius:1 — Major version (auto-updated)

Auto-update with Dependabot:

# .github/dependabot.yml
version: 2
updates:
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "weekly"
  - package-ecosystem: "docker"
    directory: "/"
    schedule:
      interval: "weekly"

🤖 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

Tool

Purpose

Required Args

analyze_pr

Merge probability + optimization path + 3-tier risk

title, repo

coach_pr

Go/no-go decision (pass/fail)

title, repo

triage_pr

Maintainer policy check (9 rules)

title, repo

get_repo_profile

Repo profile (17 fields)

repo

list_open_prs

Open PR list

repo

get_case_study

PR case study details

case_id

search_patterns

Anti-pattern/success-pattern search

query

schema_info

OKF 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

Dimension

Count

Repo profiles

61

Case studies

50+

Success patterns

687 (431 .md + 256 .json)

Anti-patterns

668 (561 .md + 107 .json)

Total patterns

1355 (all loaded)

Quality pass rate

100% (994/994 markdown ≥75分)

Covered repos

35+ (react, kubernetes, rust, uv, pydantic, etc.)

按仓库规模分布

规模

Success

Anti

总计

大仓 (>10k ⭐)

208

205

413

中仓 (1k-10k ⭐)

169

88

257

小仓 (<1k ⭐)

169

88

257

通用

203

414

617

其他 (特定仓库)

312

260

572

🤖 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}
}

Available Tools

3 tools
get_case_studyA
Read-onlyIdempotent

Get a specific PR case study with full details and rounds.

Returns the complete case study including frontmatter, body text, and round-by-round interaction history. Useful for learning from past PR experiences.

Args: repo: Repository in org/name format pr_number: PR number (integer)

Returns: dict with frontmatter, body, path, or error if not found

ParametersJSON Schema
NameRequiredDescriptionDefault
repoYes
pr_numberYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate read-only and idempotent behavior. The description adds details about the return structure (frontmatter, body, path) and error handling, which are beyond the annotations and schema. It is sufficient for a simple retrieval tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, with a one-sentence purpose, a brief context statement, and clearly separated Args/Returns sections. Every sentence adds value, and the structure is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 2 simple parameters and no output schema, the description covers the core functionality and return format. It mentions error handling ('or error if not found'). An example would be nice but is not essential given the simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no descriptions (0% coverage), so the description compensates by explaining 'repo: Repository in org/name format' and 'pr_number: PR number (integer)'. This adds meaningful guidance beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves a specific PR case study with full details and rounds, distinguishing it from sibling tools like list_open_prs (which lists PRs) and search_patterns (which searches patterns). The verb 'get' and resource 'case study' are specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description indicates it is useful for learning from past PR experiences, providing context for when to use. While it lacks explicit when-not-to-use or alternative tools, the purpose is clear enough to differentiate from siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_open_prsA
Read-onlyIdempotent

List all open PR case studies in the knowledge base.

Returns PRs with final_status=open, useful for tracking ongoing contributions and their current state.

Returns: list of {repo, pr_number, pr_url, folder} for each open PR

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, so the description adds only the output format (list of objects with repo, pr_number, etc.). No additional behavioral traits beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, with two short paragraphs. The main purpose is front-loaded, and the return format is clearly listed. No unnecessary sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no parameters, explicit annotations, and simple output, the description is complete. It specifies the output fields and purpose sufficiently.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist, and schema coverage is 100%. The description does not need to add parameter info. Baseline score of 4 for zero parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states what the tool does: lists all open PR case studies. It specifies the filtering condition (final_status=open) and the output fields. It is distinct from siblings (get_case_study, search_patterns) by focusing on listing open PRs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions it is useful for tracking ongoing contributions, but does not explicitly state when not to use it or provide alternatives. Usage is implied rather than explicitly guided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_patternsA
Read-onlyIdempotent

Search anti-patterns and success-patterns by keyword.

Use this to find relevant patterns before submitting a PR. Anti-patterns show what NOT to do, success-patterns show what works.

Args: query: Search keyword (e.g. "duplicate PR", "missing tests", "out of scope", "breaking change") pattern_type: Filter type — "all" (default), "anti-pattern", or "success-pattern" limit: Max results to return (default 10)

Returns: list of dicts with keys: key, title, symptom, fix_action, source_pr, type, file

Example: search_patterns("duplicate PR") → finds anti-patterns about duplicate submissions search_patterns("timeout", "anti-pattern") → finds timeout-related failure patterns

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
pattern_typeNoall

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readOnlyHint=true, idempotentHint=true, destructiveHint=false, so the safety profile is clear. The description adds behavioral context (search, filter, return format) but doesn't introduce new traits beyond what annotations imply.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with sections for purpose, usage, args, returns, and examples. It is efficient, though slightly verbose with the example lines; still, every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description explains the return format (list of dicts with specific keys) and provides examples. The tool's complexity is low, and the description is adequate for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema coverage, the description fully explains each parameter with examples: query (with keyword examples), pattern_type (options: all, anti-pattern, success-pattern), limit (default 10). This adds significant meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Search anti-patterns and success-patterns by keyword,' providing a specific verb and resource. It distinguishes itself from sibling tools like list_open_prs and get_case_study by focusing on patterns.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'Use this to find relevant patterns before submitting a PR,' giving clear context of when to use. It also clarifies the two types of patterns but doesn't explicitly state when not to use, though the context is sufficient.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv1.3.0
    • Removedget_repo_profile
    • Removedschema_info
  2. 8 tool updatesv1.3.1
    • Removedanalyze_pr
    • Removedcoach_pr
    • Addedget_case_study
    • Addedget_repo_profile
    • Addedlist_open_prs
    • Addedschema_info
    • Addedsearch_patterns
    • Removedtriage_pr
  3. 3 tool updatesv0.1.0
    • First observedanalyze_pr
    • First observedcoach_pr
    • First observedtriage_pr

TDQS

A4.3/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: listing open PRs, fetching a case study by repo and number, and searching patterns by keyword. There is no overlap or ambiguity.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case: list_open_prs, get_case_study, search_patterns. No deviations or mixed conventions.

Tool Count5/5

With only 3 tools, the set is well-scoped for a read-only PR case study and pattern knowledge base. Each tool serves a necessary function without redundancy.

Completeness3/5

The tools cover listing open PRs, retrieving details, and searching patterns, but lack the ability to list all case studies (including closed ones) or browse patterns comprehensively without a keyword. Minor gaps exist.

Maintenance

ActivityActive
ResponsivenessResponsive

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zsxh1990/pr-genius'

If you have feedback or need assistance with the MCP directory API, please join our Discord server