commit-push-pr

A command that commits changes to Git, uploads the branch, and creates a pull request for review.

In plain words
What is it for?
Use it to prepare a feature, fix, chore, or refactor branch for review, including staging changes and writing a commit message.
Why use it?
It provides a branch-aware release routine and checks that required changes are committed before opening the request.

Command for Claude Code

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/sefaertunc/worclaude/commit-push-pr
Clone the repo
git clone --depth 1 https://github.com/sefaertunc/Worclaude

Made for: Claude Code.

Per session 13 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,246 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.00013 $0.01246
Opus 5 $0.00006 $0.00623
Sonnet 5 $0.00003 $0.00249
Haiku 4.5 $0.00001 $0.00125

Measured 2d ago against content hash b61e3cf81c93, 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.

.claude/commands/commit-push-pr.md · 119 lines

How it starts

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

Determine which branch you're on, then follow the appropriate flow. Do not add Co-Authored-By trailers or AI-generated footers to commits or PR descriptions.

Invocation Contract

Run this command only when the human explicitly invokes it (typed /commit-push-pr or one of the Trigger Phrases at the bottom of this file). Do not auto-launch from a "we're done" inference. The Version bump: AskUserQuestion at step 6 is mandatory and never auto-answerable — refuse to proceed without an explicit human selection. See CLAUDE.md Critical Rule 13.

Worktree Awareness

If you are in a git worktree session:

  • Verify you are on the correct branch: git branch --show-current
  • All changes must be committed before creating a PR — git status --porcelain should be empty after staging
  • Do NOT attempt to switch branches inside a worktree — each worktree is locked to its branch

On a feature branch (feature/, fix/, chore/, refactor/)

Feature branches contain ONLY the task changes. Do NOT touch shared-state files (see git-conventions.md for the canonical list).

  1. Stage all changes: git add -A
  2. Write a clear, conventional commit message and create the commit.
  3. Capture the new HEAD SHA: git rev-parse HEAD — this is the value to embed in the session summary's sha: line so the next /start can compute drift accurately (git log <sha>..HEAD).
  4. Write a session summary to .claude/sessions/:
    • Filename: YYYY-MM-DD-HHMM-{short-branch-name}.md
    • Content format:
      # Session: {date}
      sha: {full HEAD SHA captured in step 3}
      **Branch:** {current branch}
      **Task:** {one-line summary of what was worked on}
      
      ## Completed
      - {what was done, 3-5 bullet points}
      
      ## Files Modified
      - {list key files changed, from git diff --name-only}
      
      ## Notes for Next Session
      - {anything the next session should know}
      
      ## Workflow Observability
      - **Agents invoked:** {ALL agents used this session — explicit @agent calls AND agents invoked implicitly by commands like /verify, /review-plan, /refactor-clean. Write "none" if no agents were used.}
      - **Commands used:** {all slash commands run earlier in this session, e.g. /start, /verify, /refactor-clean. Do NOT include the current /commit-push-pr or /end that is writing this summary. Write "none" if no other commands were used.}
      - **Verification result:** {if /verify was run: passed/failed with brief summary; otherwise "not run".}
      
    • The sha: line MUST be its own line starting with sha: (case- sensitive, no leading whitespace, no markdown formatting around it). /start parses it with grep -oP '^sha:\s*\K[a-f0-9]+'.
    • Keep it concise — this is for machine consumption at session start, not a detailed report.
    • The .claude/sessions/ directory is gitignored; do not stage it.
  5. Push to the current branch.
  6. Required: prompt for Version bump: declaration via AskUserQuestion. Use AskUserQuestion with these four options and one-line descriptions:

Read the full file on GitHub · 119 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 · 119 lines · 13 tokens per session scan A b61e3cf81c93

Subscribe to this mod's changes

commit-push-pr is a command published in the GitHub repository sefaertunc/Worclaude (4 stars, last pushed 23d ago), licensed MIT. It adds 13 tokens to every session and 1,246 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.