github-pr

A command for taking completed local changes through Git and GitHub’s pull-request review process.

In plain words
What is it for?
Preparing feature or bug-fix changes for review, including branch creation, staging, Conventional Commit messages, pushing, and pull-request management.
Why use it?
It organizes the steps needed to create or update a branch, commit and push changes, and open a pull request for review.

Command for Gemini CLI

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.

agentmods
npx agentmods add commands/mfmezger/ai_agent_dotfiles/github-pr
Clone the repo
git clone --depth 1 https://github.com/mfmezger/ai_agent_dotfiles

Made for: Gemini CLI.

Per session 62 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,063 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00062 $0.01063
Opus 5 $0.00031 $0.00531
Sonnet 5 $0.00012 $0.00213
Haiku 4.5 $0.00006 $0.00106

Measured 2d ago against content hash 618aeaf16d46, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

github-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 2d 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.

gemini/.gemini/commands/github-pr.md · 89 lines

How it starts

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

GitHub Workflow

This command guides the process of moving local changes to a GitHub Pull Request.

Prerequisites

  • git must be installed and configured.
  • gh (GitHub CLI) must be installed and authenticated.

Commit Message Format

Use Conventional Commits with this required format: <type>(<scope>): <summary>

  • type REQUIRED. Common values: feat, fix, docs, refactor, chore, test, perf, ci, build, style.
  • scope REQUIRED. Short noun for the changed area (for example: config, api, ui, docs).
  • summary REQUIRED. Imperative, <= 72 chars, no trailing period.

Rules:

  • Never add AI attribution anywhere in the GitHub workflow. Do not write Generated by ..., Co-authored-by: Claude, Co-authored-by: Opus, Co-authored-by: Sonnet, or any other AI/model/agent attribution.
  • This ban applies to commit subjects, commit bodies, commit footers, PR titles, PR bodies, and PR comments. Do not add it even if a default template, tool, model habit, or previous workflow suggests it.
  • Do not add sign-offs or breaking-change footers unless the user requests them.

Workflow Steps

Follow this order exactly: confirm branch state, stage, commit, push, then handle the PR.

  1. Branch Check / Creation

    • Check the current branch before doing anything else.
    • If already on a suitable non-default working branch, stay on it.
    • If on a default branch such as main or master, create a feature branch first.
    • Identify the scope of changes (e.g., feat, fix, docs, chore).
    • Propose a branch name following the pattern <type>/<kebab-case-description>.
    • Execute when a new branch is needed: git checkout -b <branch-name>
  2. Review & Stage Changes

    • Review changes with git status and git diff.
    • By default, stage only the files that belong to the current requested change.
    • If the user provided file paths/globs, stage only those files.
    • If there are ambiguous extra changed files, ask before staging/committing and leave them unstaged unless the user explicitly includes them.
    • Stage the intended files with git add ....
    • Optionally inspect recent subjects for local scope patterns: git log -n 10 --pretty=format:%s.

Read the full file on GitHub · 89 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. 2d ago First seen · 89 lines · 0 tokens per session scan A 618aeaf16d46

Subscribe to this mod's changes

github-pr is a command published in the GitHub repository mfmezger/ai_agent_dotfiles (5 stars, last pushed 1mo ago), licensed MIT. It adds 62 tokens to every session and 1,063 once invoked, about $0.0003 per session on Opus 5. 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.