/koopa:koopa-git-history-surgeryfrom koopa
Rewrites git history safely using git filter-repo for removing secrets, fixing author/committer identities, and de-duplicating commits. Includes verification steps and known workarounds.
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.
Use git filter-repo, not delete-and-recreate. Deleting the repo loses
settings, branch protections, access controls, and issue/PR history.
git filter-repo \
--path path/to/sensitive-file \
--invert-paths \
--force
git filter-repo removes the remote as a safety measure, re-add it after:
git remote add origin <url>
git push --force --set-upstream origin main
Teammates must then re-clone or hard reset:
git fetch --all && git reset --hard origin/main
Known issue: git filter-repo crashes if any git config value contains a
literal newline (e.g. a multi-line alias). Workaround:
GIT_CONFIG_NOSYSTEM=1 HOME=/dev/null git filter-repo --path ... --invert-paths --force
Use git filter-repo --mailmap for pure identity rewrites (wrong author/email):
# mailmap format: canonical <[email protected]> <[email protected]>
cat > mailmap << 'EOF'
USER NAME <USER EMAIL> <[email protected]>
EOF
GIT_CONFIG_NOSYSTEM=1 HOME=/dev/null git filter-repo --mailmap mailmap --force
git remote add origin <url>
git config --local user.name "USER NAME"
git config --local user.email "USER EMAIL"
Choose tool based on whether commits are unique:
--mailmap.
Filter-repo preserves graph topology and rewrites identity metadata only.git commit-tree replay to de-duplicate.
Filter-repo cannot collapse duplicate lineages.How to check before choosing:
# Count distinct trees for bad-email commits: must equal commit count for mailmap to be safe
git log --all --format='%T %ae' | grep 'corp\.com' | awk '{print $1}' | sort -u | wc -l
Verification after mailmap rewrite (all must pass before force-push):
# 1. No bad identities remain (must print nothing):
git log --all --format='%ae%n%ce' | grep -iE 'corp\.com'
# 2. Good bots preserved (count should be unchanged):
git log --all --format='%ce' | grep -c 'noreply@github\.com'
# 3. Commit count unchanged:
git rev-list --all --count
Always bundle-backup first and keep it until the force-push is confirmed:
git bundle create backup.bundle --all
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
14 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./koopa-envWhy a tool resolves inside the koopa prefix instead of Homebrew or the system, how to check that, and how koopa activation behaves in non-interactive and agentic sessions. Use when a command resolves to an unexpected binary, when PATH order looks wrong, or when working inside an SSH/CI/agent harness session that needs koopa's tools on PATH, when asking which shell an agent runs, what KOOPA_BUCKET is, when BSD `sed -i` fails on macOS and `gsed` is the fix, or when `timeout` is a missing command on macOS and `gtimeout` is the fix./koopa-ghosttyTroubleshoot Ghostty directory-access failures caused by macOS privacy permissions. Use when Ghostty reports Permission denied, code 13, or cannot list a Documents or cloud-synced directory that other apps can access./koopa-git-recoveryDiagnose and recover from common git branch/state accidents, wrong-branch reset, git alias side effects, untracked-file checkout collisions, and stash cleanup. Use when a git command moved the wrong branch pointer, a checkout was blocked by untracked files, or stash noise is showing in the prompt.npx claudepluginhub acidgenomics/koopa --plugin koopaOther plugins' skills for the same job