/koopa:koopa-git-recoveryfrom koopa
Diagnoses and recovers from git accidents: wrong-branch reset, checkout blocked by untracked files, stash noise in prompt. Use after git alias side effects or branch pointer mishaps.
Ships in koopa. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
git reset --hard <ref> moves the current branch, not the target refgit reset --hard <ref> (and any alias wrapping it, e.g. git nuke) resets the
currently checked-out branch to <ref>. It does NOT switch branches.
Symptom: git nuke develop while on feat/foo leaves feat/foo pointing at
a develop commit; you are still on feat/foo.
Diagnosis checklist:
git reflog -n 8 # see what actually moved
git rev-parse --short HEAD # where am I now?
git rev-parse --short origin/feat/foo # is remote still intact?
git rev-list --count origin/develop..develop # is local develop stale?
Recovery (no unpushed commits on the mangled branch):
git fetch origin
git switch develop # tree must be clean first
git branch -f feat/foo origin/feat/foo # restore pointer from remote
git merge --ff-only origin/develop # fast-forward if local develop is behind
git branch -f refuses to move the checked-out branch, always switch off it first.
error: The following untracked working tree files would be overwritten by checkout
The files exist untracked in the current tree but are tracked on the target branch. Git refuses to overwrite them.
Options (in order of preference):
git clean -n # dry run, see what would be removed
git clean -fd # remove untracked files and dirs
git stash -u # -u includes untracked files
git switch develop
git stash pop
The git reset --hard <target-branch> workaround (as in git nuke develop) does
absorb untracked files by resetting the current branch to the target, but it
moves the current branch pointer, which is usually not what you want. Prefer
git clean or git stash -u instead.
[$] in starship)Starship's git_status module shows $ when the stash stack is non-empty. The
stash is repo-wide, it shows on every branch regardless of where the stash was
created.
Clear all stashes when you no longer need them:
git stash list # review first
git stash clear # drop all stashes
Drop a single stash:
git stash drop stash@{0}
git reflog -n 8 # recent HEAD movements
git log --oneline -5 # where is HEAD
git branch -vv # local branches + tracking + ahead/behind
git rev-list --count origin/develop..develop # local ahead of remote
git rev-list --count develop..origin/develop # local behind remote
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub acidgenomics/koopa --plugin koopa14 skills in this plugin
/koopa-agent-guardsWhat the koopa plugin's agent guard hooks block or ask about, why, and the correct alternative for each. Use when a koopa hook blocked or asked about a command or a file write, when a deny message names a script such as block_uv.py or guard_rm.py, or when the user asks what the koopa plugin guards do and how to configure them./koopa-claude-permissionsClaude Code permission system internals, protected paths, permission modes, allow/ask/deny rule precedence, and the PreToolUse permissionDecision hook contract. Use when debugging unexpected permission prompts, understanding why Edit(.claude/**) or Bash(*) allow rules have no effect on .claude/ writes, reasoning about acceptEdits vs plan vs bypassPermissions mode tradeoffs, a headless claude -p call that hangs with no output, interpreter allow entries (bash, python, sh, xargs) that bypass deny rules, a deny rule that blocks a harmless test command, or a settings.json change that did not deploy on a work host./koopa-cliCommand syntax for koopa, a shell bootloader that installs apps into its own prefix instead of the system package manager. Use when changing koopa's CLI architecture, installing a CLI tool, updating apps, switching koopa branches, recovering from a stale checkout, or listing what koopa manages.Other plugins' skills for the same job