git-troubleshooting

git-troubleshooting is a skill for Claude Code from geoffjay/claude-plugins. It costs 39 tokens per session (3,875 once invoked), scanned A, original, MIT.

A guide for diagnosing and fixing Git problems, including lost commits, merge conflicts, detached HEAD states, and repository errors. A detached HEAD means Git is viewing a commit without being on a normal branch.

In plain words
What is it for?
Use it to recover commits, fix conflicts, repair botched rebases or merges, diagnose repository issues, or resolve authentication problems.
Why use it?
It helps recover work and resolve repository mistakes when ordinary branch operations leave the project in a confusing state.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the git plugin — 4 skills shipped together

Good fit Use it to recover commits, fix conflicts, repair botched rebases or merges, diagnose repository issues, or resolve authentication problems.

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

Made for: Claude Code.

Or install git, the plugin that ships this one along with the rest of its 4 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 git-troubleshooting

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/geoffjay/claude-plugins/git-troubleshooting"><img src="https://agentmods.dev/badge/skills/geoffjay/claude-plugins/git-troubleshooting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,875 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. ✓ AI security review Sonnet 5 · 7 Sept 2026 📄 Read the review Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk fail 16 Feb 2026
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.00039 $0.03875
Opus 5.5 $0.00016 $0.01550
Sonnet 5.5 $0.00008 $0.00775
Haiku 4.5 $0.00004 $0.00387

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

Security

Grade A, and why

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

plugins/utilities/git/skills/git-troubleshooting/SKILL.md · 820 lines

How it starts

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

Git Troubleshooting Skill

This skill provides comprehensive guidance on diagnosing and resolving git issues, recovering from mistakes, fixing corrupted repositories, and handling common error scenarios.

When to Use

Activate this skill when:

  • Encountering git error messages
  • Recovering lost commits or branches
  • Fixing corrupted repositories
  • Resolving detached HEAD state
  • Handling botched merges or rebases
  • Diagnosing repository issues
  • Recovering from force push
  • Fixing authentication problems

Recovering Lost Commits

Using Reflog

# View reflog (local history of HEAD)
git reflog

# View reflog for specific branch
git reflog show branch-name

# Output example:
# abc123 HEAD@{0}: commit: feat: add authentication
# def456 HEAD@{1}: commit: fix: resolve bug
# ghi789 HEAD@{2}: reset: moving to HEAD~1

# Recover lost commit
git cherry-pick abc123

# Or create branch from lost commit
git branch recovered-branch abc123

# Or reset to lost commit
git reset --hard abc123

Finding Dangling Commits

# Find all unreachable objects
git fsck --lost-found

# Output:
# dangling commit abc123
# dangling blob def456

# View dangling commit
git show abc123

# Recover dangling commit
git branch recovered abc123

# Or merge it
git merge abc123

Recovering Deleted Branch

# Find branch commit in reflog
git reflog

# Look for branch deletion:
# abc123 HEAD@{5}: checkout: moving from feature-branch to main

# Recreate branch
git branch feature-branch abc123

# Or if branch was merged before deletion
git log --all --oneline | grep "feature"
git branch feature-branch def456

Recovering After Reset

# After accidental reset --hard
git reflog

# Find commit before reset:
# abc123 HEAD@{0}: reset: moving to HEAD~5
# def456 HEAD@{1}: commit: last good commit

# Restore to previous state
git reset --hard def456

# Or create recovery branch
git branch recovery def456

Resolving Detached HEAD

Understanding Detached HEAD

Read the full file on GitHub · 820 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 · 820 lines · 39 tokens per session scan E 6e323b3ba7c9

Subscribe to this mod's changes

git-troubleshooting is a skill published in the GitHub repository geoffjay/claude-plugins (8 stars, last pushed 11mo ago), licensed MIT. It adds 39 tokens to every session and 3,875 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

agent-merge-conflict-arbiter

Neutral arbiter for merge conflicts between two agents.

NousResearch/hermes-agent · 19 tokens

git-advanced-workflows

Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.

wshobson/agents · 54 tokens

enable-check-includes-strict

Enable and migrate Chromium targets and directories to checkincludesstrict = true, diagnosing and resolving header include violations as part of the checkincludesstrict LSC. Use when adding directories to the allowlist, enabling strict header checks on targets, or resolving CHECKINCLUDESSTRICTUNTRIAGED targets.

chromium/chromium · 70 tokens

resolve-handoff

Emit the complete Resolve handoff with exact modes, outcomes, test evidence, and publication state.

omnigent-ai/omnigent · 23 tokens

reproduce-and-fix-issues

Reproduce triaged Slack bugs through a configured app-control adapter, verify existing fixes, and open a bounded draft pull request only after before-and-after proof. Use only from the configured Benny repro automation.

backnotprop/pstack · 48 tokens

cy-orquestrate-issue

Orchestrate GitHub bug resolution through a new CompozyOS managed worktree and Codex Astra High session per issue. Investigate reported bugs, create missing issues, and dispatch a Goal-backed executor responsible for a detailed PR, green CI, and all CodeRabbit and Greptile feedback. Use when asked to delegate issue…

compozy/compozy · 92 tokens