git-workflow
Git workflow skill that guides branching, Conventional Commits, and PR merges for teams and CI pipelines.
- CCM score
- 56 of 100
- GitHub stars
- 96
Own this plugin? Claim it
What it does
- Adds a
/pr-finishcommand and a skill covering Git Flow, GitHub Flow, trunk-based development, and Conventional Commits - Covers the full PR cycle: preflight merge checks, rebase, local CI fixes, review-thread resolution, and merge
- Enforces Conventional Commit types with a
hooks.jsonhook that validates commit messages - Designed for teams using GitHub Actions or GitLab CI who want consistent branching and commit hygiene
Git workflow best practices for teams and CI/CD pipelines. Covers Git Flow, GitHub Flow, Trunk-based development, Conventional Commits, pull request workflows, and GitHub Actions integration. By Netresearch.
Add marketplace
/plugin marketplace add netresearch/claude-code-marketplaceRun it inside Claude Code once, then install the plugin below.
Install
/plugin install git-workflow@netresearch-claude-code-marketplaceRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceGit Workflow Skill
Not Here
Releases: github-release. BLOCKED-PR diagnosis: github-project.
GitHub first. pr-status.sh also reads a GitLab merge request (-R host/group/project <iid>, needs glab) and prints the glab merge command; pr-merge.sh, pr-sweep.sh, the merge gate and review-thread handling speak GitHub only. For the rest of a GitLab merge request the glab calls are in references/pull-request-workflow.md § GitLab: the same gate with glab.
Critical Rules (Non-Negotiable)
- No direct push to main — always open a PR.
- No merge before all threads resolved (
references/pull-request-workflow.md). - No squash unless asked — preserves atomic commits, signatures, bisection.
- No "tested/verified/working" without pasted command output — else say so.
- No edits to installed skill/plugin cache paths (
~/.claude/skills/,~/.claude/plugins/cache/,**/.bare/**) — always the repo worktree, verified bypwd. - Force-push only with
--force-with-lease— never plain--force. - Commit before rebase —
add → commit → fetch → rebase → push(a dirty tree aborts it). - No editorializing — state what changed, not how good it is (
references/no-editorializing.md).
Reference Files
| Reference | Content Triggers |
|---|---|
references/merge-dependencies.md | Prerequisite discovery, stacked PR/MR safeguards, GitLab CE discussion gates and native dependencies |
references/commit-conventions.md | Conventional commits, DCO sign-off |
references/pull-request-workflow.md | PR merge gate, signed rebase, posting a review with inline suggestions, writing or updating the PR body, merging a stack, sibling PRs that change checks or output |
references/ci-cd-integration.md | CI watching, git mirrors |
references/advanced-git.md | Rebase (incl. non-interactive rebase -i), cherry-pick, bisect, stash, worktrees, reflog, hanging push/fetch (SSH mux), parsing git output in a script (flags that pin diff/log/status output against user config), fetching one branch in a single-branch clone (refspec) |
references/github-releases.md | → github-release skill |
references/git-hooks-setup.md | Hook frameworks, hooks per stage, tests that a hook starts touching the real repository |
references/claude-code-hooks.md | settings.json merge gate, cache-path rejection, auto-lint |
references/code-quality-tools.md | shellcheck, shfmt, git-absorb, difftastic |
references/merge-gate-watcher.md | Waiting on a gate, a hand-rolled watch loop, a watch that returns at once, a watcher the harness killed, merge-driver loop, check taxonomy, stale-SHA rerun, rerun of a superseded run cancelling the newer one, merge-queue entry dropped or stuck in AWAITING_CHECKS |
references/spec-cleanup.md | Planning artifacts off the base branch |
references/no-editorializing.md | No self-praise, no narrating the expected |
Conventional Commits
<type>[scope]: <description>
feat MINOR, fix PATCH; full type list and DCO sign-off in references/commit-conventions.md.
Breaking: ! after type, or BREAKING CHANGE: in the footer.
Branches: feature/TICKET-123-description, release/1.2.0
Hook Detection
found=$(ls lefthook.yml .lefthook.yml captainhook.json Build/captainhook.json .pre-commit-config.yaml .husky/pre-commit 2>/dev/null)
[ -n "$found" ] && echo "$found" || echo "No hooks"
Install commands per framework: references/git-hooks-setup.md.
Dependency preflight
When creating, reviewing or preparing to merge, proactively check linked work,
discussions and code for prerequisites. Read references/merge-dependencies.md
when one is found: distinguish a review stack from an enforced merge gate,
check platform capabilities, and propose or apply a suitable safeguard within
the task's authorization. Do not leave a known dependency as a plain comment
and call it protected.
PR Merge Requirements
Before merging: threads resolved, CI green (incl. annotations), rebased, signed, and reviewed on the current head — by a human, a bot, or the author through pr-merge.sh --self-reviewed. A review is mandatory; a bot review is not, and one is waited for only while it is actually in flight. Rebase-only + signed: git merge --ff-only.
Verification
./scripts/verify-git-workflow.sh /path/to/repository
# Gate state, next action:
./scripts/pr-status.sh [-R owner/repo | -R host/group/project] [PR] [--json] [--watch] [--stuck-after MIN] [--threads]
# Merge; refuses when the gate is shut:
./scripts/pr-merge.sh [-R owner/repo] [PR] [--dry-run|--self-reviewed|--retarget-stacked] [--wait [--interval SEC] [--max-wait SEC] [--request-coderabbit]]
# Many PRs (`owner/repo N` per line) to merge; stops on any NEXT it does not handle:
./scripts/pr-sweep.sh [--interval SEC] [--timeout SEC] [--attention FILE] LISTFILE
# What a repository expects, before the first artifact:
./scripts/repo-contribution-preflight.sh [--repo <dir>] [--section docs|templates|packaging|ci|tools]
# Which copy is installed here (every script answers this):
./scripts/pr-status.sh --version
Contributing: https://github.com/netresearch/git-workflow-skill
Readme
Git Workflow Skill
Expert patterns for Git version control workflows including branching strategies, commit conventions, collaborative workflows, and CI/CD integration.
🔌 Compatibility
This is an Agent Skill following the open standard originally developed by Anthropic and released for cross-platform use.
Supported Platforms:
- ✅ Claude Code (Anthropic)
- ✅ Cursor
- ✅ GitHub Copilot
- ✅ Other skills-compatible AI agents
Skills are portable packages of procedural knowledge that work across any AI agent supporting the Agent Skills specification.
Features
- Branching Strategies: Git Flow (feature/release/hotfix branches), GitHub Flow (simple feature branches), trunk-based development, release management patterns
- Commit Conventions: Conventional Commits standard, semantic versioning integration, commit message best practices, atomic commit patterns
- Collaborative Workflows: Pull request best practices, code review processes, merge strategies (merge, squash, rebase), conflict resolution patterns
- CI/CD Integration: GitHub Actions workflows, GitLab CI patterns, branch protection rules, automated versioning
- Git Hooks: Pre-commit hooks for linting and testing, commit message validation
- Advanced Operations: Interactive rebase, cherry-picking, stashing, reflog recovery
Installation
Marketplace (Recommended)
Add the Netresearch marketplace once, then browse and install skills:
# Claude Code
/plugin marketplace add netresearch/claude-code-marketplace
/plugin install git-workflow@netresearch-claude-code-marketplace
Without a marketplace
Since Claude Code 2.1.157 a plugin directory under your personal skills directory loads on its own, including the hooks and commands this repo ships:
mkdir -p ~/.claude/skills
git clone https://github.com/netresearch/git-workflow-skill.git \
~/.claude/skills/git-workflow
It loads as git-workflow@skills-dir on the next session. Update with git -C ~/.claude/skills/git-workflow pull and start a new session; remove it by deleting the directory. This route has no claude plugin update.
npx (skills.sh)
Install with any Agent Skills-compatible agent:
npx skills add https://github.com/netresearch/git-workflow-skill --skill git-workflow
Limitation:
npx skillsinstallsSKILL.md-based skills only. This repo also shipshooks,commands, which it does not install — use the marketplace or the skills directory for those.
Download Release
Download the latest release and extract to your agent's skills directory.
Git Clone
git clone https://github.com/netresearch/git-workflow-skill.git
Composer (PHP Projects)
composer require netresearch/git-workflow-skill
Requires netresearch/composer-agent-skill-plugin.
npm (Node Projects)
npm install --save-dev \
@netresearch/agent-skill-coordinator \
github:netresearch/git-workflow-skill
Requires @netresearch/agent-skill-coordinator, which discovers the skill in node_modules and registers it in AGENTS.md via a postinstall hook. For pnpm, also allowlist the coordinator's postinstall:
{
"pnpm": {
"onlyBuiltDependencies": ["@netresearch/agent-skill-coordinator"]
}
}
Usage
This skill is automatically triggered when:
- Establishing branching strategies (Git Flow, GitHub Flow, Trunk-based)
- Implementing Conventional Commits for semantic versioning
- Configuring pull request workflows
- Integrating Git with CI/CD systems
- Setting up Git hooks for quality gates
- Resolving merge conflicts
- Configuring branch protection rules
Example queries:
- "Set up Git Flow workflow"
- "Configure conventional commits with semantic versioning"
- "Create GitHub Actions workflow for CI/CD"
- "Set up pre-commit hooks for linting"
- "Configure branch protection rules"
- "Implement pull request review process"
Commands
/pr-finish [PR]— drive a pull request to a fully-green, merged state: preflight the merge gate in one block, rebase, fix CI locally, reply to and resolve every review thread, update the title/description, and merge when green. Operates on the named PR or the current branch's PR.
Structure
git-workflow-skill/ # abbreviated — key files only
├── skills/git-workflow/
│ ├── SKILL.md # Skill metadata and core patterns
│ ├── ... # checkpoints.yaml, evals/, hooks
│ └── references/
│ ├── commit-conventions.md # Commit message standards
│ ├── pull-request-workflow.md # PR and review processes
│ ├── ci-cd-integration.md # CI watching, git mirrors
│ └── advanced-git.md # Advanced Git operations
├── commands/
│ └── pr-finish.md # /pr-finish slash command
└── scripts/
└── verify-harness.sh # Harness verification script
Expertise Areas
Commit Conventions
- Conventional Commits standard
- Semantic versioning mapping (
feat/fix/etc.) - Signed commits + DCO sign-off
- Atomic commit patterns
Collaborative Workflows
- Default-branch check before PR/scripting operations
- Atomic commits, no squash unless asked
- Merge strategies, review-thread resolution, merge gate
- Conflict resolution patterns
CI/CD Integration
- Watching CI from the CLI (
gh pr checks,gh run watch) - Git mirror repository sync (
git push --mirrorgotchas)
Conventional Commits Format
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Types:
feat: New feature (MINOR version bump)fix: Bug fix (PATCH version bump)docs: Documentation onlystyle: Code style (formatting, no logic change)refactor: Code refactoringperf: Performance improvementstest: Adding/updating testsbuild: Build system changesci: CI configuration changeschore: Maintenance tasksrevert: Reverting changes
Breaking Changes:
feat!: remove deprecated API endpoints
BREAKING CHANGE: The /api/v1/users endpoint has been removed.
Use /api/v2/users instead.
Quick Reference
Daily Workflow
# Start of day
git checkout main && git pull
git checkout -b feature/my-feature
# During development
git add -p # Stage hunks interactively
git commit -m "feat: ..." # Commit with conventional message
# Ready for review
git push -u origin HEAD
gh pr create
# After merge
git checkout main && git pull
git branch -d feature/my-feature
Emergency Fixes
# Undo last commit (keep changes)
git reset --soft HEAD~1
# Undo last commit (discard changes)
git reset --hard HEAD~1
# Revert a specific commit
git revert <commit-hash>
# Fix last commit message
git commit --amend -m "new message"
# Fix last commit (add forgotten file)
git add forgotten-file.txt
git commit --amend --no-edit
Related Skills
- enterprise-readiness-skill: Git workflow is part of CI/CD maturity
- security-audit-skill: Git hooks for security checks
Governance and policies
This repository follows the organisation-wide policies of Netresearch:
- Governance: roles, how changes are decided and how disputes are settled.
- Roadmap: planned and excluded work for the coming year.
- Handling of dependency and code analysis findings: which findings block a pull request, remediation times and how exceptions are recorded.
- Secret management: where CI and release secrets are stored, who can access them and when they are rotated.
- Access roster: the accounts that hold admin, maintain and write access to this repository.
What this repository does to be secure, and what it does not promise, is set out in the security assurance case.
Checks that run on pull requests in this repository:
- On every pull request: Skill Validation (
lint.yml), Eval Validation (eval-validate.yml), Skill Tests (tests.yml) and Hook Script Tests (hook-tests.yml). - On pull requests to
main, additionally: CodeQL for GitHub Actions and Python with thesecurity-and-qualityqueries, Betterleaks secret scanning, zizmor workflow analysis, dependency review (fails on high or critical vulnerabilities), Composer Audit and Opengrep SAST (failure threshold: organisation SAST rule), all fromsecurity.yml; Harness Verification (harness-verify.yml) and Template Drift (check-template-drift.yml).
License
This project uses split licensing:
- Code (scripts, workflows, configs): MIT
- Content (skill definitions, documentation, references): CC-BY-SA-4.0
See the individual license files for full terms.
Credits
Developed and maintained by Netresearch DTT GmbH.
Made with ❤️ for Open Source by Netresearch
Details
- Marketplace
- netresearch/claude-code-marketplace
- Source
- netresearch/git-workflow-skill
- Category
- Development
- Listed since
- Apr 7, 2026
Questions
What does the git-workflow plugin add to Claude Code?
The git-workflow plugin adds Git workflow guidance covering Git Flow, GitHub Flow, trunk-based development, Conventional Commits, pull request workflows and GitHub Actions integration. It also ships the /pr-finish command, which drives a pull request to a fully green, merged state.
How do I install the git-workflow plugin in Claude Code?
Run /plugin marketplace add netresearch/claude-code-marketplace first, then /plugin install git-workflow@netresearch-claude-code-marketplace. The second command adds git-workflow's branching, commit and CI guidance to your Claude Code setup.
Which Git branching strategies does git-workflow cover?
The git-workflow plugin covers Git Flow with feature, release and hotfix branches, GitHub Flow with simple feature branches, and trunk-based development. It also covers release management patterns for each.
What does the /pr-finish command in git-workflow do?
The /pr-finish command preflights the merge gate, rebases, fixes CI locally, replies to and resolves review threads, and merges once green. It works on a named PR or on the current branch's PR.
Can git-workflow be used with agents other than Claude Code?
Yes, the git-workflow plugin follows the open Agent Skills standard and its README lists Cursor and GitHub Copilot as supported platforms. Note that npx skills installs only its SKILL.md skill, not its hooks or commands.
More from netresearch/claude-code-marketplace
All 40- github-project
- github-release
- go-development
- jira-integration
- jujutsu-workflow
- markdown-to-pdf
- matrix-communication
- orocommerce
- peer-qa-review
- php-modernization
- php-structured-edit
- retro
- security-audit
- skill-repo
- typo3-a11y
- typo3-ckeditor5
- typo3-conformance
- typo3-core-contributions
- typo3-ddev
- typo3-docs
- typo3-extension-upgrade
- typo3-project-upgrade
- typo3-site-conformance
- typo3-testing
Similar to git-workflow
More Git & Releasesgithub-workflowSkillmindrally/skills829 installsGitHub best practices for pull requests, code reviews, issues, Actions, and repository settings.
githubSkillcallstackincubator/agent-skills9.7K installsGuide to GitHub workflows with the gh CLI for pull requests, branching, and repository automation.
github-projectPluginnetresearch/claude-code-marketplace96 starsGitHub repository setup and platform-specific features. Branch protection, CODEOWNERS, Issues/Discussions/Projects, PR review workflows with conversation resolu
gitPluginopenshift-eng/ai-helpers123 starsGit Plugin
git-pr-workflowsPluginwshobson/agents42.9K starsGit workflow automation, pull request enhancement, and team onboarding processes