commit-push-pr

A command that reviews local changes, commits them to Git, pushes them to a remote repository, and opens a GitHub pull request.

In plain words
What is it for?
Use it to package finished changes for review, including creating a branch when needed and setting its remote tracking.
Why use it?
It groups the repetitive release steps needed after coding and provides a consistent commit and pull-request structure.

Command

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/bacchus-labs/wrangler/commit-push-pr
Clone the repo
git clone --depth 1 https://github.com/bacchus-labs/wrangler
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 551 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.00012 $0.00551
Opus 5 $0.00006 $0.00275
Sonnet 5 $0.00002 $0.00110
Haiku 4.5 $0.00001 $0.00055

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

Security

Grade A, and why

commit-push-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.

commands/commit-push-pr.md · 70 lines

What it actually says

Context

  • Current git status: !git status
  • Current git diff (staged and unstaged changes): !git diff HEAD
  • Current branch: !git branch --show-current
  • Recent commits: !git log --oneline -10
  • Remote tracking: !git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo "No upstream branch"

Your task

Based on the above context, complete the following workflow:

1. Stage and Commit

  • Review the changes shown in the diff
  • Stage all relevant changes (use git add -A or selectively add files)
  • Create a clear, descriptive commit message that:
    • Summarizes the "why" not just the "what"
    • Uses conventional commit format if the project uses it
    • Is concise (1-2 sentences)
  • End the commit message with: Co-Authored-By: Claude Opus 4.5 <[email protected]>

2. Push to Remote

  • If on main/master branch, create a new feature branch first
  • Push the branch to origin with -u flag to set upstream tracking
  • If the branch already exists on remote, just push

3. Create Pull Request

Create a PR using gh pr create with the following structure:

gh pr create --title "Brief descriptive title" --body "$(cat <<'EOF'
## Summary

<2-4 bullet points describing what changed and why>

## Changes

<List the key files/components modified>

## Test Plan

<How to verify these changes work - manual steps or test commands>

---
Generated with Claude Code
EOF
)"

4. Return the PR Link

After creating the PR, output the PR URL so the user can access it directly.

If the PR already exists for this branch, use gh pr view --web to open it instead.

Important Notes

  • Never force push to main/master
  • Never commit files that contain secrets (.env, credentials, API keys)
  • If there are no changes to commit, inform the user and skip the workflow
  • If commit fails due to pre-commit hooks, fix issues and retry
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 · 70 lines · 12 tokens per session scan A b578f6928db0

Subscribe to this mod's changes

commit-push-pr is a command published in the GitHub repository bacchus-labs/wrangler (4 stars, last pushed 6mo ago), licensed MIT. It adds 12 tokens to every session and 551 once invoked, about $0.0001 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.