Implement Git branching strategies, PR workflows, and release management patterns.

MITAuto-check passedDevelopment

Install Git Workflow

skills CLI
$ npx skills add BagelHole/DevOps-Security-Agent-Skills --skill git-workflow -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install BagelHole/DevOps-Security-Agent-Skills git-workflow --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/BagelHole/DevOps-Security-Agent-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/devops/release/git-workflow .claude/skills/git-workflow && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
git-workflow
GitHub stars
1.1k
Token cost
~2.3k tokens
SKILL.md length
246 words
Files
1
Skills in repo
39
Repo updated
First seen
Licence
MIT

At a glance

Implement Git branching strategies, PR workflows, and release management patterns.

  • Establishing version control workflows
  • SKILL.md covers When to Use This Skill, Prerequisites, Branching Strategies and Commit Conventions, plus 6 more sections
  • Calls git, npm and gh
  • Improving development team collaboration

What it does

Git Workflow is an agent skill from BagelHole/DevOps-Security-Agent-Skills. Implement Git branching strategies, PR workflows, and release management patterns. Configure GitFlow, trunk-based development, or GitHub Flow for team collaboration. Use when establishing version control workflows or improving development team collaboration.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git workflow. It works with Git and GitHub. The repository describes itself as: Agent-ready DevOps, security, infrastructure, and compliance knowledge base with 80+ skills across Kubernetes, Terraform, AWS/Azure/GCP, AI platform operations, container… The licence is MIT.

When your agent uses it

  • Establishing version control workflows
  • Improving development team collaboration

Example prompts

  • “/git-workflow”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit 0365f57. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • npm
    • gh
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, npm, gh and npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Git Workflow loads about 2.3k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 246 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from BagelHole/DevOps-Security-Agent-Skills at commit 0365f57, republished under its MIT licence (© BagelHole). 246 words, ~2,305 tokens.

Download SKILL.mdSave it as .claude/skills/git-workflow/SKILL.md (or your agent's skills folder).
name
git-workflow
description
Implement Git branching strategies, PR workflows, and release management patterns. Configure GitFlow, trunk-based development, or GitHub Flow for team collaboration. Use when establishing version control workflows or improving development team collaboration.
license
MIT
metadata.author
devops-skills
metadata.version
1.0

Git Workflow

Implement effective branching strategies and pull request workflows for team collaboration.

When to Use This Skill

Use this skill when:

  • Establishing team Git workflows
  • Implementing branching strategies
  • Configuring pull request processes
  • Setting up release management
  • Improving code review practices

Prerequisites

  • Git installed
  • Repository hosting (GitHub, GitLab, Bitbucket)
  • Basic Git knowledge

Branching Strategies

Trunk-Based Development

Best for: Continuous deployment, small teams, mature CI/CD

main ─────●─────●─────●─────●─────●─────●─────●
          │     │     │     │     │     │
          └─●   └─●   └─●   └─●   └─●   └─●
         feature branches (short-lived)
bash
# Create short-lived feature branch
git checkout main
git pull origin main
git checkout -b feature/add-login

# Work and commit frequently
git add .
git commit -m "feat: add login form"

# Keep branch updated
git fetch origin
git rebase origin/main

# Merge quickly (same day ideally)
git checkout main
git pull origin main
git merge feature/add-login
git push origin main
git branch -d feature/add-login
GitHub Flow

Best for: Continuous delivery, web applications

main ─────●─────●───────────●─────────────●─────●
          │           ↑           ↑       ↑
          └───●───●───┘           │       │
              feature/login       │       │
                                  │       │
          └───●───●───●───●───────┘       │
              feature/dashboard           │
                                          │
          └───●─────────────────────────┘
              hotfix/security-patch
bash
# Create feature branch from main
git checkout main
git pull origin main
git checkout -b feature/user-dashboard

# Push and create PR
git push -u origin feature/user-dashboard

# After review, merge via PR (squash recommended)
# Delete branch after merge
GitFlow

Best for: Scheduled releases, versioned products

main     ────────●────────────────●──────────────●
                 ↑                ↑              ↑
release  ────────┼────●───●──────┼──────────────┼
                 │    │   │      │              │
develop  ───●────●────┼───●──●───●───●───●───●──┼
            │         │      │       │   │      │
feature  ───┴─────────┘      │       │   │      │
                             │       │   │      │
hotfix   ────────────────────┴───────┼───┼──────┘
                                     │   │
feature  ────────────────────────────┴───┘
bash
# Initialize GitFlow
git flow init

# Start feature
git flow feature start user-auth

# Finish feature (merges to develop)
git flow feature finish user-auth

# Start release
git flow release start 1.0.0

# Finish release (merges to main and develop)
git flow release finish 1.0.0

# Hotfix
git flow hotfix start security-fix
git flow hotfix finish security-fix

Commit Conventions

Conventional Commits
<type>(<scope>): <description>

[optional body]

[optional footer(s)]

Types:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation
  • style: Formatting
  • refactor: Code restructuring
  • test: Adding tests
  • chore: Maintenance

Examples:

bash
git commit -m "feat(auth): add OAuth2 login support"
git commit -m "fix(api): handle null response from payment service"
git commit -m "docs: update API documentation for v2 endpoints"
git commit -m "refactor(db): optimize user query performance"

# Breaking change
git commit -m "feat(api)!: change response format for user endpoint

BREAKING CHANGE: The user endpoint now returns an object instead of array"
Commit Message Template
bash
# Create template file ~/.gitmessage
# Subject line (50 chars max)

# Body (72 chars per line max)
# - What changed
# - Why it changed
# - Any side effects

# Footer
# Fixes #123
# Co-authored-by: Name <email>

# Configure Git to use template
git config --global commit.template ~/.gitmessage

Pull Request Workflow

PR Template
markdown
<!-- .github/pull_request_template.md -->
## Description
Brief description of changes

## Type of Change
- [ ] Bug fix (non-breaking change)
- [ ] New feature (non-breaking change)
- [ ] Breaking change
- [ ] Documentation update

## Testing
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed

## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review performed
- [ ] Documentation updated
- [ ] No new warnings introduced

## Related Issues
Closes #

## Screenshots (if applicable)
Branch Protection Rules
yaml
# GitHub branch protection
branch_protection:
  branch: main
  required_pull_request_reviews:
    required_approving_review_count: 1
    dismiss_stale_reviews: true
    require_code_owner_reviews: true
  required_status_checks:
    strict: true
    contexts:
      - "ci/tests"
      - "ci/lint"
  restrictions:
    users: []
    teams: ["maintainers"]
  enforce_admins: true
  required_linear_history: true
  allow_force_pushes: false
  allow_deletions: false
Code Owners
# .github/CODEOWNERS

# Default owners
* @team-leads

# Frontend code
/src/frontend/ @frontend-team
*.tsx @frontend-team
*.css @frontend-team

# Backend code
/src/api/ @backend-team
/src/services/ @backend-team

# Infrastructure
/terraform/ @platform-team
/k8s/ @platform-team
Dockerfile @platform-team

# Documentation
/docs/ @tech-writers
*.md @tech-writers

Git Hooks

Pre-commit Hook
bash
#!/bin/sh
# .git/hooks/pre-commit

# Run linting
npm run lint
if [ $? -ne 0 ]; then
  echo "Linting failed. Fix errors before committing."
  exit 1
fi

# Run tests
npm run test:unit
if [ $? -ne 0 ]; then
  echo "Tests failed. Fix tests before committing."
  exit 1
fi

# Check for debug statements
if grep -r "console.log\|debugger\|binding.pry" --include="*.js" --include="*.ts" --include="*.rb" src/; then
  echo "Remove debug statements before committing."
  exit 1
fi
Using Husky
json
// package.json
{
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged",
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
    }
  },
  "lint-staged": {
    "*.{js,ts,tsx}": ["eslint --fix", "prettier --write"],
    "*.{css,scss}": ["prettier --write"]
  }
}
Commitlint Configuration
javascript
// commitlint.config.js
module.exports = {
  extends: ['@commitlint/config-conventional'],
  rules: {
    'type-enum': [
      2,
      'always',
      ['feat', 'fix', 'docs', 'style', 'refactor', 'test', 'chore', 'revert']
    ],
    'subject-max-length': [2, 'always', 72],
    'body-max-line-length': [2, 'always', 100]
  }
};

Release Workflow

Automated Release with Tags
bash
# Create annotated tag
git tag -a v1.0.0 -m "Release version 1.0.0"

# Push tag
git push origin v1.0.0

# Create release from tag (GitHub CLI)
gh release create v1.0.0 \
  --title "Release 1.0.0" \
  --notes "Release notes here" \
  --target main
Changelog Generation
bash
# Using conventional-changelog
npx conventional-changelog -p angular -i CHANGELOG.md -s

# Using git-cliff
git cliff -o CHANGELOG.md

Common Git Operations

Rebase vs Merge
bash
# Rebase (clean history)
git checkout feature/my-feature
git rebase main
git push --force-with-lease

# Merge (preserve history)
git checkout main
git merge feature/my-feature

# Squash merge (single commit)
git merge --squash feature/my-feature
git commit -m "feat: add feature X"
Cherry Pick
bash
# Apply specific commit to current branch
git cherry-pick abc123

# Cherry pick range
git cherry-pick abc123..def456

# Cherry pick without committing
git cherry-pick -n abc123
Interactive Rebase
bash
# Clean up last 3 commits
git rebase -i HEAD~3

# In editor:
# pick abc123 First commit
# squash def456 Second commit
# reword ghi789 Third commit

Common Issues

Issue: Merge Conflicts

Problem: Conflicts when merging branches Solution: Rebase frequently, communicate with team, use smaller PRs

Issue: Diverged Branches

Problem: Local branch far behind remote Solution: git pull --rebase or git fetch && git rebase origin/main

Issue: Accidental Commit to Wrong Branch

Problem: Committed to main instead of feature Solution: git reset HEAD~1, checkout correct branch, recommit

Best Practices

  • Keep branches short-lived (< 1 week)
  • Write meaningful commit messages
  • Use PR templates consistently
  • Require code reviews
  • Protect main/master branch
  • Automate checks with CI
  • Squash merge for clean history
  • Delete branches after merge

© BagelHole, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in devops/release/git-workflow of BagelHole/DevOps-Security-Agent-Skills.

Open the folder on GitHubat commit 0365f57

Compare with similar skills

Git Workflow next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Git Workflow compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Git Workflow this skillBagelHole/DevOps-Security-Agent-Skills1.1k—~2.3kAutomated safety check: PassMIT
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0
Release Bumpjamiepine/voicebox57k—~1.1kAutomated safety check: PassMIT
Creating Description For Gh PRredis/jedis12k—~838Automated safety check: PassMIT
Create Pull Request with Work Item IDmakeplane/plane61k—~824Automated safety check: PassAGPL-3.0

Similar skills

  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Release Bump

    jamiepine/voicebox

    Ends a release cycle by moving the Unreleased changelog notes under a dated version heading, bumping version files with bumpversion and tagging the commit.

    57k GitHub stars~1.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Official

    Generate a clear, concise GitHub PR title and description from the diff between two local git branches, and save it to prDescription.md in the repo root.

    12k GitHub stars~838 tokensUpdated today
    DevelopmentAuto-check passed
  • Opens a pull request for the current branch using the repo's template, a work item ID in the title and a description filled in from the actual diff.

    61k GitHub stars~824 tokensUpdated today
    DevelopmentAuto-check passed
  • React Router Pull Request Creator

    remix-run/react-router

    Packages finished React Router work into a draft pull request: branch, commit, push, a written PR body and the right GitHub labels.

    57k GitHub stars~2.5k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from BagelHole/DevOps-Security-Agent-Skills

All 39 skills in this repo
  • Hashicorp Vault

    BagelHole/DevOps-Security-Agent-Skills

    Manage secrets and PKI with HashiCorp Vault. An agent skill from BagelHole/DevOps-Security-Agent-Skills.

    1.1k GitHub stars~2k tokensUpdated 4 mo ago
    Auto-check passed
  • Incident Response

    BagelHole/DevOps-Security-Agent-Skills

    Handle security incidents with IR playbooks and procedures. An agent skill from BagelHole/DevOps-Security-Agent-Skills.

    1.1k GitHub stars~4.5k tokensUpdated 4 mo ago
    Auto-check passed
  • Kubernetes Ops

    BagelHole/DevOps-Security-Agent-Skills

    Deploy, scale, and manage Kubernetes workloads. An agent skill from BagelHole/DevOps-Security-Agent-Skills.

    1.1k GitHub stars~2.3k tokensUpdated 4 mo ago
    Auto-check passed
  • Linux Hardening

    BagelHole/DevOps-Security-Agent-Skills

    Apply CIS benchmarks and secure Linux servers. An agent skill from BagelHole/DevOps-Security-Agent-Skills.

    1.1k GitHub stars~662 tokensUpdated 4 mo ago
    Auto-check: notes
  • Prometheus Grafana

    BagelHole/DevOps-Security-Agent-Skills

    Set up metrics collection and visualization with Prometheus and Grafana.

    1.1k GitHub stars~2.5k tokensUpdated 4 mo ago
    Auto-check passed
  • Vulnerability Scanning

    BagelHole/DevOps-Security-Agent-Skills

    Scan systems and dependencies for CVEs and security vulnerabilities.

    1.1k GitHub stars~2.4k tokensUpdated 4 mo ago
    Auto-check passed

Works with

Categories

Questions about Git Workflow

What does Git Workflow do?

Implement Git branching strategies, PR workflows, and release management patterns. Git Workflow is an agent skill from BagelHole/DevOps-Security-Agent-Skills. Implement Git branching strategies, PR workflows, and release management patterns.

When should I use Git Workflow?

Git Workflow fits situations like: establishing version control workflows; improving development team collaboration.

How do I install Git Workflow in Claude Code?

Run `npx skills add BagelHole/DevOps-Security-Agent-Skills --skill git-workflow -a claude-code`. Or copy the skill folder (devops/release/git-workflow in BagelHole/DevOps-Security-Agent-Skills) into .claude/skills/git-workflow in your project. Claude Code loads it when a task matches its description.

How do I install Git Workflow in Codex?

Run `npx skills add BagelHole/DevOps-Security-Agent-Skills --skill git-workflow -a codex`. Or copy the skill folder (devops/release/git-workflow in BagelHole/DevOps-Security-Agent-Skills) into .agents/skills/git-workflow in your project. Codex loads it when a task matches its description.

Can I use Git Workflow in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add BagelHole/DevOps-Security-Agent-Skills --skill git-workflow -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/git-workflow, .gemini/skills/git-workflow, .github/skills/git-workflow and .opencode/skills/git-workflow in your project.

What does Git Workflow need to run?

Going by SKILL.md and its folder, Git Workflow needs the command-line tools its instructions call (git, npm, gh and npx). Our summary lists: Node.js.

Does Git Workflow access the network?

SKILL.md contains no URLs. Its commands use git, npm, gh and npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Git Workflow safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Git Workflow use?

Git Workflow is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Git Workflow use?

About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Git Workflow?

Skills that share tags, products or a category with Git Workflow: Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars), Create Pull Request (cline/cline, 70k stars), Release Bump (jamiepine/voicebox, 57k stars) and Creating Description For Gh PR (redis/jedis, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Git Workflow?

BagelHole (a GitHub user) maintains it in BagelHole/DevOps-Security-Agent-Skills, which has 1,142 GitHub stars. The repository holds 39 skills in this directory. The repository was last updated on May 22, 2026.

Source: BagelHole/DevOps-Security-Agent-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.