
git-plugin
Git plugin that automates commits, branches, PRs, issue triage, and conflict resolution for Claude Code.
- version
- 2.74.4
- GitHub stars
- 60
What it does
- Adds 9 commands and skills for commits, PRs, issues, and cleanup, such as
/git:commit,/git:triage,/git:deadbranch, and/git:conflicts - Covers the layered flow of commit, push, and PR, plus upstream PR contribution from fork work
- Enforces authorship checks before merges through the
external-pr-trustskill and acheck-pr-merge-method.shhook - Designed for developers who run stacked PRs, release-please repos, and fork-based contributions
Git workflows - commits, branches, PRs, issue processing, conflict resolution, and repository management
Add marketplace
/plugin marketplace add laurigates/claude-pluginsRun it inside Claude Code once, then install the plugin below.
Install
/plugin install git-plugin@laurigates-claude-pluginsRun it inside Claude Code after adding the marketplace.
Files
Discovered from source/git:deadbranch
Survey stale git branches and clean them up safely. Always previews before deleting; backup system means every deletion is recoverable.
When to Use This Skill
| Use this skill when... | Use another approach when... |
|---|---|
| Asked to clean up, prune, or remove stale branches across a repo | Deleting a single known branch — git branch -d <name> is simpler |
| You want a survey of branch health (age, merge status, count) first | Doing routine gc / repo maintenance — use /git:maintain |
| You want recoverable deletion with a dry-run preview and backups | Pruning remote-tracking refs only — git remote prune origin |
Parameters
Parse from $ARGUMENTS (all optional):
| Flag | Default | Description |
|---|---|---|
--days N | 30 | Age threshold — branches older than N days are stale |
--local | off | Target local branches only |
--remote | off | Target remote branches only |
--force | off | Include unmerged branches (dangerous — ask for explicit confirmation) |
--interactive | off | Open full-screen TUI for visual selection |
--dry-run | on | Show what would be deleted without deleting (always on for the preview step) |
--yes | off | Skip confirmation prompts (only use if user explicitly asks for automation) |
--stats-only | off | Run stats + list only, skip the clean step entirely |
When no flags are given, default to the survey-first workflow below.
Workflow
Step 1: Survey
Run in parallel:
deadbranch stats
deadbranch list
Report both outputs. The stats command shows total branch count, stale count, and age distribution. The list shows each stale branch with its age, merge status, last commit date, and author.
If --days N was provided, pass -d N to both commands.
If --local or --remote was provided, pass the flag to list.
If no stale branches are found, stop here and report the repo is clean.
If --stats-only was provided, stop here after reporting.
Step 1.5: Reclassify squash-merged branches
deadbranch classifies "merged" via commit ancestry (git branch --merged-style). On repos that squash-merge — the release-please /
conventional-commit default — the squash collapses a branch into a single new
commit on the base with a fresh SHA, so the branch's own commits are never
ancestors and it reads as unmerged. The "safe to delete" count is therefore
a lower bound on squash-merge repos (in one real cleanup, only 4 of 28
actually-merged branches were flagged safe).
After the survey, reclassify each branch deadbranch marked unmerged using
the signals below in this order of authority. A branch confirmed by any of
them is safe to delete; stop at the first one that answers.
-
A MERGED PR for the branch head — authoritative. GitHub records that the squash landed the work at merge time, regardless of any later drift on the base:
gh pr list --state all --head <branch> --json number,state,mergedAtA
MERGEDstate means the branch's work landed (readstate/mergedAt, never amergedfield — see.claude/rules/gh-json-fields.md).--head <branch>is an exact per-branch query, so it is unaffected bygh pr list's 30-item default page — never build a branch→PR map from a repo-widegh pr list --limit N, which silently drops every PR outside the window and misclassifies those branches as "no PR". -
git cherry— patch-equivalence, which survives squash-merge and cherry-pick even after the base drifts:git cherry <base> <branch> # every commit marked '-' => already upstream -
merge-tree— a positive-containment shortcut only (git ≥ 2.38). When the merged tree equals the base's tree, the branch contributes nothing not already present:base_tree=$(git rev-parse <base>^{tree}) merged=$(git merge-tree --write-tree <base> <branch>) [ "$merged" = "$base_tree" ] && echo "MERGED (contained in base)"A match proves containment; a non-match proves nothing. Once the base drifts over the same files, merging an already-landed branch back would re-introduce its older versions, so the trees differ for work that fully landed. Never use this as the primary signal: doing so is what made the
just -g branch-auditrecipe's REVIEW bucket ~90% false on two real repos (issue #2268). Treat a non-match as "review", never as "unmerged".
Report a "squash-merged (reclassified safe)" group alongside deadbranch's own
merged set so the user sees the true safe-to-delete count. Branches matching
none of the signals stay in the keep/review group — do not sweep them with
--force, which also deletes genuinely-unmerged work.
This reclassification is read-only — it never deletes. Deletion still flows through the Step 2 dry-run and Step 3 confirmation below, with the squash-merged branches included in the set the user approves.
Step 2: Dry-run preview
Always run a dry-run before any real deletion:
deadbranch clean --dry-run [--days N] [--local|--remote] [--force]
Report the dry-run output. If nothing would be deleted (e.g. all stale
branches are unmerged and --force was not set), explain why and offer
to re-run with --force if the user wants to include unmerged branches.
Step 3: Confirm and clean
After the dry-run, ask the user what to do:
AskUserQuestion("Proceed with branch deletion?", options=[
"Yes — delete all shown branches",
"Interactive TUI — let me pick",
"No — survey only, skip deletion"
])
- Yes: run
deadbranch clean [options] - Interactive: run
deadbranch clean --interactive [options](note: the TUI requires a real terminal — warn the user that this opens a full-screen interface they must interact with directly via! deadbranch clean --interactive) - No: print the summary and stop
If the user passed --interactive in $ARGUMENTS, skip the question
and go straight to TUI mode.
If --yes was explicitly passed, skip confirmation and delete directly.
Step 4: Report
After deletion, confirm with:
deadbranch backup list
Report how many branches were deleted and that their SHAs are backed
up (recoverable via deadbranch backup restore <branch>).
Safety Rules
| Situation | Action |
|---|---|
--force requested | Show extra warning: "This deletes unmerged branches. These are NOT recoverable from the remote." before dry-run |
--remote requested | Note that remote deletion affects everyone on the team |
| Branch is WIP / draft | deadbranch skips these automatically; mention it in the report |
| Protected branches (main/master/develop/staging/production) | deadbranch skips these automatically |
Recovery
If the user wants to recover a deleted branch:
deadbranch backup list # see what's saved
deadbranch backup restore <branch> # restore by name
Backups store the branch tip SHA. Restoration creates the branch locally pointing at that SHA.
Common Invocations
# Default survey + dry-run + confirm
deadbranch list
deadbranch stats
deadbranch clean --dry-run
# Local branches only, 60-day threshold
deadbranch list --local --days 60
deadbranch clean --local --days 60 --dry-run
# Remote branches — team-visible action, ask twice
deadbranch list --remote
deadbranch clean --remote --dry-run
# Interactive TUI (run by user in their terminal)
! deadbranch clean --interactive
# Non-interactive automation (CI / scripts)
deadbranch clean --yes --merged
Interactive TUI Note
deadbranch clean --interactive opens a full-screen TUI with:
- Vim-style navigation (
hjkl,/to fuzzy search) - Visual range selection
- 6-column sort
- Space to toggle individual branches for deletion
Claude Code cannot operate the TUI — instruct the user to run it
themselves with the ! prefix: ! deadbranch clean --interactive.
Configuration
deadbranch reads ~/.deadbranch/config.toml. View with:
deadbranch config show
Key settings:
| Setting | Default | Description |
|---|---|---|
general.default_days | 30 | Default age threshold |
branches.default_branch | auto-detect | Default branch name |
branches.protected | main, master, develop, staging, production | Never deleted |
branches.exclude_patterns | wip/, draft/, */wip, */draft | Pattern-excluded |
To change a setting:
deadbranch config set general.default_days 60
Installation (if not present)
Check availability first:
which deadbranch || echo "not installed"
Install via cargo (preferred — already in mise/Rust toolchain):
cargo install deadbranch
Or via Homebrew:
brew install armgabrielyan/tap/deadbranch
Agentic Optimizations
| Context | Command |
|---|---|
| Quick health stats | deadbranch stats |
| List stale (machine-survey) | deadbranch list --days 30 |
| Safe preview before delete | deadbranch clean --dry-run |
| Non-interactive cleanup | deadbranch clean --yes --merged |
| Recover a deleted branch | deadbranch backup restore <branch> |
Readme
Git Plugin
Git workflows, commits, branches, PRs, and repository management for Claude Code.
Overview
This plugin provides comprehensive Git workflow automation including conventional commits, branch management, pull request handling, and issue processing.
Flow
See docs/flow.md for a diagram of how the skills fit together.
Skills
| Skill | Description |
|---|---|
/git:api-pr | Create PRs via GitHub API without local git operations - for quick fixes, typos, config updates |
/git:commit | Complete workflow from changes to PR - auto-detect issues, create logical commits with proper linkage, push, optionally create PR |
/git:issue | Process GitHub issues with interactive selection, conflict detection, and parallel work support |
/git:issue-hierarchy | Manage sub-issues and native blocked_by / blocking dependencies between issues |
/git:issue-manage | Administrative operations: transfer, pin, lock, develop branches, bulk ops, custom fields |
/git:triage | Batch triage open issues and PRs: scan, categorize (implemented/stale/ready-to-merge/needs-fix), cross-link, optionally close or merge with --auto-close / --auto-merge |
/git:fix-pr | Reproduce a PR's failing checks locally, patch the code, and push the fix |
/git:pr-feedback | Review PR workflow results and comments, address substantive feedback from reviewers |
/git:conflicts | Resolve merge conflicts with zdiff3, rerere, and modern git tooling |
/git:maintain | Repository maintenance and cleanup (incremental repack, gc, prune, verify, branches, stash) |
/git:deadbranch | Survey and clean up stale branches via the deadbranch CLI — dry-run preview, TUI or non-interactive delete, recoverable backups |
/git:derive-docs | Analyze git history to derive undocumented rules, PRDs, ADRs, and PRPs |
/git:upstream-pr | Submit clean PRs to upstream repositories from fork work |
/git:upstream-pr-diverged | Heavy-divergence fork-to-upstream PR workflow — patch-id eligibility, re-derive fallback, commit-message scrubbing, pre-flight regression check |
/git:upstream-fix-check | Check whether a bug in vendored, tarball-installed, or forked code is already fixed upstream before patching it — gh api contents lookups, stale-repo read, and when to skip the check |
/git:coworker-check | Detect another agent working in the same repo clone before destructive git ops |
/git:repo-delete-check | Verify a repo's work survives deletion — remote, unpushed commits, stashes — then offer a push or tar backup |
/git:pr-sync-check | Check whether the current PR branch is still live and in sync (merged / behind / changes-requested) before building on it |
/git:pr-watch | Subscribe to a PR's activity and react to review comments and CI as they arrive (fixes CI via /git:fix-pr; surfaces review threads for the user to run /git:pr-feedback) |
Layered Skills (Composable Git Workflows)
Three composable skills that can be invoked individually or combined based on user intent:
| Skill | Trigger Phrases | Description |
|---|---|---|
git-commit | "commit", "save my work", "stage and commit" | Local commits only: stage, write a conventional message, run pre-commit, commit |
git-push | "push", "send to remote", "update remote" | Existing commits only: push with upstream tracking and --force-with-lease |
git-pr | "create PR", "open pull request", "submit for review" | From an already-pushed branch: open the PR with body, labels, reviewers and issue refs |
Composability
| User Intent | Skills Invoked |
|---|---|
| "commit" | git-commit |
| "commit and push" | git-commit → git-push |
| "push and create PR" | git-push → git-pr |
| "commit, push, and create PR" | git-commit → git-push → git-pr |
Reference Skills
| Skill | Description |
|---|---|
git-branch-naming | Branch names: type prefix (feat/, fix/, chore/), issue number, kebab-case |
git-cli-agentic | Machine-readable git output for scripts — status --porcelain=v2, diff --numstat, log --format, ahead/behind counts; not for making commits |
gh-cli-agentic | GitHub CLI commands optimized for AI agents with JSON output |
gh-workflow-monitoring | Watch GitHub Actions runs with blocking commands (no polling/timeouts) |
git-commit-workflow | Commit-message and staging conventions (type/scope/subject, logical grouping, explicit-path staging); makes no commit |
git-commit-trailers | Commit trailer conventions — release-please trailers (BREAKING CHANGE, Release-As), attribution (Co-authored-by, Signed-off-by), git interpret-trailers |
git-branch-pr-workflow | Git branching and PR workflow patterns |
git-rebase-patterns | Advanced rebase techniques (--reapply-cherry-picks, --update-refs, --onto, stacked PRs) |
git-stacked-prs | GitHub native stacked PRs via the gh stack extension — lifecycle, sync/rebase cascade, exit codes, and how a registered stack differs from an ad-hoc PR chain |
git-merge-hazards | Traps in GitHub's merge machinery — squash-merge detection authority order, stacked-base auto-close and the no-force merge-main route, push-by-SHA races and the refs/heads/ refspec form, merging over red CI, negated closing keywords, and merge-chain.sh, which waits for CI, merges an ordered PR list and stops on a conflict or red CI |
git-merge-driver | Custom git merge drivers — the .gitattributes/git-config split, the %O %A %B exit-code contract, design rules for a structural JSON merge, per-clone registration, and testing through a real merge with an unregistered control |
git-local-hazards | Local git traps where exit 0 lies — commits orphaned after a squash-merge, stray local-main commits, duplicate additions from a clean merge, atomic git add, a "vanished" staged file, recovering reset --hard from a pre-commit stash |
external-pr-trust | Authorship as a precondition of merging — bot vs stranger classification across gh subcommands, what a merge executes, the merge-guard hook, one literal PR number per gh pr merge |
github-comment-content | What a PR or issue comment should say — cut every fact the GitHub page already renders, keep what it cannot show |
git-repo-detection | Detect GitHub repository name and owner from git remotes |
git-security-checks | gitleaks secret scanning and .gitleaks.toml allowlists — including why the hook ignores --files and has to be run after staging |
git-issue-scoping | Read an issue's full comment thread and re-verify its cited file:line evidence at HEAD before scoping a PR or plan |
upstream-pr-contribution | Read CONTRIBUTING.md and the PR template in full before an upstream PR — the issue-first and no-AI-walls-of-text gates live below the fold and are enforced by bots on a timer |
worktree-stale-base-merge | A parallel worktree-agent branch's green CI is about a main that no longer exists — merge-base equality as the gate, and the update-branch vs rebase choice |
github-issue-autodetect | Fixes/Closes/Refs keywords for a change — match the staged diff against open issues by path, label and title |
github-issue-writing | Create well-structured GitHub issues with clear titles and acceptance criteria |
github-labels | Discover and apply labels to GitHub PRs and issues; the type / build: / area: / core: / needs: taxonomy, who sets and clears needs: and blocked, and scripts/issue-labels.py (provision, classify, validate, unblock, audit) |
github-pr-title | PR title only — the type(scope): subject line that squash-merge lands and release-please parses |
git-derive-docs | Derive undocumented rules, PRDs, ADRs, PRPs from git commit history |
release-please-configuration | Release-please monorepo strategy — component tags, per-package extra-files, tag migration (single-repo standards live in configure-plugin) |
release-please-protection | Prevent manual edits to release-please managed files, and keep generated artifacts from depending on them |
release-please-pr-workflow | Batch merge release-please PRs with conflict handling |
git-fork-workflow | Fork management, upstream sync, divergence detection, cross-fork PRs |
Invocation
Most skills here are catalog-present: Claude can offer them when the situation
matches their description. A few carry disable-model-invocation: true, which
removes the skill from the catalog entirely — it is then reachable only when the
user types /git-plugin:<name>.
The rule this plugin applies:
- Keep the flag when the skill performs a chained or irreversible mutation the user should consciously trigger, or takes a required argument the model would otherwise have to invent.
- Drop the flag when the skill is reactive to a repo state the model can observe for itself, and a user would reasonably expect it offered without knowing its name.
| Skill | disable-model-invocation | Why |
|---|---|---|
git-api-pr | keep | Requires <file...> and a --title the model would have to invent; creates a remote branch and PR with no local commit to review first |
git-commit-push-pr | keep | Chained mutation — commit, push, and PR creation in one non-interactive pass |
git-conflicts | removed | Reactive to a conflicted tree the model already observes; user phrasings ("fix the merge conflicts") match its description almost verbatim |
git-derive-docs | keep | Bulk generative writer over .claude/rules/ and docs/; needs an explicit --rules/--prd/--adr/--prp mode |
git-fix-pr | removed | Reactive to a red PR check the model already observes when it reads CI status |
git-issue | keep | Takes a required issue reference, then branches, implements, and opens a PR; --parallel fans out subagents. Invoked by hand as /git-plugin:git-issue <number> |
git-maintain | keep | Destructive maintenance — gc, repack, branch pruning, stash deletion, git rm |
git-pr-feedback | keep | Posts replies and resolves threads on reviewers' PRs by default, and can open follow-up issues; --all fans out worktree subagents that push. Catalog-present skills must therefore recommend it rather than delegate to it — enforced marketplace-wide by scripts/check-delegation-reachability.sh since #2483 |
git-upstream-pr | keep | Cherry-picks, resets, and pushes to a fork, then opens a PR against a third-party upstream |
Agent
| Agent | Description |
|---|---|
commit-review | Commit message review and validation |
Hooks
| Hook | Event | Purpose |
|---|---|---|
validate-pr-issue-links.sh | PreToolUse (Bash) | Enforce issue-closing links on PR creation |
prompt hook (inline in hooks.json) | PreToolUse (mcp__github__create_pull_request) | Block a bug-fix or feature PR whose body has no Closes/Fixes/Resolves #N. A line No linked issue: <reason> lets a PR with no issue through, so nobody files an issue only for the PR to close (#3404). A non-closing reference (Refs #N, Part of #N, Related to #N, also owner/repo#N) also passes, so one PR of a multi-PR issue links it without closing it early (#3413). Guard: scripts/check-pr-issue-link-prompt.sh --strict |
check-pr-metadata-on-push.sh | PreToolUse (Bash) | Remind to align PR title/body with commits before push. Fires only for an OPEN PR — a branch whose PR is MERGED or CLOSED pushes through, since finished metadata is a historical record |
check-branch-sync-on-push.sh | PreToolUse (Bash) | Nudge (ask) before commit/push when the branch is behind origin or its PR is merged/closed. Evaluates the push refspec destination (<sha>:refs/heads/<other>), not HEAD — falling back to HEAD when the destination is ambiguous (multi-refspec) or still carries a shell metacharacter (git push -u origin $(git branch --show-current)), which would otherwise silence the hook; skips the behind-nudge for a force-push lease-pinned to the fetched origin tip (--force-with-lease=<branch>:<sha>) and drops the git pull --rebase advice on any other force-push (#2672). Cached per session+branch; opt out with CLAUDE_HOOKS_DISABLE_BRANCH_SYNC=1, tune TTL with CLAUDE_HOOKS_BRANCH_SYNC_TTL |
check-pr-merge-method.sh | PreToolUse (Bash) | Block a gh pr merge --squash/--rebase/--merge whose method disagrees with scripts/pr-merge-method.py (rule table: merge-strategies.md). The message carries the corrected command; a human-applied merge:squash / merge:rebase label overrides. Fails open when gh or the PR is unreadable |
git-drift-probe.sh | SessionStart | Surface pr_merged / branch_behind / changes_requested drift on the current branch via the consolidated drift nudge (silent on the default branch and without gh). branch_behind counts only remote commits not already on the default branch, so a squash-merged branch left on an unpruned origin/<branch> ref reports an info stale_remote_ref finding suggesting git fetch --prune instead (#3527). Also surfaces worktrees_not_ignored on any branch, the default one included, when git check-ignore says the main checkout's .claude/worktrees/ (Claude Code's default worktree location) is not ignored, so its worktrees would show up as untracked files (#3436). The finding names /configure:gitignore and a local echo '.claude/worktrees/' >> "$(git rev-parse --git-path info/exclude)"; the probe writes neither. A check-ignore error or a bare repository says nothing. Opt out of that signal alone with CLAUDE_HOOKS_DISABLE_WORKTREES_IGNORE_NUDGE=1 (CLAUDE_HOOKS_DISABLE_DRIFT_NUDGE=1 silences the whole drift nudge). Tests: bash git-plugin/hooks/test-git-drift-probe.sh |
The four PreToolUse hooks decide whether the command runs gh pr create,
gh pr merge, git push or git commit on parsed command nodes (ast-grep --lang bash, via
hooks/lib/parsed-commands.sh), so a quoted argument, heredoc body, commit
message or comment that only mentions one does not fire them; wrappers
(env, sudo, timeout, FOO=1), git -C <dir> / git global options,
$(…), loops and bash -c '…' scripts still do (#2737). Without ast-grep
they fall back to the original raw-text match.
The branch-sync hook + probe pair with the /git:pr-sync-check skill as the
PR-branch-sync guard trio — see .claude/rules/pr-branch-sync.md.
Workflow Examples
Complete Commit Workflow
/git:commit --push --pr
Analyzes changes, creates logical commits with conventional messages, pushes to remote, and creates a pull request.
Process GitHub Issues
/git:issue # Interactive mode - select issues
/git:issue 123 # Process single issue
/git:issue 123 456 789 # Process multiple issues
/git:issue --auto # Claude selects and prioritizes
/git:issue --parallel # Process parallel groups simultaneously
Analyzes issues for conflicts and dependencies, implements fixes with TDD workflow, and creates PRs.
Manage Sub-Issues and Dependencies
/git:issue-hierarchy 42 --status # Show sub-issue progress
/git:issue-hierarchy 42 --add 43 44 45 # Add sub-issues to parent
/git:issue-hierarchy 42 --create "Add tests for auth" # Create new sub-issue
/git:issue-hierarchy 42 --deps # Blocked-by + blocking + sub-issue graph
/git:issue-hierarchy 42 --blocked-by 40 # Mark #42 as blocked by #40 (native API)
/git:issue-hierarchy 42 --block 50 # Mark #50 as blocked by #42
/git:issue-hierarchy 42 --blocking # List what #42 currently blocks
/git:issue-hierarchy 42 --unblock 40 # Remove the dependency between #42 and #40
Manages parent-child issue relationships and dependency tracking using GitHub's sub-issues and native issue-dependencies APIs (the same endpoints that power the sidebar "Relationships" panel and the "Blocked" badge on project boards).
When to use which link type:
| Relationship | Command | Use for |
|---|---|---|
| Sub-issue | --add N / --create "..." | Composition — child is part of parent's scope |
| Blocked by | --blocked-by N | Hard ordering — parent can't start until N closes |
| Blocks | --block N | Hard ordering (inverse) — N can't start until parent closes |
| Related to | Plain body text | Soft cross-reference; no lifecycle coupling |
Issue Administration
/git:issue-manage transfer 42 other-repo # Transfer issue
/git:issue-manage pin 42 43 # Pin important issues
/git:issue-manage lock 42 --reason resolved # Lock resolved discussions
/git:issue-manage develop 42 --checkout # Create branch from issue
/git:issue-manage bulk close 100 101 102 # Bulk close issues
/git:issue-manage fields 42 --list # List custom field values
Administrative operations including transfer, pin/unpin, lock/unlock, branch creation, bulk operations, and custom field management.
Fix Failing PR
/git:fix-pr 456 --auto-fix --push
Analyzes PR #456 check failures and attempts automatic fixes.
Address PR Feedback
/git:pr-feedback # Use current branch's PR
/git:pr-feedback 789 # Review PR #789 feedback
/git:pr-feedback 789 --push # Address feedback and push fixes
Reviews PR workflow results and reviewer comments, categorizes feedback (blocking, substantive, suggestions), and systematically addresses actionable items.
Derive Documentation from History
/git:derive-docs --all # Full analysis (rules, PRD, ADR, PRP)
/git:derive-docs --rules # Only derive .claude/rules/
/git:derive-docs --adr --since=2025-06-01 # ADRs from recent history
/git:derive-docs --all --dry-run # Report gaps without creating files
/git:derive-docs --refinements # Focus on plan refinement detection
Analyzes commit history to find undocumented conventions, features, architecture decisions, and plan refinements.
Resolve Merge Conflicts
/git:conflicts # Resolve conflicts in current merge/rebase
/git:conflicts 123 # Fetch base branch for PR #123 and resolve
/git:conflicts --theirs # Accept all incoming changes
/git:conflicts --push # Push after resolving
Configures zdiff3 conflict markers and rerere, then resolves each conflict intelligently or accepts one side wholesale.
Submit PR to Upstream from Fork
/git:upstream-pr # Interactive commit selection
/git:upstream-pr --commits abc123,def456 # Specific commits
/git:upstream-pr --branch feat/my-fix --draft # Named branch, draft PR
/git:upstream-pr --dry-run # Preview without changes
Cherry-picks selected commits onto a clean branch from upstream/main, squashes them, and creates a cross-fork PR.
Repository Maintenance
/git:maintain --all
Runs full repository maintenance: prune remote branches, garbage collection, verify integrity.
Installation
/plugin install git-plugin@laurigates-claude-plugins
Recommended Project Settings
For seamless command execution without permission prompts, add these permissions to your project's .claude/settings.json:
{
"permissions": {
"allow": [
"Bash(gh pr *)",
"Bash(gh run *)",
"Bash(gh issue *)",
"Bash(gh repo *)",
"Bash(gh api *)",
"Bash(gh label *)",
"Bash(gh workflow *)",
"Bash(git status *)",
"Bash(git diff *)",
"Bash(git log *)",
"Bash(git add *)",
"Bash(git commit *)",
"Bash(git push *)",
"Bash(git pull *)",
"Bash(git branch *)",
"Bash(git switch *)",
"Bash(git remote *)",
"Bash(git stash *)",
"Bash(git restore *)",
"Bash(git gc *)",
"Bash(git prune *)",
"Bash(git fsck *)",
"Bash(pre-commit *)",
"Bash(gitleaks *)"
]
}
}
This enables:
- Git operations: status, diff, log, add, commit, push, branch management
- GitHub CLI: PR checks, run viewing, issue management, workflow triggers
- Security: pre-commit hooks and secret detection
Agentic Optimization
Commands use machine-readable output formats:
| Tool | Format | Example |
|---|---|---|
| Git status | Porcelain v2 | git status --porcelain=v2 --branch |
| Git diff | Numstat | git diff --numstat |
| Git log | Custom format | git log --format='%h %s' -n 10 |
| GH CLI | JSON + jq | gh pr checks $N --json name,state,conclusion |
See the git-cli-agentic and gh-cli-agentic skills for complete reference.
License
MIT
Details
- Marketplace
- laurigates/claude-plugins
- Source
- git-plugin
- Author
- Lauri Gates
- Category
- Development
- License
- MIT
- Keywords
- git, github, commits, branches, pull-requests, merge-conflicts, conflict-resolution, version-control, sub-issues, issue-dependencies, blocked-by, blocking, issue-hierarchy, issue-management, issue-types, custom-fields, fork, upstream
- Listed since
- Apr 7, 2026
More from laurigates/claude-plugins
All 52- github-actions-pluginv1.13.8
- health-pluginv1.24.9
- home-assistant-pluginv1.4.1
- hooks-pluginv2.22.3
- kernel-pluginv1.1.1
- kitty-pluginv2.0.0
- kubernetes-pluginv1.10.4
- langchain-pluginv1.5.10
- linux-pluginv1.1.1
- macos-pluginv2.0.1
- migration-patterns-pluginv1.7.1
- networking-pluginv1.4.3
- obsidian-pluginv1.3.8
- project-pluginv1.21.17
- prompt-engineering-pluginv1.1.4
- prose-pluginv1.4.5
- python-pluginv1.5.10
- reverse-engineering-pluginv1.1.0
- rust-pluginv1.9.1
- session-pluginv1.18.3
- software-design-pluginv1.2.0
- taskwarrior-pluginv1.16.4
- terraform-pluginv1.7.13
- testing-pluginv3.27.2
Similar to git-plugin
More Git & Releases
github-devfcakyon/claude-codex-settings1.2K starsWrite clear issues, commits, and PRs, review code, and resolve feedback.
git-workflowdavila7/claude-code-templates24.2K starsGit workflow automation: feature, release, and hotfix commands with git specialists
commands-version-control-gitdavepoon/buildwithclaude3.8K starsCommands for Git operations, commits, and PRs
github-and-gitoaustegard/claude-skills415 starsGitHub repository access, CLI operations, indexing, and git workflow tools.
sanctumathola/claude-night-market350 starsGit workflows: commit messages, PR preparation, documentation updates, version management, sessions, and deferred-item capture
git-chaindashed/claude-marketplace27 starsManage and rebase chains of dependent Git branches (stacked branches). Use when working with multiple dependent PRs, feature branches that build on each other,