Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aj-geddes/useful-ai-prompts --skill git-workflow-strategy -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/git-workflow-strategy/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/git-workflow-strategy/

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

Similar skills

All skills for Git and GitHub →

From the same set118

nosql-database-design Guides the agent through NoSQL schema work: MongoDB collections, DynamoDB tables, embedding vs referencing, indexes. Useful before the schema hardens in code. CX Codex +1 486installs database-indexing-strategy A skill for planning indexes: picks the type, builds composite and partial ones, covers maintenance. Useful when queries slow down. CX Codex +1 486installs uptime-monitoring A skill that walks your coding agent through uptime checks, a public status page and incident tracking. Useful when you need to know which dependency actually broke. CX Codex +1 484installs api-response-optimization A coding-agent skill that trims payloads, adds caching and compression, and gives you a checklist for slow API endpoints. CX Codex +1 484installs background-job-processing A skill for wiring up background job processing: task queues, workers, scheduling and retries. Useful when emails, reports or large exports should not block the request path. CX Codex +1 483installs accessibility-compliance This skill guides accessibility work for WCAG 2.1/2.2, keyboard navigation, screen readers and a11y checks in web interfaces. CX Codex +1 482installs web-performance-optimization A skill for speeding up web apps: code splitting, lazy loading, caching, compression and monitoring. Useful when pages load slowly. CX Codex +1 482installs frontend-state-management A skill that guides your agent through frontend state management: Redux, MobX, Zustand or the Context API. CX Codex +1 480installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor