Git workflow enforcement and convention guidance for Claude Code.
Hooks enforce git command safety — deny dangerous operations, ask for confirmation on writes, allow safe reads.
Skills guide git conventions — commit messages, branching, PRs, file lineage.
Install at user scope for global git workflow enforcement:
claude plugin add /path/to/igitEvaluates git commands against policy rules before execution:
| Decision | Meaning | Example |
|---|---|---|
deny |
Blocked by policy | git push --force, git reset --hard |
ask |
Requires user confirmation | git push, git merge, git rebase |
allow |
Runs without prompts | git status, git log, git commit |
| Skill | Trigger | Purpose |
|---|---|---|
/igit:git-workflow |
Branching, PRs, pushing | Lifecycle conventions |
/igit:file-lineage |
Moving/renaming files | Preserving git history |
| Skill | Trigger | Purpose |
|---|---|---|
/igit:commit |
/igit:commit (user-invoked) |
Branch selection, file staging, commit message workflow |
# Run tests
uv run pytest hooks/ -v
# Run hook directly (reads JSON from stdin)
# --script reads PEP 723 inline metadata for Python version and dependencies
uv run --script hooks/git_policy_hook.py