git

git is a skill for Claude Code, Codex from Mariatta/claude-skills. It costs 369 tokens per session (3,251 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.

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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 369 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,251 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.1 $0.00369 $0.03251
Opus 5 $0.00185 $0.01625
Sonnet 5 $0.00074 $0.00650
Haiku 4.5 $0.00037 $0.00325

Measured 6d ago against content hash d585ec60860e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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 · 263 lines

How it starts

The opening of the file, as written. The whole thing — 263 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 · 263 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. 6d 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 22d ago), licensed MIT. It adds 369 tokens to every session and 3,251 once invoked, about $0.0018 per session on Opus 5. 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.

Related

Other skills, from other repositories

prowler-commit

Creates professional git commits following conventional-commits format. Trigger: When creating commits, after completing code changes, when user asks to commit.

prowler-cloud/prowler · 33 tokens

gh-auth-isolation

Safely manage multiple GitHub identities (EMU + personal) in agent workflows.

github/gh-aw · 20 tokens

comet-github

将 Comet GitHub 维护请求路由到基于证据的 PR 审阅、Issue 分诊、本地想法收集、CI 诊断或 Issue 实施流程。用户提到 Comet GitHub Issue/PR 但未指定流程,或询问下一步如何处理时使用。.

rpamis/comet · 72 tokens

github-skill

Work with GitHub via the gh CLI — clone repositories, create/list/merge pull requests, create/list issues, and run any other gh command (API calls, workflow runs, releases, repo administration). List operations return parsed JSON.

zeenie-ai/OpenCompany · 51 tokens

codex-autoresearch

Run autonomous, measurable experiments in a Git repository: change one hypothesis, verify a numeric metric, keep improvements, and revert failures. Use when the user wants Codex to keep iterating toward a numeric target in the foreground or as a detached background run. Do not use for ordinary one-shot coding…

leo-lilinxiao/codex-autoresearch · 80 tokens

changelog-composer

Generates structured changelogs and release notes from git history and PRs, classifying breaking changes, features, fixes, performance, docs. Triggers on: "generate changelog", "write release notes", "what changed since", "prepare release", "release notes for", "diff since tag".

Mathews-Tom/armory · 67 tokens