gh-pr

gh-pr is a command for Claude Code from synaptiai/synapti-marketplace. It costs 0 tokens per session (1,027 once invoked), scanned A, original, Apache-2.0.

A command that prepares a GitHub pull request by checking the branch and changes, reviewing the code, and running quality checks.

In plain words
What is it for?
Use it to review a branch against main, inspect linked issue details, classify findings by priority, and decide whether critical problems should be fixed first.
Why use it?
It catches correctness, security, type-safety, and cleanup issues before the pull request is submitted.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: names the AskUserQuestion tool.

Good fit Use it to review a branch against main, inspect linked issue details, classify findings by priority, and decide whether critical problems should be fixed first.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/synaptiai/synapti-marketplace/gh-pr
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/synaptiai/synapti-marketplace

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gh-pr

README.md
[![agentmods](https://agentmods.dev/badge/commands/synaptiai/synapti-marketplace/gh-pr/github.svg)](https://agentmods.dev/commands/synaptiai/synapti-marketplace/gh-pr)
Your own site
<a href="https://agentmods.dev/commands/synaptiai/synapti-marketplace/gh-pr"><img src="https://agentmods.dev/badge/commands/synaptiai/synapti-marketplace/gh-pr/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gh-pr

Your own site · 80×15
<a href="https://agentmods.dev/commands/synaptiai/synapti-marketplace/gh-pr"><img src="https://agentmods.dev/badge/commands/synaptiai/synapti-marketplace/gh-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,027 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01027
Opus 5 $0.00000 $0.00513
Sonnet 5 $0.00000 $0.00205
Haiku 4.5 $0.00000 $0.00103

Measured 10d ago against content hash 4bc30f95551f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

gh-pr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/gh-pr.md · 155 lines

How it starts

The opening of the file, as written. The whole thing — 155 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Create Pull Request

Create a pull request with full code review, quality gates, and reviewer suggestions.

Tool Usage: This workflow uses the AskUserQuestion tool for interactive decisions.

Phase 1: Pre-flight

  1. Verify current branch:

    BRANCH=$(git branch --show-current)
    # Ensure not on main
    
  2. Check for uncommitted changes:

    git status --porcelain
    

    If changes exist, use AskUserQuestion:

    • Option 1: "Run /gh-commit first" (Recommended)
    • Option 2: "Continue without committing"
  3. Extract issue from branch:

    ISSUE_NUM=$(echo $BRANCH | grep -oE 'issue-[0-9]+' | grep -oE '[0-9]+')
    gh issue view $ISSUE_NUM --json title,body
    

Phase 2: Code Review

Run systematic code review on the diff:

git diff main..HEAD

Review Checklist:

  • Logic correctness and edge cases
  • Security (no hardcoded secrets)
  • No TODO/FIXME comments
  • No debug statements (console.log)
  • Type safety

Categorize findings:

  • P1 (Critical): Blocks PR
  • P2 (Important): Should fix
  • P3 (Suggestions): Nice to have

If P1 issues found, use AskUserQuestion:

  • Option 1: "Fix issues now" (Recommended)
  • Option 2: "Proceed anyway"

Phase 3: Quality Checks

# Run plugin validation
ls plugins/*/.claude-plugin/plugin.json
cat plugins/*/.claude-plugin/plugin.json

Phase 4: Reviewer Suggestion

  1. Get collaborators:

    REPO=$(gh repo view --json nameWithOwner --jq '.nameWithOwner')
    gh api repos/$REPO/collaborators --jq '.[] | select(.permissions.push) | .login'
    
  2. Get file contributors:

    CHANGED_FILES=$(git diff --name-only main..HEAD)
    git log --format='%an' --since="30 days ago" -- $CHANGED_FILES | sort | uniq -c | sort -rn
    
  3. Present suggestions with AskUserQuestion:

    • Option 1: "@{top_contributor}" (Recommended)
    • Option 2: "@{other_contributor}"
    • Option 3: "No reviewer"

Read the full file on GitHub · 155 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 155 lines · 0 tokens per session scan A 4bc30f95551f

Subscribe to this mod's changes

gh-pr is a command published in the GitHub repository synaptiai/synapti-marketplace (6 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,027 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.