git-usage

A set of rules for using Git, a tool that records code changes and manages versions, through the QBAgent tool in the McpServer repository.

In plain words
What is it for?
Inspecting status, differences, history, and branches; staging and committing files; switching branches; resetting changes; and pushing committed work when asked.
Why use it?
It helps an agent tell safe, read-only actions from changes that affect files or remote repositories. It also prevents pushing code unless explicitly requested and keeps required commit details.

Skill for Claude CodeCodex

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 skills/sharpninja/mcpserver/git-usage
Any agent
npx skills add sharpninja/McpServer --skill git-usage
Clone the repo
git clone --depth 1 https://github.com/sharpninja/McpServer

Made for: Claude Code, Codex.

Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,646 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.00050 $0.01646
Opus 5 $0.00025 $0.00823
Sonnet 5 $0.00010 $0.00329
Haiku 4.5 $0.00005 $0.00165

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

Security

Grade A, and why

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

skills/git-usage/SKILL.md · 93 lines

How it starts

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

Git Usage (QBAgent git tool)

Guidance for driving the QBAgent git tool safely inside the McpServer repository. The tool exposes a fixed set of subcommands. This skill defines which are read-only, which mutate the working tree, and which touch a remote, plus project-specific safety rules that override default git habits.

When to Use

  • You are about to inspect repository state (status, diff, log, branch).
  • You are staging, committing, switching branches, or resetting work via the QBAgent git tool.
  • You need to push committed work and want to do it correctly (opt-in push).
  • You are unsure whether an action is read-only or destructive.

When Not to Use

  • You only need MCP TODO or session-log operations: use the MCP Server plugin/workflow methods, not git.
  • You want to bypass the QBAgent git tool with raw shell git for a destructive action. Prefer the tool's subcommands so the action is auditable.

Inputs

  • subcommand: one of status, diff, log, branch, add, commit, checkout, push, reset.
  • Subcommand arguments, for example: paths for add, a message for commit, a branch name for checkout/branch, a ref or mode for reset, a remote/branch for push.
  • The active workspace repository (the McpServer working tree). Use absolute paths when a path is required.

Subcommand Reference

Read-only (safe to run any time to gather context):

  • status: show the working-tree and staged state. Run this first before any mutation.
  • diff: show unstaged or staged changes. Use to confirm exactly what will be committed.
  • log: show recent commit history. Use to verify the base commit and recent messages.
  • branch: list branches or show the current branch.

Working-tree mutations (local only, no network):

  • add: stage specific paths. Prefer explicit paths over staging everything so unrelated changes are not swept in.
  • commit: create a new commit from staged changes. Always supply a message ending with the Co-Authored-By trailer (see Critical Rules). Prefer a new commit over amending an existing one.
  • checkout: switch branches or restore paths. Switching branches with uncommitted changes can move or block work; check status first. Restoring a path discards local edits, so confirm intent.
  • reset: move HEAD or unstage. reset (mixed/soft) is recoverable; a hard reset discards uncommitted work and is destructive. Treat any hard reset as a last resort and confirm before running it.

Read the full file on GitHub · 93 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 · 93 lines · 50 tokens per session scan A 7acec2144da3

Subscribe to this mod's changes

git-usage is a skill published in the GitHub repository sharpninja/McpServer (2 stars, last pushed 11d ago), licensed Apache-2.0. It adds 50 tokens to every session and 1,646 once invoked, about $0.0003 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.