use-git

use-git is a skill for Claude Code, Codex from cboone/agent-harness-plugins. It costs 107 tokens per session (946 once invoked), scanned A, original, MIT.

A set of conventions for using Git and the GitHub command-line tool safely and consistently.

In plain words
What is it for?
Use it for Git and GitHub workflows such as commits, pull requests, issue creation, reviews, merges, rebases, and releases.
Why use it?
It reduces mistakes when committing, pushing, merging, rebasing, or creating pull requests, especially with long text and potentially destructive commands.

Skill for Claude CodeCodex

Part of the use-git plugin — 1 skill shipped together

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/cboone/agent-harness-plugins/use-git
Any agent
npx skills add cboone/agent-harness-plugins --skill use-git
Clone the repo
git clone --depth 1 https://github.com/cboone/agent-harness-plugins

Made for: Claude Code, Codex.

Or install use-git, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for use-git

README.md
[![agentmods](https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/use-git.svg)](https://agentmods.dev/skills/cboone/agent-harness-plugins/use-git)
Your own site
<a href="https://agentmods.dev/skills/cboone/agent-harness-plugins/use-git"><img src="https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/use-git.svg" alt="Measured on agentmods" height="20"></a>
Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 946 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.00107 $0.00946
Opus 5 $0.00053 $0.00473
Sonnet 5 $0.00021 $0.00189
Haiku 4.5 $0.00011 $0.00095

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

Security

Grade A, and why

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

plugins/use-git/skills/use-git/SKILL.md · 61 lines

How it starts

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

Use Git

Conventions for running git and GitHub CLI (gh) commands in Claude Code. These rules keep Bash commands short, avoid unnecessary permission prompts, and prevent destructive operations.

Core Principles

  1. Tmpfiles for long content: Write long strings (PR bodies, issue bodies, review replies) to a tmpfile via the Write tool, then pass --body-file. Keeps Bash commands short and avoids permission prompts.
  2. HEREDOCs for short content: Commit messages use $(cat << 'EOF' ... EOF). Single-quoted 'EOF' prevents variable expansion.
  3. GPG sign every commit: Always git commit -S. The sandbox cannot access GPG keys, so resort immediately to the unsandboxed command.
  4. Never amend: Always create new commits. Pre-commit hook failures mean the commit did not happen, so --amend would modify the wrong commit.
  5. Never use force or override flags: Never use git push --force, git push -f, --no-verify, or similar override flags without explicit user instruction. If the user explicitly requests a force push, use git push --force-with-lease (add --force-if-includes when the installed Git version supports it, v2.30+). Investigate root causes rather than forcing through.
  6. Parallel tool calls over chained commands: Use separate Bash tool calls for independent commands instead of chaining with ; or &&, which trigger permission prompts.
  7. Exclude secret files from staging: Never stage .env, credentials.json, *.pem, *.key, or similar secret files.
  8. Use clean diff output: Always pass --no-ext-diff --no-color (and --no-pager before the subcommand) on diff-producing commands (git diff, git log -p, git show). User configs may route diffs through external tools like difftastic, producing output that is harder to parse. These flags ensure standard unified diff format.

Quick Decision Table

Scenario Pattern Reason
Commit messages HEREDOC Short, predictable length
PR bodies (gh pr create) Tmpfile + --body-file Can be long; HEREDOC triggers prompts
Issue bodies (gh issue create) Tmpfile + --body-file Can be long
Review replies Tmpfile + --body-file Variable length
Worktree prompts Write tool to /tmp/ Avoids shell escaping
Tag messages Inline -m Typically one line

Read the full file on GitHub · 61 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 61 lines · 107 tokens per session scan A c10b59ecfc44

Subscribe to this mod's changes

use-git is a skill published in the GitHub repository cboone/agent-harness-plugins (2 stars, last pushed 1mo ago), licensed MIT. It adds 107 tokens to every session and 946 once invoked, about $0.0005 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-09-03.