push

A Git workflow command that commits selected changes, pushes them to the remote repository, and records progress on the related pull request or issue.

In plain words
What is it for?
Use it to finish a batch of work, create a repository-style commit message, push a branch, and post a progress comment.
Why use it?
It reduces the chance of committing the wrong files or exposing secrets, while keeping the code review record up to date.

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/leanandmean/mach10/push
Clone the repo
git clone --depth 1 https://github.com/LeanAndMean/mach10
Per session 15 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,592 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.00015 $0.01592
Opus 5 $0.00008 $0.00796
Sonnet 5 $0.00003 $0.00318
Haiku 4.5 $0.00002 $0.00159

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

Security

Grade A, and why

push 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/push.md · 132 lines

How it starts

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

Push

You are finalizing a batch of work: committing changes, pushing to remote, and documenting progress on the associated PR or issue.

Step 1: Determine What to Commit

Run git status and git diff --staged to understand the current state.

Staging logic:

  • If you have context from this session about which files you modified, stage those specific files. Do NOT use git add -A or git add . — add files by name.
  • If files are already staged and the staging looks correct based on session context, proceed with those.
  • If it is unclear what should be staged (e.g., this is a fresh session with no prior context), review all untracked and unstaged files, present your findings to the user, and ask for guidance on what to stage.
  • Never stage files that likely contain secrets (.env, credentials.json, etc.).

Step 2: Commit

Review recent commit messages for style consistency:

git log --oneline -10

Generate a commit message that:

  • Follows the repository's existing commit message style
  • Summarizes the nature of the changes (new feature, bug fix, refactor, etc.)
  • Focuses on the "why" rather than the "what"
  • If context was provided ($ARGUMENTS): if it reads like a commit message, use it verbatim; otherwise, treat it as guidance for commit message generation. Context may also inform the progress comment (Step 4) and next-step suggestions (Step 5).

Create the commit. Use a HEREDOC for the message to ensure proper formatting:

git commit -m "$(cat <<'EOF'
Commit message here.

Co-Authored-By: Claude <[email protected]>
EOF
)"

Step 3: Push

Push to the remote tracking branch:

git push

If no upstream is set, push with -u flag to the current branch name.

Step 4: Post Progress Comment

Determine the associated PR or issue using the following priority order:

1. Session context (primary)

Check the current conversation for signals about what the user has been working on. If an earlier command in this session targeted a specific issue or PR, use that as the comment target.

Read the full file on GitHub · 132 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 · 132 lines · 15 tokens per session scan A 75cb3c698543

Subscribe to this mod's changes

push is a command published in the GitHub repository LeanAndMean/mach10 (20 stars, last pushed 3mo ago), licensed MIT. It adds 15 tokens to every session and 1,592 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-30.