commit-push-pr

commit-push-pr is a command for Claude Code from elixpo/claudeOps.elixpo. It costs 0 tokens per session (770 once invoked), scanned A, original, MIT.

A command guide for committing code, pushing a branch to GitHub, and opening a pull request. A pull request is a proposal to review and merge changes into a shared code branch.

In plain words
What is it for?
Use it after making code changes that need a safe branch, code checks, a commit, a push, and a pull request.
Why use it?
It reduces mistakes such as committing directly to the main branch or opening duplicate pull requests. It also includes formatting and verification steps.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/elixpo/claudeops.elixpo/commit-push-pr.svg)](https://agentmods.dev/commands/elixpo/claudeops.elixpo/commit-push-pr)
Your own site
<a href="https://agentmods.dev/commands/elixpo/claudeops.elixpo/commit-push-pr"><img src="https://agentmods.dev/badge/commands/elixpo/claudeops.elixpo/commit-push-pr.svg" alt="Measured on agentmods" 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 770 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.00000 $0.00770
Opus 5 $0.00000 $0.00385
Sonnet 5 $0.00000 $0.00154
Haiku 4.5 $0.00000 $0.00077

Measured 4d ago against content hash ca58ce5e049f, 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 4d 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 · 85 lines

How it starts

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

Commit, push, and open a PR. Branch rules prevent accidents on main or duplicate PRs.

Step 1 — Detect branch state

git branch --show-current

If on main

  • NEVER commit to main. Create a new branch first.
  • For agent runs: BRANCH="elixpo/issue-$ISSUE_N-$(openssl rand -hex 2)"
  • For human work: feat/<slug> or fix/<slug>
  • git checkout -b "$BRANCH", continue to Step 2.

If on a feature branch

Check whether this branch already has an open PR:

gh pr list --head "$(git branch --show-current)" --state open --json number,url --jq '.[0]'
  • Open PR exists → push to this branch (Step 2). Do NOT open another PR.
  • No open PR → check for a merged one:
    gh pr list --head "$(git branch --show-current)" --state merged --json number --jq '.[0].number'
    
    • Merged → branch is stale. Cut a fresh branch from main:
      git checkout main && git pull && git checkout -b elixpo/issue-$ISSUE_N-$(openssl rand -hex 2)
      
      Re-apply the change there.
    • Never had a PR → push and open a new one (Step 3).

Step 2 — Biome, commit, push

  1. ./biome.sh — apply fixes.
  2. ./biome.sh ci — must exit 0. If it fails, read the output, fix the errors by hand, re-run.
  3. git status + git diff --stat — sanity-check what's staged.
  4. git add specific files — avoid .env*, .wrangler/, anything under tsconfig.tsbuildinfo.
  5. Commit with conventional format:
    feat: <concrete summary> (#<issue-n>)
    fix: <concrete summary> (#<issue-n>)
    
  6. git push -u origin HEAD (first push) or git push (subsequent).

Step 3 — Open PR (only if no open PR already)

gh pr create --base main --head "$(git branch --show-current)" \
  --title "[ELIXPO] <short>" \
  --body "$(cat <<'EOF'
## What this does
<2-4 sentences, user-visible outcome>

## Why
<1-2 sentences referencing the trigger or issue>

## Changes
- `<file>`: <what changed and why>
- <3-6 bullets; concrete, not vague>

## Verification
- `./biome.sh ci` clean
- <tests pass / dev-server verified / not verified — pick one>

---
Fixes #<issue-n>
EOF
)"

Read the full file on GitHub · 85 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. 4d ago First seen · 85 lines · 0 tokens per session scan A ca58ce5e049f

Subscribe to this mod's changes

commit-push-pr is a command published in the GitHub repository elixpo/claudeOps.elixpo (2 stars, last pushed 24d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 770 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.