Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Tether (install/uninstall) hooks that enforce git-town over raw git commands in Claude Code. Renamed from 'hooks' to avoid.
model
haiku
disable-model-invocation
true
Git-Town Enforcement Hooks — Installation
This command installs Claude Code hooks that BLOCK forbidden raw git commands.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
What Gets Blocked
Forbidden Command
Reason
Replacement
git checkout -b
Creates untracked branches
git town hack
git pull
Bypasses sync workflow
git town sync
git merge
Manual merges break flow
git town sync
git push origin main
Direct main push dangerous
git town sync
git branch -d
Manual branch deletion
git town delete
git rebase
Complex, use git-town
git town sync
What's Allowed
Allowed Command
Reason
git add
Staging files (git-town doesn't replace)
git commit
Creating commits (git-town doesn't replace)
git status
Viewing status (read-only)
git log
Viewing history (read-only)
git diff
Viewing changes (read-only)
git stash
Stashing changes (utility)
git remote
Remote management (setup only)
git config
Configuration (setup only)
Hook Definition
The following hook will be added to ~/.claude/settings.json:
{"hooks":{"PreToolUse":[{"matcher":"Bash","hooks":[{"type":"command","command":"/usr/bin/env bash -c 'CMD=\"$CLAUDE_TOOL_INPUT_command\"; case \"$CMD\" in \"git checkout -b\"*|\"git checkout -B\"*) echo \"BLOCKED: Use git town hack instead of git checkout -b\"; exit 1;; \"git pull\"*) echo \"BLOCKED: Use git town sync instead of git pull\"; exit 1;; \"git merge\"*) echo \"BLOCKED: Use git town sync or git town ship instead of git merge\"; exit 1;; \"git push origin main\"*|\"git push origin master\"*) echo \"BLOCKED: Use git town sync instead of pushing to main\"; exit 1;; \"git branch -d\"*|\"git branch -D\"*) echo \"BLOCKED: Use git town delete instead of git branch -d\"; exit 1;; \"git rebase\"*) echo \"BLOCKED: Use git town sync (rebase strategy) instead of git rebase\"; exit 1;; esac'"}]}]}}