Skip to main content
skill CX Codex

git-workflow · mindrally — Claude Code skill: what it does, how to install

Teaches coding agents to apply Conventional Commits, branch naming prefixes, and safe PR merge routines. Useful for keeping repository history consistent.

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

What git-workflow does

This skill guides AI assistants on repository hygiene. It enforces the Conventional Commits specification, covering types such as feat and fix. Commit subjects must stay under 60 characters in the imperative mood. The body uses lowercase letters.

Branch names require kebab-case and prefixes like feature/ or bugfix/. Direct commits to main are prohibited. The workflow relies on rebasing against the primary branch to keep history clean and calls for deleting merged branches locally and remotely.

Direct pushes to main will break this setup, because version bumps depend on structured commit tags linking cleanly to SemVer.

What it helps with

  • format commit messages using the Conventional Commits specification
  • create kebab-case branch names with standard category prefixes
  • set up Git configuration aliases and rebase defaults
  • prepare focused pull request descriptions linked to issue tickets

Example prompts for the agent

  • Commit these authentication changes using Conventional Commits format.
  • Create a branch to fix the login redirect loop following the skill rules.
  • Show the git commands to rebase this branch onto main and resolve conflicts.

How to install git-workflow

1Skills CLI (Vercel)

npx skills add Mindrally/skills --skill git-workflow -a claude-code

2Manually: put the files in place

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

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

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about git-workflow

How do I install git-workflow in Claude Code?

Run npx skills add Mindrally/skills --skill git-workflow -a claude-code. The file will be installed to ~/.claude/skills/git-workflow/SKILL.md.

What does the git-workflow skill do?

It guides the assistant to write atomic Conventional Commits, use dedicated branch prefixes, and follow pull request review practices.

How does git-workflow handle versioning?

It connects Conventional Commits with semantic versioning: fix triggers a patch bump, feat triggers a minor bump, and breaking changes trigger a major bump.

Source text

SKILL.md · Apache-2.0
---
name: git-workflow
description: Git conventions and workflow guidelines using Conventional Commits, branching strategies, and best practices for version control
metadata:
  maintainer: Mindrally
  source: https://github.com/Mindrally/skills
---

# Git Workflow Best Practices

You are an expert in Git version control, following industry best practices for commits, branching, and collaboration workflows.

## Core Principles

- Write clear, atomic commits that address single logical changes
- Follow Conventional Commits specification for all commit messages
- Use feature branches to isolate changes and enable easier code review
- Keep branches short-lived and regularly sync with main branch
- Never commit directly to main/master branch

## Conventional Commits Format

Use the following format for all commit messages:

```
<type>[optional scope]: <description>

[optional body]

[optional footer(s)]
```

### Commit Types

- `feat`: A new feature (correlates with MINOR in SemVer)
- `fix`: A bug fix (correlates with PATCH in SemVer)
- `docs`: Documentation only changes
- `style`: Changes that do not affect the meaning of the code (white-space, formatting)
- `refactor`: A code change that neither fixes a bug nor adds a feature
- `perf`: A code change that improves performance
- `test`: Adding missing tests or correcting existing tests
- `build`: Changes that affect the build system or external dependencies
- `ci`: Changes to CI configuration files and scripts
- `chore`: Other changes that don't modify src or test files
- `revert`: Reverts a previous commit

### Commit Message Guidelines

- Use lowercase letters in the entire body of the commit message
- Keep the commit message title under 60 characters
- Use imperative mood: "Add feature" not "Added feature"
- Explain the *why* behind the change, not just *what* was changed
- Reference related issues or tickets in the footer

### Examples

```
feat(auth): add OAuth2 authentication support

Implement OAuth2 flow for Google and GitHub providers.
This allows users to sign in with their existing accounts.

Closes #123
```

```
fix(api): handle null response from external service

The external API sometimes returns null instead of an empty array.
Added null check to prevent TypeError in downstream processing.

Fixes #456
```

## Branching Strategy

### Branch Naming Conventions

Use descriptive, kebab-case branch names with prefixes:

- `feature/` - New features (e.g., `feature/user-authentication`)
- `bugfix/` - Bug fixes (e.g., `bugfix/login-redirect-loop`)
- `hotfix/` - Urgent production fixes (e.g., `hotfix/security-patch`)
- `release/` - Release preparation (e.g., `release/v2.1.0`)
- `docs/` - Documentation updates (e.g., `docs/api-reference`)
- `refactor/` - Code refactoring (e.g., `refactor/database-layer`)

### Workflow Guidelines

1. **Create feature branches from main/develop**
   ```bash
   git checkout main
   git pull origin main
   git checkout -b feature/new-feature
   ```

2. **Keep branches up-to-date**
   ```bash
   git fetch origin
   git rebase origin/main
   ```

3. **Make atomic commits**
   - Each commit should be a single, logical change
   - Commit early and often when code is in a stable state
   - Avoid mixing unrelated changes in a single commit

4. **Before merging**
   - Ensure all tests pass
   - Squash fixup commits if needed
   - Rebase onto latest main to resolve conflicts

5. **Clean up after merge**
   ```bash
   git branch -d feature/new-feature
   git push origin --delete feature/new-feature
   ```

## Git Configuration Best Practices

### Useful Aliases

```bash
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.lg "log --oneline --graph --decorate"
```

### Recommended Settings

```bash
git config --global pull.rebase true
git config --global fetch.prune true
git config --global diff.colorMoved zebra
```

## Collaboration Guidelines

### Code Review Process

1. Create small, focused pull requests
2. Write clear PR descriptions explaining the changes
3. Link related issues and documentation
4. Request reviews from appropriate team members
5. Address feedback promptly and professionally
6. Squash commits when merging if history is messy

### Merge Strategies

- **Merge commit**: Preserves full history, good for feature branches
- **Squash and merge**: Combines all commits into one, cleaner main history
- **Rebase and merge**: Linear history, requires clean commit history

### Conflict Resolution

1. Pull latest changes from target branch
2. Resolve conflicts locally
3. Test thoroughly after resolution
4. Commit with clear message explaining resolution

## Security Best Practices

- Never commit sensitive data (passwords, API keys, tokens)
- Use `.gitignore` to exclude sensitive files
- Review diffs before committing
- Use signed commits for verified authorship
- Rotate any accidentally committed secrets immediately

## Integration with Semantic Versioning

Conventional Commits integrate well with semantic versioning:

- `feat`: triggers a MINOR version bump
- `fix`: triggers a PATCH version bump
- `BREAKING CHANGE`: triggers a MAJOR version bump

This enables automated version determination and changelog generation.

© Mindrally · Apache-2.0 · Mindrally/skills

Similar skills

All skills for Git and GitHub →

git-workflow by other authors comes first.

git-workflow affaan-m A skill that hands your agent Git conventions: which branching strategy to pick, how to word commits, and when rebase beats merge. CX Codex +1 5,000installs git-workflow agno-team A skill that enforces best practices for commits, branch names, and pull requests. Includes commit message validation, branch naming templates, and PR checklist structure — useful if your team has git standards. CX Codex +1 665installs git-workflow ruvnet A skill that walks branches, conflicts and the pull request lifecycle, with a diff-risk score before every merge. CX Codex +1 743installs git-workflow Galaxy-Dawn Enforces Git standards: Conventional Commits, branch naming, no-ff merge flows, and conflict resolution. Useful for teams needing consistent version control habits. CX Codex +1 374installs git-workflow jezweb Guides Git work for pull requests, merged-branch cleanup, conflict resolution, and monorepo release tags in Claude Code. CX Codex +1 1,200installs triage Matt Pocock This skill moves issues and external PRs through triage states, verification, and agent briefs. It fits maintainers managing an issue queue. 990,453installs code-review Matt Pocock Reviews changes from a chosen reference point against repository standards and the originating spec. Use it for a branch, PR, or work in progress. 789,521installs implement Matt Pocock Implements work from a specification or tickets, following a test-driven flow and ending with review and a commit. Use it when a coding task needs a defined delivery routine. 774,700installs git-guardrails-claude-code Matt Pocock This skill adds a Claude Code hook that stops risky Git commands before they run. Use it when an agent must not push or discard working-tree changes. 499,069installs setup-pre-commit Matt Pocock This skill configures pre-commit checks for a JavaScript repository, running Prettier, type checking, and tests before each commit. 489,289installs scaffold-exercises Matt Pocock This skill builds course exercise directories with sections, problems, solutions, and explainers. Use it when starting a new course section or creating exercise stubs. 480,196installs

From the same set214

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