Git Expert
Unified git workflow skill. Routes to the right procedure based on what the user needs.
Routing
| User wants... |
Reference |
Key commands |
| Create a commit |
WORKFLOWS.md § Commit + CONVENTIONS.md + EXAMPLES.md |
git status, git diff, git add, git commit |
| Quick checkpoint |
WORKFLOWS.md § Checkpoint |
git add -u, git commit --no-verify |
| Squash WIP commits |
WORKFLOWS.md § Squash |
git merge-base, git reset --soft, git commit |
| Explore history |
Decision tree below |
git log, git blame, git show, git diff |
| Create PR |
WORKFLOWS.md § PR |
git push -u, gh pr create |
| Session activity |
WORKFLOWS.md § Session Log |
git log --since="1 hour ago" |
| Manage worktrees |
WORKTREE.md |
CLI via bunx @side-quest/git worktree <command> |
| Review a PR |
WORKFLOWS.md § Review PR |
gh pr view, gh pr diff, gh api |
| Generate changelog |
WORKFLOWS.md § Changelog |
git log, git tag, git describe |
| Compare branches |
WORKFLOWS.md § Compare |
git merge-base, git diff, git log |
History Exploration Decision Tree
| Question |
Git commands |
| "What changed recently?" |
git log --oneline -10, git status --porcelain -b, git diff --stat |
| "What changed in <area>?" |
git log --oneline -10 -- <path>, git log --all --grep="<area>" |
| "When did we add/change X?" |
git log --all --grep="<X>", git log -S "<X>", git log -G "<X>" |
| "Who changed this?" |
git blame <file>, git log --follow -- <file> |
| "Compare branches" |
git log --oneline main..HEAD, git diff main...HEAD --stat |
| "Show specific commit" |
git show <hash> --stat, git show <hash> |
| "What branches exist?" |
git branch -a, git branch --show-current |
| "What did we do this session?" |
git log --oneline --since="1 hour ago", git status |
| "Review this PR" |
gh pr view <PR>, gh pr diff <PR>, gh api .../pulls/<PR>/comments |
| "Generate changelog" |
git describe --tags --abbrev=0, git log <tag>..HEAD --oneline |
| "Compare these branches" |
git merge-base <base> HEAD, git diff <base>...HEAD --stat |
Safety Rules
These are non-negotiable:
- NEVER force push (
git push --force / -f)
- NEVER
git reset --hard without explicit user confirmation
- NEVER
git clean -f without explicit user confirmation
- NEVER
git checkout . or git restore . without user confirmation
- NEVER commit secrets (
.env, credentials, API keys)
- NEVER use
git add . or git add -A — always stage specific files
- NEVER skip hooks (
--no-verify) except for WIP/checkpoint commits on feature branches
- ALWAYS check branch before committing -- if on
main/master, create a feature branch first (no exceptions, including WIP checkpoints)
- ALWAYS verify on feature branch before squash (abort if
main)
- ALWAYS use HEREDOC format for multi-line commit messages
- ASK user if commit scope or message is unclear
- SPLIT large changes into atomic commits
Lifecycle Hooks
This plugin runs 5 hooks that fire automatically — you don't invoke them, but be aware of their effects:
| Hook |
Event |
What It Does |
session-start |
SessionStart |
Loads git context (branch, recent commits, status) |
git-safety |
PreToolUse |
Blocks destructive git commands, all commits on main/master, --no-verify on non-WIP commits, and protected file edits |
command-logger |
PostToolUse |
Logs Bash commands to ~/.claude/logs/git-command-log.jsonl |
session-summary |
PreCompact |
Extracts salient transcript items and saves git compaction summary |
auto-commit |
Stop |
Creates WIP checkpoint commit for tracked changes on stop (feature branches only) |
If a hook blocks an action, resolve the underlying git safety issue rather than bypassing hook behavior.
Commit Format
<type>(<scope>): <subject>
See CONVENTIONS.md for full spec and EXAMPLES.md for examples.
| Type |
Use for |
| feat |
New feature |
| fix |
Bug fix |
| docs |
Documentation only |
| refactor |
Code change (no feature/fix) |
| test |
Adding/updating tests |
| chore |
Maintenance |
| perf |
Performance |
| style |
Formatting |
| build |
Build system |
| ci |
CI/CD |
| revert |
Revert changes |
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: git-expert-33description: Git workflow expert — conventional commits, history exploration, worktree management, PR creation, squash, and safety. Activates for any git-related task including committing, branching, history, and repository analysis. Use when this capability is needed.4---56# Git Expert78Unified git workflow skill. Routes to the right procedure based on what the user needs.910## Routing1112| User wants... | Reference | Key commands |13|---------------|-----------|-------------|14| Create a commit | [WORKFLOWS.md](WORKFLOWS.md) § Commit + [CONVENTIONS.md](CONVENTIONS.md) + [EXAMPLES.md](EXAMPLES.md) | `git status`, `git diff`, `git add`, `git commit` |15| Quick checkpoint | [WORKFLOWS.md](WORKFLOWS.md) § Checkpoint | `git add -u`, `git commit --no-verify` |16| Squash WIP commits | [WORKFLOWS.md](WORKFLOWS.md) § Squash | `git merge-base`, `git reset --soft`, `git commit` |17| Explore history | Decision tree below | `git log`, `git blame`, `git show`, `git diff` |18| Create PR | [WORKFLOWS.md](WORKFLOWS.md) § PR | `git push -u`, `gh pr create` |19| Session activity | [WORKFLOWS.md](WORKFLOWS.md) § Session Log | `git log --since="1 hour ago"` |20| Manage worktrees | [WORKTREE.md](WORKTREE.md) | CLI via `bunx @side-quest/git worktree <command>` |21| Review a PR | [WORKFLOWS.md](WORKFLOWS.md) § Review PR | `gh pr view`, `gh pr diff`, `gh api` |22| Generate changelog | [WORKFLOWS.md](WORKFLOWS.md) § Changelog | `git log`, `git tag`, `git describe` |23| Compare branches | [WORKFLOWS.md](WORKFLOWS.md) § Compare | `git merge-base`, `git diff`, `git log` |2425## History Exploration Decision Tree2627| Question | Git commands |28|----------|-------------|29| "What changed recently?" | `git log --oneline -10`, `git status --porcelain -b`, `git diff --stat` |30| "What changed in \<area\>?" | `git log --oneline -10 -- <path>`, `git log --all --grep="<area>"` |31| "When did we add/change X?" | `git log --all --grep="<X>"`, `git log -S "<X>"`, `git log -G "<X>"` |32| "Who changed this?" | `git blame <file>`, `git log --follow -- <file>` |33| "Compare branches" | `git log --oneline main..HEAD`, `git diff main...HEAD --stat` |34| "Show specific commit" | `git show <hash> --stat`, `git show <hash>` |35| "What branches exist?" | `git branch -a`, `git branch --show-current` |36| "What did we do this session?" | `git log --oneline --since="1 hour ago"`, `git status` |37| "Review this PR" | `gh pr view <PR>`, `gh pr diff <PR>`, `gh api .../pulls/<PR>/comments` |38| "Generate changelog" | `git describe --tags --abbrev=0`, `git log <tag>..HEAD --oneline` |39| "Compare these branches" | `git merge-base <base> HEAD`, `git diff <base>...HEAD --stat` |4041## Safety Rules4243These are non-negotiable:4445- **NEVER** force push (`git push --force` / `-f`)46- **NEVER** `git reset --hard` without explicit user confirmation47- **NEVER** `git clean -f` without explicit user confirmation48- **NEVER** `git checkout .` or `git restore .` without user confirmation49- **NEVER** commit secrets (`.env`, credentials, API keys)50- **NEVER** use `git add .` or `git add -A` — always stage specific files51- **NEVER** skip hooks (`--no-verify`) except for WIP/checkpoint commits on feature branches52- **ALWAYS** check branch before committing -- if on `main`/`master`, create a feature branch first (no exceptions, including WIP checkpoints)53- **ALWAYS** verify on feature branch before squash (abort if `main`)54- **ALWAYS** use HEREDOC format for multi-line commit messages55- **ASK** user if commit scope or message is unclear56- **SPLIT** large changes into atomic commits5758## Lifecycle Hooks5960This plugin runs 5 hooks that fire automatically — you don't invoke them, but be aware of their effects:6162| Hook | Event | What It Does |63|------|-------|--------------|64| `session-start` | SessionStart | Loads git context (branch, recent commits, status) |65| `git-safety` | PreToolUse | Blocks destructive git commands, all commits on main/master, --no-verify on non-WIP commits, and protected file edits |66| `command-logger` | PostToolUse | Logs Bash commands to ~/.claude/logs/git-command-log.jsonl |67| `session-summary` | PreCompact | Extracts salient transcript items and saves git compaction summary |68| `auto-commit` | Stop | Creates WIP checkpoint commit for tracked changes on stop (feature branches only) |6970If a hook blocks an action, resolve the underlying git safety issue rather than bypassing hook behavior.7172## Commit Format7374```text75<type>(<scope>): <subject>76```7778See [CONVENTIONS.md](CONVENTIONS.md) for full spec and [EXAMPLES.md](EXAMPLES.md) for examples.7980| Type | Use for |81|------|---------|82| feat | New feature |83| fix | Bug fix |84| docs | Documentation only |85| refactor | Code change (no feature/fix) |86| test | Adding/updating tests |87| chore | Maintenance |88| perf | Performance |89| style | Formatting |90| build | Build system |91| ci | CI/CD |92| revert | Revert changes |9394---95> Converted and distributed by [TomeVault](https://tomevault.io/claim/nathanvale) — claim your Tome and manage your conversions.96<!-- tomevault:4.0:skill_md:2026-04-14 -->