ctx:git-commit

A command that checks changed files, stages selected changes, creates a Git commit, and pushes it to a remote branch.

In plain words
What is it for?
Use it to commit all changes or chosen files with a conventional commit message and push them to the current or specified branch and remote.
Why use it?
It removes the need to repeat the same status checks and Git commands by hand. A Git commit is a saved set of project changes, while a remote is the shared copy of the repository.

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/shakestzd/contextune/ctx-git-commit
Clone the repo
git clone --depth 1 https://github.com/shakestzd/contextune
Per session 20 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,963 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.00020 $0.01963
Opus 5 $0.00010 $0.00981
Sonnet 5 $0.00004 $0.00393
Haiku 4.5 $0.00002 $0.00196

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

Security

Grade A, and why

ctx:git-commit 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 yesterday.

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/ctx-git-commit.md · 314 lines

How it starts

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

Git Commit - Deterministic Commit and Push Workflow

You are executing a deterministic git commit and push workflow.

Cost: ~$0.002 (545 tokens) vs ~$0.037-0.086 (8K-25K tokens) for multi-tool approach Savings: 93-97% token reduction


Workflow

Step 1: Determine What to Commit

Check git status to understand what files changed:

git status --short

Analyze the output:

  • M = Modified files
  • A = Added files
  • D = Deleted files
  • ?? = Untracked files

Step 2: Stage and Commit

Use the plugin's commit script (works from any project):

"${CLAUDE_PLUGIN_ROOT}/scripts/commit_and_push.sh" "<files>" "<message>" "<branch>" "<remote>"

Note: ${CLAUDE_PLUGIN_ROOT} is automatically set by Claude Code to the plugin's installation directory (e.g., ~/.claude/plugins/contextune@Contextune/). This ensures the script is always accessible regardless of which project you're working in.

Parameters:

  • <files> - Files to commit (use . for all changes, or specific files)
  • <message> - Commit message (follows conventional commits format)
  • <branch> - Branch name (auto-detected from current branch, optional)
  • <remote> - Remote name (auto-detected if not specified, optional)

Example 1: Commit all changes

"${CLAUDE_PLUGIN_ROOT}/scripts/commit_and_push.sh" "." "feat: add new feature

Detailed description of changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

Example 2: Commit specific files

"${CLAUDE_PLUGIN_ROOT}/scripts/commit_and_push.sh" "src/feature.ts tests/feature.test.ts" "feat: implement feature X"

Example 3: Specify branch and remote

"${CLAUDE_PLUGIN_ROOT}/scripts/commit_and_push.sh" "." "fix: resolve bug" "develop" "origin"

Commit Message Format

Follow conventional commits:

<type>: <description>

[optional body]

[optional footer]

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

Read the full file on GitHub · 314 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. yesterday First seen · 314 lines · 20 tokens per session scan A d5661f77f454

Subscribe to this mod's changes

ctx:git-commit is a command published in the GitHub repository shakestzd/contextune (5 stars, last pushed 8mo ago), licensed MIT. It adds 20 tokens to every session and 1,963 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.