gitcm

A Git command that checks, stages, and commits all current changes using a structured commit message saved in a file.

In plain words
What is it for?
Use it when you want to create one local commit after the project's build and tests pass. It does not push changes to a remote repository.
Why use it?
It reduces missed verification steps and helps prevent committing broken code or accidentally including obvious secrets and temporary files.

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/blendsdk/claude-codeops/gitcm
Clone the repo
git clone --depth 1 https://github.com/blendsdk/claude-codeops
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 761 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.00034 $0.00761
Opus 5 $0.00017 $0.00380
Sonnet 5 $0.00007 $0.00152
Haiku 4.5 $0.00003 $0.00076

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

Security

Grade A, and why

gitcm 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/gitcm.md · 64 lines

How it starts

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

gitcm — commit with a detailed message

Stage all changes and create one well-formed commit. Do not push.

Current state

  • Status: !git status --short
  • Staged/unstaged diff stat: !git diff HEAD --stat

Steps

  1. Clean-tree guard. If git status --short prints nothing, report "nothing to commit" and stop — do not run verify or stage.
  2. Verify first. Run the project's verify command (build + test) as defined in the project's CLAUDE.md (or detected conventions). Only continue if it passes. If it fails, stop and report — do not commit broken code. If the project has no verify command, say so and continue.
  3. Stage deliberately. Glance at the untracked files in the status first — anything that looks like secrets, scratch files, or build output gets flagged to the user before staging. Then git add . — noting it is CWD-relative: in a monorepo subdirectory it stages only the subtree; run it from the intended root.
  4. Write the commit message to a file, never inline. Compose a Conventional Commit message and write it to .git/COMMIT_EDITMSG_codeops (or a temp file) with the Write tool, then commit with git commit -F <file>. Never use git commit -m — inline messages break on quotes, parentheses, $, backticks, and multi-line bodies.
  5. Pre-commit hooks. If a hook modifies files during the commit, re-stage the modified files and retry ONCE; if the hook fails, show its output and ask — never pass --no-verify without the user's explicit approval.
  6. Clean up the temp message file after a successful commit.
  7. Report the resulting commit (git log -1 --stat).

If the user passed $ARGUMENTS, use it as a hint for the scope or emphasis.

Commit message format (Conventional Commits)

<type>(<scope>): brief description in the imperative

- Specific change 1
- Specific change 2
- Tests added/updated
- Verification: passing

Types: feat, fix, refactor, test, docs, chore.

Read the full file on GitHub · 64 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 · 64 lines · 34 tokens per session scan A 40a54bd09ec2

Subscribe to this mod's changes

gitcm is a command published in the GitHub repository blendsdk/claude-codeops (4 stars, last pushed 1mo ago), licensed MIT. It adds 34 tokens to every session and 761 once invoked, about $0.0002 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.