git-expert

git-expert is a skill for Claude Code from personamanagmentlayer/pcl. It costs 57 tokens per session (999 once invoked), scanned A, original, Apache-2.0.

A reference guide for using Git, the system that records code changes and supports collaboration between developers.

In plain words
What is it for?
It covers everyday Git operations, branching, staging, committing, inspecting history, and comparing changes.
Why use it?
It helps developers manage history, branches, commits, comparisons, and shared work with fewer workflow mistakes.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit It covers everyday Git operations, branching, staging, committing, inspecting history, and comparing changes.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/git-expert.svg)](https://agentmods.dev/skills/personamanagmentlayer/pcl/git-expert)
Your own site
<a href="https://agentmods.dev/skills/personamanagmentlayer/pcl/git-expert"><img src="https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/git-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 999 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 46
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 136
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 99
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
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.00057 $0.00999
Opus 5 $0.00028 $0.00500
Sonnet 5 $0.00011 $0.00200
Haiku 4.5 $0.00006 $0.00100

Measured 2d ago against content hash f5e15d0561a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

git-expert 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 2d 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.

stdlib/tools/git-expert/SKILL.md · 177 lines

How it starts

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

Git Expert

You are an expert in Git version control with deep knowledge of advanced workflows, branching strategies, collaboration patterns, and best practices. You help teams manage code efficiently and resolve complex version control issues.

Common Workflows

Fixing Mistakes

Undo Last Commit (not pushed):

# Keep changes staged
git reset --soft HEAD~1

# Keep changes unstaged
git reset HEAD~1

# Discard changes completely
git reset --hard HEAD~1

Amend Last Commit:

# Change commit message
git commit --amend -m "new message"

# Add forgotten files
git add forgotten-file.txt
git commit --amend --no-edit

Revert Commit (already pushed):

# Create new commit that undoes changes
git revert commit-hash

# Revert multiple commits
git revert commit1 commit2 commit3

# Revert merge commit
git revert -m 1 merge-commit-hash

Recover Deleted Files:

# File deleted but not committed
git checkout HEAD file.txt

# File deleted and committed
git log --all --full-history -- file.txt
git checkout commit-hash -- file.txt

Cleaning Repository

Remove Untracked Files:

# Dry run
git clean -n

# Remove files
git clean -f

# Remove files and directories
git clean -fd

# Remove files, directories, and ignored files
git clean -fdx

Prune Branches:

# Remove remote-tracking branches that no longer exist
git fetch --prune

# Delete merged branches
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d

Reduce Repository Size:

# Remove file from history (CAUTION: rewrites history)
git filter-branch --tree-filter 'rm -f large-file.bin' HEAD

# Better: use git-filter-repo
pip install git-filter-repo
git filter-repo --path large-file.bin --invert-paths

# Garbage collection
git gc --aggressive --prune=now

Troubleshooting

Common Issues:

# Detached HEAD state
git checkout -b temp-branch    # Create branch from detached HEAD

# Accidentally committed to main instead of branch
git branch feature-branch      # Create branch at current commit
git reset --hard origin/main   # Reset main to remote
git checkout feature-branch    # Switch to feature branch

# Need to pull but have local changes
git stash
git pull
git stash pop

# Push rejected (non-fast-forward)
git pull --rebase origin main
git push

# Large files stuck in history
git filter-repo --strip-blobs-bigger-than 10M

# Corrupted repository
git fsck --full                # Check for corruption
git reflog expire --expire=now --all
git gc --prune=now --aggressive

Read the full file on GitHub · 177 lines

Files

What ships with it

1 file 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. 2d ago Changed · -529 lines · +35 tokens per session f5e15d0561a1
  2. 4d ago First seen · 706 lines · 22 tokens per session scan A fbc94654f74a

Subscribe to this mod's changes

git-expert is a skill published in the GitHub repository personamanagmentlayer/pcl (40 stars, last pushed today), licensed Apache-2.0. It adds 57 tokens to every session and 999 once invoked, about $0.0003 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-09-03.

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

contextual-commit

Write contextual commits that capture intent, decisions, and constraints alongside code changes. Use when committing code, finishing a task, or when the user asks to commit. Extends Conventional Commits with structured action lines in the commit body that preserve WHY code was written, not just WHAT changed.

yamadashy/repomix · 62 tokens

release

Use this skill for EVERY ClawRouter release. Enforces the full checklist — version sync, CHANGELOG, build, tests, npm publish, git tag, GitHub release. No step can be skipped.

BlockRunAI/ClawRouter · 44 tokens

caveman-commit

Write a Conventional Commits message compressed to intent only. Use for "write a commit", "commit message", /commit or /caveman-commit.

JuliusBrussee/caveman · 38 tokens

close-task-commit-push-pr

Close the active backlog task (detected from branch name), commit all changes, push to remote, and open a pull request. Use when the user says "close task and ship it", "close task commit push pr", or invokes /close-task-commit-push-pr.

devoxx/DevoxxGenieIDEAPlugin · 64 tokens

git-commit-push-pr

Commit all changes, push to remote, and open a pull request in one go. Use when the user says "commit push pr", "ship it", "open a pr", or invokes /git-commit-push-pr.

devoxx/DevoxxGenieIDEAPlugin · 53 tokens