pro-git

pro-git is a skill for Claude Code from michalstrnadel/source-to-skill. It costs 122 tokens per session (2,416 once invoked), scanned A, original, MIT.

A practical guide to Git, the version-control system that records changes to files and supports branches and collaboration. It explains commits, the working area, staging, merging, rebasing, and Git's internal model.

In plain words
What is it for?
Use it when explaining Git basics, choosing merge or rebase, undoing changes safely, inspecting history, or coordinating work across branches.
Why use it?
It replaces memorized commands with an understanding of what Git stores and why common operations behave differently.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the source-to-skill plugin — 13 skills shipped together

Good fit Use it when explaining Git basics, choosing merge or rebase, undoing changes safely, inspecting history, or coordinating work across branches.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/michalstrnadel/source-to-skill/pro-git
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.

Any agent
npx skills add michalstrnadel/source-to-skill --skill pro-git
Clone the repo
git clone --depth 1 https://github.com/michalstrnadel/source-to-skill

Made for: Claude Code.

Or install source-to-skill, the plugin that ships this one along with the rest of its 13 skills.

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 pro-git

README.md
[![agentmods](https://agentmods.dev/badge/skills/michalstrnadel/source-to-skill/pro-git/github.svg)](https://agentmods.dev/skills/michalstrnadel/source-to-skill/pro-git)
Your own site
<a href="https://agentmods.dev/skills/michalstrnadel/source-to-skill/pro-git"><img src="https://agentmods.dev/badge/skills/michalstrnadel/source-to-skill/pro-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 pro-git

Your own site · 80×15
<a href="https://agentmods.dev/skills/michalstrnadel/source-to-skill/pro-git"><img src="https://agentmods.dev/badge/skills/michalstrnadel/source-to-skill/pro-git.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 122 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,416 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00122 $0.02416
Opus 5.5 $0.00049 $0.00966
Sonnet 5.5 $0.00024 $0.00483
Haiku 4.5 $0.00012 $0.00242

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

Security

Grade A, and why

pro-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 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.

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.

examples/pro-git/SKILL.md · 73 lines

How it starts

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

Pro Git

Derived from Pro Git, 2nd edition, by Scott Chacon and Ben Straub, licensed CC BY-NC-SA 3.0 (https://creativecommons.org/licenses/by-nc-sa/3.0). This distillation carries the same license.

The book covers the CLI from first principles. Chapters 1–3 teach the model, 4–6 cover collaboration, 7–8 cover power tools and customization, 9 covers other VCSs and 10 covers internals. Load a chapter file when a question needs its detail. The models below answer most "why does Git do that?" questions.

Core mental models

  1. Snapshots, not deltas. Each commit records the full state of the project. Unchanged files are stored as references to the copy Git already has. Bringing a CVS/SVN "list of file changes" mental model into Git is the root of most confusion. → Ch1
  2. Nearly everything is local, and content is checksummed. The full history lives in your clone, so log, diff and commit work offline. Everything is addressed by SHA-1, so silent corruption is detectable. Git mostly adds data: anything committed is very hard to lose. Uncommitted work has no such protection.
  3. Three states and three trees. A file is modified (working tree), staged (index) or committed (Git directory/HEAD). git add stages the content as it is at that moment. Edit the file again and it is both staged and unstaged. git diff compares working tree with index; git diff --staged compares index with last commit. → Ch2
  4. A branch is a 41-byte file holding a commit SHA-1; HEAD points to the current branch. Branching is nearly free, and committing moves the current branch forward. A fast-forward merge just moves a pointer. A diverged merge is a three-way merge (two tips plus their common ancestor) and makes a commit with multiple parents. → Ch3
  5. Remote-tracking branches are bookmarks. origin/master records where the remote was at your last fetch, and only network operations move it. fetch only downloads. pull = fetch + merge (or rebase). A push is refused when someone pushed first, because Git never merges on the server.
  6. Merge vs rebase gives the same snapshot and a different story. Rebase replays commits to make linear history and creates new commits. The rule: rebase local work before pushing, and never rebase commits others may have built on. → Ch3, Ch5
  7. reset is three steps. (1) Move the branch HEAD points to: --soft stops here. (2) Make the index match: the default --mixed stops here. (3) Make the working tree match: only --hard, the one form that can destroy uncommitted work. With a path, step 1 is skipped. checkout/switch moves HEAD itself, while reset moves the branch under it. → Ch7
  8. Rewriting changes SHA-1s. Amend, rebase -i, filter-branch and reset rewrite the target commit and every commit after it. For shared history use git revert (-m 1 for a merge) instead.
  9. Git is a content-addressable store. Blobs hold file contents with no names. Trees map names to blobs and subtrees. Commits point to a tree, parents and author info. Tags point to objects. Refs are files naming SHA-1s. Objects start loose and get delta-compressed into packfiles. Anything reachable stays in every clone, so removing a big file means rewriting history. → Ch10
  10. Hooks are local convenience; server hooks are policy. Client hooks are not cloned and --no-verify bypasses them. Enforce rules in pre-receive/update on the server. → Ch8

Read the full file on GitHub · 73 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. 1mo ago First seen · 73 lines · 122 tokens per session scan A 4c65d79ba181

Subscribe to this mod's changes

pro-git is a skill published in the GitHub repository michalstrnadel/source-to-skill (8 stars, last pushed 11d ago), licensed MIT. It adds 122 tokens to every session and 2,416 once invoked, about $0.0005 per session on Opus 5.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-10-05.

Related

pro-git compared with skills from other repositories

pro-git next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pro-gitmichalstrnadel/source-to-skillSkill811d agoMITA122Claude Code
setup-husky-dotnetSebastienDegodez/copilot-instructionsSkill1991mo agoApache-2.0A30Claude Code, Codex
generate-commit-messageanchildress1/awesome-github-copilotSkill661mo agoMITA158Claude Code
git-commitfabioc-aloha/Alex_Skill_MallSkill5yesterdayMITA70Claude Code, Codex
pr-fallbackulises-jeremias/agent-toolkitSkill19todayMITA55Claude Code
commityuri-semenenko/ai-engineering-workspaceSkill43d agoMITA94Claude Code
git-workflow-and-versioningGuillemRoca/agent-skills-androidSkill51mo agoMITA77Claude Code