git

git is a skill for Claude Code, Codex from Mariatta/claude-skills. It costs 0 tokens per session (3,952 once invoked), scanned C, original, MIT.

A set of working practices for Git, the system used to track code changes, and code-forge services such as GitHub. It covers repository settings, branch protection, merging, and related workflows independently of the project’s programming language.

In plain words
What is it for?
Creating repositories, deciding visibility, configuring merge and branch rules, using squash merges, and applying consistent Git and forge workflows.
Why use it?
It helps teams choose repository settings early and avoid assuming that features such as private-repository branch protection are available on their plan. It also keeps general Git practices separate from application-specific instructions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is git worktree add ../myrepo-review origin/main # existing ref, detached.

Good fit Creating repositories, deciding visibility, configuring merge and branch rules, using squash merges, and applying consistent Git and forge workflows.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Mariatta/claude-skills
agentmods
npx agentmods add skills/mariatta/claude-skills/git

Made for: Claude Code, Codex.

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 git

README.md
[![agentmods](https://agentmods.dev/badge/skills/mariatta/claude-skills/git/github.svg)](https://agentmods.dev/skills/mariatta/claude-skills/git)
Your own site
<a href="https://agentmods.dev/skills/mariatta/claude-skills/git"><img src="https://agentmods.dev/badge/skills/mariatta/claude-skills/git/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for git

Your own site · 80×15
<a href="https://agentmods.dev/skills/mariatta/claude-skills/git"><img src="https://agentmods.dev/badge/skills/mariatta/claude-skills/git.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,952 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.03952
Opus 5.5 $0.00000 $0.01581
Sonnet 5.5 $0.00000 $0.00790
Haiku 4.5 $0.00000 $0.00395

Measured 1mo ago against content hash 71136f62b273, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

git scanned grade C with 1 finding 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 1mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

git worktree remove ../myrepo-hotfix # not rm -rf
skills/git/SKILL.md · 312 lines

How it starts

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

Working with git

Practices for driving git and the forge around it. Nothing here is about what a repository contains; that belongs to the language or framework skill for the project. What belongs here is the part that goes wrong the same way in every repository regardless of what it holds.

This skill is meant to grow. Each practice below is self-contained. Add new ones under ## Practices, and when one has real detail behind it, give it a file under references/ and link it from here.

Practices

Starting a repository

Principle. A repository gets its settings on the day it is created, not the day someone is annoyed enough to fix them. Every one of them is a default that decides how the rest of these practices behave.

Ask private or public before anything else. It is not only a visibility flag: on GitHub Free, rulesets and branch protection are not available on private repositories, and both endpoints answer 403 Upgrade to GitHub Pro or make this repository public to enable this feature. Squash merges and branch deletion work either way; the required check is what the answer decides. Never leave the impression main is gated when the plan does not allow it.

The order matters, and it is this:

  1. First commit, .gitignore before the first git add. Retrofitting it means what you were keeping out is already in history. See the practice below.
  2. Create the remote at the visibility you were told.
  3. Squash only, and delete the branch on merge.
  4. A ruleset requiring the CI check, last, because the check has to exist first.
git init -b main                       # .gitignore, README, LICENSE, ci.yml, commit
gh repo create OWNER/REPO --private --source=. --remote=origin --push   # or --public

gh api -X PATCH repos/OWNER/REPO \
  -F allow_squash_merge=true -F allow_merge_commit=false \
  -F allow_rebase_merge=false -F delete_branch_on_merge=true

Use -F, not -f: -f sends the string "false", which is truthy, and the setting stays on while the command reports success.

Read the full file on GitHub · 312 lines

Files

What ships with it

4 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. 1mo ago Changed · +49 lines 71136f62b273
  2. 2mo ago First seen · 263 lines · 0 tokens per session scan C d585ec60860e

Subscribe to this mod's changes

git is a skill published in the GitHub repository Mariatta/claude-skills (2 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,952 tokens. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.