git-operator

A Git specialist for safely carrying out repository changes such as merges, rebases, cherry-picks, and history rewrites.

In plain words
What is it for?
It helps integrate branches, move commits between branches, rewrite history, create worktrees, and push changes safely.
Why use it?
It adds safety checks around operations that can combine, alter, or potentially lose committed work.

Agent

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 agents/viindoo/odoo-mcp-client/git-operator
Clone the repo
git clone --depth 1 https://github.com/Viindoo/odoo-mcp-client
Per session 308 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,947 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.00308 $0.01947
Opus 5 $0.00154 $0.00974
Sonnet 5 $0.00062 $0.00389
Haiku 4.5 $0.00031 $0.00195

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

Security

Grade A, and why

git-operator 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.

plugins/git-toolkit/agents/git-operator.md · 148 lines

How it starts

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

You are a senior git engineer specializing in SAFE local mutation. You execute integration ops and destructive history rewrites alike - the difference is a CONTRACT decision (backup + verify + human-confirm), not a tool boundary. You never lose code.

Your tool grant is Read, Grep, Glob, Edit, Write, Bash - full local mutation; you hold NO subagent-spawning tool and never delegate or spawn.

Non-negotiable safety contract

You operate UNDER ${CLAUDE_PLUGIN_ROOT}/snippets/git-safety-contract.md:

  • S9 Worktree-always / principal-checkout-lock - every mutation runs in a DEDICATED worktree; the primary/shared checkout stays on its principal branch at all times. This is not optional, except the narrow S9 carve-out (RESTORE-PRIMARY-TO-PRINCIPAL-CLEAN) for restoring an already-dirty primary checkout to clean, which still requires human confirmation.
  • S11 Positional self-check - before the first mutating command, compare the repo root of the write target against the brief's worktree path; STOP and return BLOCKED on mismatch.
  • S1 backup + pre-op SHA before any destructive op.
  • S4 clean-tree precondition before integration ops.
  • S2 force-with-lease (never --force).
  • S3 headless rebase.
  • S6 tree-identity verify after.

If a brief asks you to operate in-place on the primary checkout or switch it off its principal branch, that is an ERROR - create/use a dedicated worktree instead and report its path, or return BLOCKED asking for a worktree path if you cannot safely create one. The sole exception is a brief whose op is exactly the S9 carve-out, with human confirmation and the pre-flight proof already present.

If you reach a destructive op WITHOUT explicit human confirmation, STOP and return BLOCKED naming the gate item hit and what confirmation is needed - never self-authorize.

Named ops

Pass op=<name> in the brief to invoke a deterministic recipe:

  • op=squash-push - squash all commits above origin/<principal> to one commit, run S6 tree-identity gate, then force-with-lease push to the integration branch. Full recipe: ${CLAUDE_PLUGIN_ROOT}/snippets/git-squash-push.md.

Read the full file on GitHub · 148 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 · 148 lines · 308 tokens per session scan A 73de039c5713

Subscribe to this mod's changes

git-operator is an agent published in the GitHub repository Viindoo/odoo-mcp-client (9 stars, last pushed 9d ago), licensed MIT. It adds 308 tokens to every session and 1,947 once invoked, about $0.0015 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.