Borrowing it
Nothing to install: this file belongs to watt-mind/coach. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/watt-mind/coach/master/.gemini/commands/github/merge-pr.tomlgit clone --depth 1 https://github.com/watt-mind/coachWrote 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.
[](https://agentmods.dev/commands/watt-mind/coach/merge-pr)<a href="https://agentmods.dev/commands/watt-mind/coach/merge-pr"><img src="https://agentmods.dev/badge/commands/watt-mind/coach/merge-pr.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00868 |
| Opus 5 | $0.00000 | $0.00434 |
| Sonnet 5 | $0.00000 | $0.00174 |
| Haiku 4.5 | $0.00000 | $0.00087 |
Grade A, and why
merge-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.
What it actually says
description = "Merges a GitHub Pull Request locally or remotely, ensuring non-interactive execution and inline commit messages." prompt = """ Your goal is to help the user merge a GitHub Pull Request (PR) into their current local branch or the remote repository.
User input: {{args}}
Workflow
-
Ensure Clean State (CRITICAL):
- Run
git status --porcelainto check for uncommitted changes. - If there are local changes, STOP and ask the user if they want to commit them before proceeding with the merge.
- If the user agrees, run
git add . && git commit -m "chore: save local changes before merging PR"(or ask for a specific message). - DO NOT attempt to merge if the working directory is not clean, as this can lead to data loss or conflict complexities.
- Run
-
Identify the Pull Request:
- Parse
{{args}}to find a PR number or URL. - If no PR is specified, list open PRs using
search_pull_requests(filtered bystate:open) orgh pr list --json number,title,author -L 10to help the user choose.
- Parse
-
Analyze Context, Comments & Linked Issues (CRITICAL):
- Fetch PR Details: Use
pull_request_read(method='get') to get the PR details (branch name, author, description). - Identify Linked Issues: Parse the PR description and comments for issue references (e.g.,
#123,fixes #123). If none are found, usegithub__search_issueswith keywords from the PR title to find potentially related issues. - Read Comments: Use
gh pr view <pr_number> --commentsorpull_request_read(method='get_comments'). - Analyze: Specifically look for "suggestions", "requirements", or "feedback" that might block the merge.
- Report: Briefly summarize the PR, list any identified issues, and report any crucial feedback found in the comments before merging. Confirm with the user if the identified issues should be linked/closed.
- Fetch PR Details: Use
-
Fetch and Merge (Non-Interactive):
- Local Merge (Preferred for Testing):
- Fetch the PR branch:
git fetch origin pull/<pr_number>/head:pr-<pr_number>. - Merge the branch using the
--no-editflag and a message that references the linked issues (e.g.,Merge PR #86; Closes #120):git merge pr-<pr_number> -m "Merge pull request #<pr_number> from <head_ref>. Closes <linked_issues>" --no-edit.
- Fetch the PR branch:
- Remote Merge (GitHub CLI):
- If the user wants to merge directly on GitHub:
gh pr merge <pr_number> --merge --subject "Merge pull request #<pr_number>" --body "Merged via Gemini CLI. Closes <linked_issues>"(Always specify--merge,--squash, or--rebaseand a subject to ensure non-interactive execution).
- If the user wants to merge directly on GitHub:
- Handle Conflicts: If
git mergereports conflicts, stop immediately. Do not attempt to resolve them automatically unless specifically directed.
- Local Merge (Preferred for Testing):
-
Post-Merge Verification & Issue Closing:
- Run
git statusandgit log -n 1to confirm the successful merge. - Close Linked Issues: For any identified issues that aren't automatically closed by GitHub (e.g., if keywords were missing), use
issue_write(method='update', state='closed') to close them manually after the merge is confirmed. - Inform the user of the merge result and which issues were closed.
- Run
-
Completion:
- Ask the user if they want to:
- Run verification scripts (lint/test).
- Push the local changes if merged locally (
git push). - Delete the temporary local PR branch (
git branch -D pr-<pr_number>). """
- Ask the user if they want to:
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.
- 2d ago First seen · 48 lines · 0 tokens per session scan A e0dbecb19a37
merge-pr is a command published in the GitHub repository watt-mind/coach (83 stars, last pushed 5d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 868 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-09-04.
Other commands, from other repositories
commit-push-pr
Commit, push, and open a PR (includes changeset creation).
commit
Based on the above changes, create a single git commit.
git
The pre-finish status: branch, hygiene findings, message checks, workflow lint, template state.
commit
A command that examines staged Git changes and proposes a commit message using the Conventional Commits format, such as feat, fix, or docs. Git is a tool for tracking changes to code.
commit-claude-config
Version the Solana AI Kit config in git (un-ignores .claude/, CLAUDE.md, .mcp.json, .gitmodules and commits them).
session-report
Capture what changed this session and why, scoped to the current branch. Read by ship verbs when synthesizing the commit message; deleted after a successful commit.