git-workflow-strategy — Claude Code skill: GitFlow and trunk-based
A skill that helps your agent pick a branching model and walk a feature, release or hotfix through the right steps. Useful when the team has no shared branch rules.
npx skills add aj-geddes/useful-ai-prompts --skill git-workflow-strategy -a claude-codeWhat git-workflow-strategy does
The skill covers three models: GitFlow, GitHub Flow and trunk-based development. It ships an agent instruction plus a quick example built on git flow init -d, starting and finishing a feature, a release and a hotfix. Three reference guides sit in references/: GitFlow setup, a merge strategy script, and a collaborative workflow with code review.
Guidance comes as two lists. The agent will push for short-lived feature branches (under 3 days), type prefixes in branch names, review before merging to main, and protection rules on main and release branches. It will also tell you not to commit straight to main, not to keep long-lived branches, not to mix features in one branch, and not to force push to shared branches. For trunk-based development it adds one more: merge without merge commits.
The GitFlow quick start assumes git-flow is installed. Without it the git flow ... commands simply fail, so check that before handing the agent the task. The skill works across Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode, under the MIT license.
What it helps with
- pick a branching model that fits team size and release cycle
- run a feature branch from start to merge
- cut a release with a version bump and changelog
- ship a production hotfix step by step
- set up main branch protection and required review
Example prompts for the agent
- Set up GitFlow in this repo and show me the steps for the first feature
- Which branching strategy fits a five-person team releasing every two weeks?
- Walk me through hotfix 1.0.1 — which commands in what order?
How to install git-workflow-strategy
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill git-workflow-strategy -a claude-code2Manually: put the files in place
~/.claude/skills/git-workflow-strategy/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/git-workflow-strategy/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill git-workflow-strategy -a codex2Manually: put the files in place
.agents/skills/git-workflow-strategy/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill git-workflow-strategy -a cursor2Manually: put the files in place
.cursor/skills/git-workflow-strategy/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aj-geddes/useful-ai-prompts git-workflow-strategy2Manually: put the files in place
.github/skills/git-workflow-strategy/SKILL.md1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill git-workflow-strategy -a gemini-cli2Platform CLI
gemini skills install https://github.com/aj-geddes/useful-ai-prompts --path skills/git-workflow-strategyManually: put the files in place
.devin/skills/git-workflow-strategy/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill git-workflow-strategy -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about git-workflow-strategy
How do I install git-workflow-strategy in Claude?
Run npx skills add aj-geddes/useful-ai-prompts --skill git-workflow-strategy -a claude-code. The skill file lands at ~/.claude/skills/git-workflow-strategy/SKILL.md.
What does git-workflow-strategy do?
It lays out GitFlow, GitHub Flow and trunk-based development along with branch naming, merge and review rules. The agent leans on it when you ask to set up branching or run a release.
Do I need git-flow installed for this skill?
The quick start uses git flow init, git flow feature start and similar commands, so they will not run without git-flow. The other reference guides stick to plain Git commands.
Source text
SKILL.md · MIT
--- name: git-workflow-strategy description: > Master Git workflows including GitFlow, GitHub Flow, Trunk-Based Development. Configure branches, merge strategies, and collaboration patterns for team environments. --- # Git Workflow Strategy ## Table of Contents - [Overview](#overview) - [When to Use](#when-to-use) - [Quick Start](#quick-start) - [Reference Guides](#reference-guides) - [Best Practices](#best-practices) ## Overview Establish efficient Git workflows that support team collaboration, code quality, and deployment readiness through structured branching strategies and merge patterns. ## When to Use - Team collaboration setup - Release management - Feature development coordination - Hotfix procedures - Code review processes - CI/CD integration planning ## Quick Start Minimal working example: ```bash # Initialize GitFlow git flow init -d # Start a feature git flow feature start new-feature # Work on feature git add . git commit -m "feat: implement new feature" git flow feature finish new-feature # Start a release git flow release start 1.0.0 # Update version numbers, changelog git add . git commit -m "chore: bump version to 1.0.0" git flow release finish 1.0.0 # Create hotfix git flow hotfix start 1.0.1 # Fix critical bug git add . git commit -m "fix: critical bug in production" git flow hotfix finish 1.0.1 ``` ## Reference Guides Detailed implementations in the `references/` directory: | Guide | Contents | |---|---| | [GitFlow Workflow Setup](references/gitflow-workflow-setup.md) | GitFlow Workflow Setup, GitHub Flow Workflow, Trunk-Based Development, Git Configuration for Workflows (+1 more) | | [Merge Strategy Script](references/merge-strategy-script.md) | Merge Strategy Script | | [Collaborative Workflow with Code Review](references/collaborative-workflow-with-code-review.md) | Collaborative Workflow with Code Review | ## Best Practices ### ✅ DO - Choose workflow matching team size and release cycle - Keep feature branches short-lived (< 3 days) - Use descriptive branch names with type prefix - Require code review before merging to main - Enforce protection rules on main/release branches - Rebase frequently to minimize conflicts - Write atomic, logical commits - Keep commit messages clear and consistent ### ❌ DON'T - Commit directly to main branch - Create long-lived feature branches - Use vague branch names (dev, test, temp) - Merge without code review - Mix multiple features in one branch - Force push to shared branches - Ignore failing CI checks - Merge with merge commits in TBD
© aj-geddes · MIT · aj-geddes/useful-ai-prompts