w-git-repair — Claude Code skill: Git fixes and installation
The w-git-repair Claude Code skill diagnoses local Git problems and conflicts. It checks repository state before suggesting repair commands.
MIT 647 installs ★ 1 updated 2026-10-02
npx skills add blockmatic-icebox/basilic-skills --skill w-git-repair -a claude-codeWhat w-git-repair does
The skill handles merge conflicts, detached HEAD, and upstream divergence. It first checks git status, git branch -vv, and the relevant log, then summarizes the issue and suggests the smallest set of commands, explaining their effects.
Commands that can discard local changes require explicit confirmation. History-rewriting commands require a direct user request, and published history must not be changed without one. After an authorized command, the skill checks repository status and any remaining conflicts. It never force-pushes or bypasses hooks.
What it helps with
- resolve a Git merge conflict
- recover from detached HEAD
- identify why a local branch diverges from upstream
- choose repair commands without discarding local changes
Example prompts for the agent
- Check the current branch and suggest safe commands to resolve this conflict.
- Help me leave detached HEAD; inspect the repository state first.
- Explain the upstream divergence and propose the smallest fix.
How to install w-git-repair
1Skills CLI (Vercel)
npx skills add blockmatic-icebox/basilic-skills --skill w-git-repair -a claude-code2Manually: put the files in place
~/.claude/skills/w-git-repair/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/w-git-repair/
1Skills CLI (Vercel)
npx skills add blockmatic-icebox/basilic-skills --skill w-git-repair -a codex2Manually: put the files in place
.agents/skills/w-git-repair/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add blockmatic-icebox/basilic-skills --skill w-git-repair -a cursor2Manually: put the files in place
.cursor/skills/w-git-repair/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install blockmatic-icebox/basilic-skills skills/workflow/w-git-repair2Manually: put the files in place
.github/skills/w-git-repair/SKILL.md1Skills CLI (Vercel)
npx skills add blockmatic-icebox/basilic-skills --skill w-git-repair -a gemini-cli2Platform CLI
gemini skills install https://github.com/blockmatic-icebox/basilic-skills --path skills/workflow/w-git-repairManually: put the files in place
.devin/skills/w-git-repair/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add blockmatic-icebox/basilic-skills --skill w-git-repair -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about w-git-repair
How do I install w-git-repair in Claude Code?
Run npx skills add blockmatic-icebox/basilic-skills --skill w-git-repair -a claude-code. The skill file is at ~/.claude/skills/w-git-repair/SKILL.md.
What does w-git-repair do?
It inspects Git status, branches, and the relevant log, then suggests commands for conflicts, detached HEAD, and upstream divergence. After an authorized fix, it checks the status and remaining conflicts.
How does w-git-repair protect local changes?
It asks for explicit confirmation before commands that can discard local changes. History-rewriting commands need a direct request; force-pushing and bypassing hooks are prohibited.
Source text
SKILL.md · MIT
--- name: w-git-repair description: Resolve common Git problems and conflicts with inspected commands. disable-model-invocation: true --- Help with conflicts, detached HEAD, upstream divergence, and similar local Git problems. Follow [git publish](references/git-publish.md). Do not rewrite published history unless the user asked. 1. Inspect `git status`, `git branch -vv`, and the relevant log. State the current problem in one sentence. 2. Propose the smallest safe commands. Explain what they change. Require explicit confirmation before commands that can discard local changes (`git reset --hard`, `git clean`, `git restore`). Require an explicit user request before history-rewriting commands (`git rebase`, `git commit --amend` of a published commit). 3. After an authorized command, re-inspect status and remaining conflicts. Never force-push or bypass hooks.
© blockmatic-icebox · MIT · blockmatic-icebox/basilic-skills