git

A Git task handler that applies naming rules to branches and commits. Git is a system for tracking code changes, while a branch is a separate line of work in a repository.

In plain words
What is it for?
Use it to create or manage branches, prepare commits, inspect changes, and stage only relevant files. It can also direct richer work to existing pull-request commands.
Why use it?
It prevents branch names and commit messages from violating the repository’s required format. It checks the repository state before carrying out Git operations.

Command for Claude Code

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/fmflurry/settings-opencode/git
Clone the repo
git clone --depth 1 https://github.com/fmflurry/settings-opencode

Made for: Claude Code.

Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 561 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.00010 $0.00561
Opus 5 $0.00005 $0.00280
Sonnet 5 $0.00002 $0.00112
Haiku 4.5 $0.00001 $0.00056

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

Security

Grade A, and why

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.

.claude/commands/git.md · 63 lines

How it starts

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

Git Command

Handle this git task: $ARGUMENTS

CC has no dedicated git-specialist agent. The primary agent handles git directly. For richer flows, prefer the existing /prp-commit, /prp-pr, or /create-pull-request commands.

Requirements

  1. Enforce the commit format exactly:
<type>(<scope>): <short summary>

[optional body]

[optional footer(s)]

If scope is not useful or not clear, this form is also valid:

<type>: <short summary>

Allowed types: feat, fix, docs, style, refactor, test, chore

  1. Enforce the branch naming format exactly:
<type>/<scope>-<short-description>

scope is required for branches. If it is ambiguous, ask one short question via AskUserQuestion before creating the branch. scope must be a single lowercase token with letters and numbers only. The first - after / separates scope from short-description.

  1. Workflow:
  • inspect repository state first (git status, git diff, git log --oneline -5)
  • use a compliant branch name for branch operations
  • use a compliant conventional commit message for commit operations
  • stage only relevant changes (avoid git add -A / git add .)
  • never commit files that may contain secrets (.env, *credentials*, *.key, *.pem)
  • avoid destructive commands unless explicitly requested
  • for pull request tasks: detect host from git remote get-url origin — use gh for GitHub, az repos pr for Azure DevOps (dev.azure.com / visualstudio.com). Stop if unknown. Return the PR URL.
  • Azure DevOps PR defaults: reviewers = PIXELS, no --draft. Title must follow conventional commit format.
  • use the repository default branch as PR base when available, otherwise prefer main, then master
  • return an existing PR URL instead of creating a duplicate PR for the same branch
  • never use --no-verify or skip hooks unless the user explicitly asks
  • never amend or force-push without explicit user authorization

Output

  • Branch: created, current, or proposed branch name
  • Commit: created or proposed commit message
  • Push: yes or no
  • PR: URL when a pull request exists or was created, otherwise n/a
  • Notes: any ambiguity, blocker, or excluded changes

Read the full file on GitHub · 63 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 · 63 lines · 10 tokens per session scan A a685c8294451

Subscribe to this mod's changes

git is a command published in the GitHub repository fmflurry/settings-opencode (172 stars, last pushed 19d ago), licensed MIT. It adds 10 tokens to every session and 561 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-30.