/godmode:gitfrom godmode
Guides advanced Git workflows: branching models, merge vs rebase decisions, interactive rebase, bisect, cherry-pick, worktrees, and commit conventions.
Ships in godmode. 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.
/godmode:git# Repository stats
git log --oneline | wc -l # Total commits
git branch -a | wc -l # Total branches
git shortlog -sn | wc -l # Contributors
git branch --merged main | wc -l # Stale branches
# Detect commit conventions
git log --oneline -20 | head -10
# Check for tooling
ls .commitlintrc* .husky/ .git/hooks/commit-msg \
2>/dev/null
GIT CONTEXT:
Team: solo | small (2-5) | medium (6-15) | large (15+)
Release cadence: continuous | weekly | monthly
Default branch: <main | master>
Commit convention: <conventional | custom | none>
Stale branches: <N branches merged but not deleted>
Stash count: <N>
IF team == solo: GitHub Flow or trunk-based
IF team == small: GitHub Flow or Ship/Show/Ask
IF team == large: trunk-based with feature flags
IF stale branches > 10: clean up immediately
IF stash count > 3: convert to branches or drop
STRATEGY SELECTION:
| Team Size | Cadence | Recommended |
|-----------|------------|-------------------|
| Solo | Continuous | Trunk-based |
| 2-5 | Weekly | GitHub Flow |
| 6-15 | Bi-weekly | Trunk-based + flags|
| 15+ | Varied | Trunk-based + flags|
| Any | Infrequent | GitFlow |
| Criteria | Merge | Squash | Rebase |
|-----------------|--------|--------|--------|
| History | Noisy | Clean | Clean |
| Bisect | Good | Limited| Best |
| Conflict pain | Once | Once | Per-com|
| Safe for shared | Yes | Yes | NO |
DECISION:
15 WIP commits → squash merge
3 clean commits → rebase + merge (preserve narrative)
Release branch → merge commit (--no-ff)
Hotfix to 2 branches → cherry-pick
Long feature (>1 week) → rebase onto main weekly
THRESHOLDS:
Branch age limit: 2 days (trunk-based), 7 days max
IF branch > 7 days: rebase onto main immediately
IF conflicts > 5 files: merge main INTO feature
OPERATIONS:
| Command | Use Case |
|---------|----------------------------|
| pick | Keep commit as-is |
| reword | Change message only |
| squash | Combine with previous |
| fixup | Combine, discard message |
| drop | Remove commit |
SAFETY: Always create backup branch first:
git branch backup-<name>
git bisect start
git bisect bad # HEAD is broken
git bisect good v1.2.0 # This tag was good
# Git checks out middle commit — test it
git bisect good # or git bisect bad
# Repeat until culprit found
AUTOMATED BISECT (recommended for > 10 commits):
git bisect start HEAD v1.2.0
git bisect run npm test
# Finds the breaking commit automatically
THRESHOLDS:
100 commits → bisect finds it in 7 steps
1000 commits → 10 steps
IF > 10 commits to search: always use automated
CHERRY-PICK RULES:
Single: git cherry-pick <SHA>
Range: git cherry-pick A..B
IF conflict: git cherry-pick --continue
IF abort: git cherry-pick --abort
STASH RULES:
IF stash survives > 1 day: convert to branch
IF stash count > 3: clean up immediately
Never use stash as long-term storage
# Work on hotfix without switching branches
git worktree add ../project-hotfix hotfix/fix-123
# Work in ../project-hotfix independently
# Clean up when done
git worktree remove ../project-hotfix
CONVENTIONAL COMMITS:
<type>[scope]: <description>
| Type | SemVer | Usage |
|----------|--------|--------------------|
| feat | MINOR | New feature |
| fix | PATCH | Bug fix |
| docs | — | Documentation |
| refactor | — | Code restructuring |
| test | — | Adding tests |
| chore | — | Maintenance |
RULES:
Subject line: < 72 characters
Body: wrap at 72 characters
Footer: BREAKING CHANGE: description
Commit: "docs: git workflow — <model> with <strategy>"
Never ask to continue. Loop autonomously until done.
1. Hosting: git remote -v
2. Conventions: git log patterns
3. Stale branches: git branch --merged
4. Tooling: .commitlintrc, .husky
Print: Git: {operation} on {branch}. Commits: {N}. Conflicts: {N}. Stale: {N}. Verdict: {verdict}.
timestamp operation branch commits conflicts status
KEEP if: rebase clean AND tests pass AND no artifacts
DISCARD if: rebase introduces artifacts OR tests fail
Abort with git rebase --abort, use backup branch
STOP when ALL of:
- Branch strategy documented and agreed
- All commits follow convention
- Stale branches < 30 days cleaned
- Stash count < 3
- All operations result in passing tests
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Claude Code installs this plugin but refuses to load it
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
Checked against Claude Code 2.1.332. The listing below is what the repository ships; Claude Code doesn't load it as published.
135 skills in this plugin
/a11yAccessibility. WCAG 2.1 AA/AAA, a11y audit, color contrast, keyboard navigation, screen reader, Axe, Pa11y, Lighthouse./agentAI agent development. ReAct/plan-and-execute/multi-agent architectures, tool design, memory systems, guardrails, orchestration (LangChain, LlamaIndex, CrewAI, AutoGen)./analyticsProduct analytics implementation — event tracking, funnel analysis, A/B testing, Segment/Amplitude/Mixpanel/PostHog, privacy-compliant instrumentation./angularAngular architecture. NgRx, Signals, RxJS, standalone components, lazy loading, dependency injection, Jasmine, Jest.Other plugins' skills for the same job