git-essentials

git-essentials is a skill for Claude Code from asgarovf/locusai. It costs 34 tokens per session (681 once invoked), scanned A, original, MIT.

Git workflow guidance for managing branches, combining changes, cleaning up project history, and recovering from mistakes. Git is a tool that records code changes and lets developers work on separate versions of a project.

In plain words
What is it for?
Creating branches, resolving merge conflicts, rebasing, cherry-picking commits, investigating history, and recovering from resets or other mistakes.
Why use it?
It helps avoid losing work or accidentally combining incompatible changes. It also makes conflicts and past changes easier to understand and fix.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Creating branches, resolving merge conflicts, rebasing, cherry-picking commits, investigating history, and recovering from resets or other mistakes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/asgarovf/locusai/git-essentials
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 asgarovf/locusai --skill git-essentials
Clone the repo
git clone --depth 1 https://github.com/asgarovf/locusai

Made for: Claude Code.

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-essentials

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/asgarovf/locusai/git-essentials"><img src="https://agentmods.dev/badge/skills/asgarovf/locusai/git-essentials.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 681 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.00034 $0.00681
Opus 5.5 $0.00014 $0.00272
Sonnet 5.5 $0.00007 $0.00136
Haiku 4.5 $0.00003 $0.00068

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

Security

Grade A, and why

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

skills/git-essentials/SKILL.md · 115 lines

How it starts

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

Git Essentials

When to use this skill

  • Creating and managing branches
  • Resolving merge conflicts
  • Rebasing and cleaning up history
  • Cherry-picking commits
  • Investigating history with git log/blame/bisect
  • Recovering from mistakes (reset, revert, reflog)

Branching Strategy

Branch naming

feat/<issue>-<short-description>
fix/<issue>-<short-description>
chore/<short-description>
release/<version>
hotfix/<issue>-<description>

Common workflows

# Create feature branch from main
git checkout main && git pull
git checkout -b feat/123-add-auth

# Keep branch up to date with main
git fetch origin
git rebase origin/main

# Squash commits before merge
git rebase -i origin/main
# Mark commits as 'squash' or 'fixup'

Conflict Resolution

Strategy

  1. Understand both sides of the conflict
  2. Determine which changes to keep (or merge both)
  3. Test after resolution
  4. Never blindly accept "ours" or "theirs"
# See which files conflict
git status

# Use merge tool
git mergetool

# After resolving manually
git add <resolved-files>
git rebase --continue   # or git merge --continue

History Investigation

# Search commits by message
git log --grep="fix auth"

# Find who changed a line
git blame <file> -L <start>,<end>

# Find which commit introduced a bug
git bisect start
git bisect bad HEAD
git bisect good v1.0.0
# Git will binary search — test each commit and mark good/bad

# Show changes to a specific function
git log -p -S "functionName" -- <file>

Recovery

# Undo last commit (keep changes staged)
git reset --soft HEAD~1

# Find lost commits
git reflog

# Restore a deleted branch
git checkout -b <branch> <reflog-sha>

# Revert a pushed commit (creates new commit)
git revert <sha>

# Unstage files
git restore --staged <file>

# Discard working tree changes
git restore <file>

Best Practices

  1. Commit often — small, atomic commits are easier to review and revert
  2. Pull before push — avoid unnecessary merge commits
  3. Don't rewrite shared history — never force-push to main/master
  4. Use .gitignore — keep build artifacts, secrets, and IDE files out
  5. Write meaningful messages — future-you will thank present-you
  6. Review diffs before committing — git diff --staged catches mistakes

Read the full file on GitHub · 115 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 · 115 lines · 34 tokens per session scan A 67c4d10a0710

Subscribe to this mod's changes

git-essentials is a skill published in the GitHub repository asgarovf/locusai (23 stars, last pushed 7mo ago), licensed MIT. It adds 34 tokens to every session and 681 once invoked, about $0.0001 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-08-30.

Related

Other skills, from other repositories

git-workflow

Git branching, commit conventions, rebase vs merge, conflict resolution, and release tagging. Use when setting up a git workflow, writing commits, resolving conflicts, or preparing a release.

chandrudp29/skillhub · 41 tokens

git-docs

Git 2.49 — repositories, branching, merging, rebasing, remotes, submodules, hooks, internals, workflows.

pledgeandgrow/pledge-skills · 32 tokens

git-workflow

Essential Git patterns for effective version control, eliminating redundant Git guidance per agent.

bobmatnyc/claude-mpm · 19 tokens

share-a-library

Use when a managed library is ready to publish to GitHub and hand to teammates as an install command. Run the GitHub publishing steps, then return the exact shareable install command.

MoizIbnYousaf/Ai-Agent-Skills · 41 tokens

git-workflow

Use when naming or scoping a branch, writing or fixing a commit message, picking the gitmoji for a commit, untangling history (rebase versus merge versus squash), or cutting a versioned release — the portable git-convention layer for any repo. Covers gitmoji + Conventional Commits, SemVer tags, branch hygiene…

ericrisco/rsc-harness · 127 tokens

git-expert

Expert-level Git version control with advanced workflows, branching strategies, and best practices for team collaboration. Use when the user mentions version control, collaboration, or workflow, or when the task involves Essential Git Commands, Advanced Git Techniques, Branching Strategies, or Conflict Resolution.

personamanagmentlayer/pcl · 57 tokens