# Git workflow and versioning

> Git workflow and versioning is an open-source agent skill for developer tools. Guides an agent through atomic commits, branching, worktrees, PRs and semver releases. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/addyosmani/agent-skills/tree/main/skills/git-workflow-and-versioning
- **Repository:** https://github.com/addyosmani/agent-skills
- **GitHub stars:** 122,545
- **License:** MIT
- **Skill name:** git-workflow-and-versioning
- **Collection:** https://github.com/addyosmani/agent-skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill sets out a git discipline for AI coding agents: commit each working increment, keep commits atomic, and keep refactors separate from feature or behavior changes. It covers trunk-based development with short-lived branches, a commit message format built around intent, and git worktrees so several agents can work on different branches side by side without colliding.

The skill also works through a save-point pattern in which the agent runs tests before each commit and reverts to the last good state when a check fails. A pre-commit checklist asks for a review of the staged diff, a search for likely secrets, and the project's test, lint and type-check commands. It adds guidance on generated files, .gitignore coverage and debugging with bisect and blame.

For releases, it explains choosing a MAJOR, MINOR or PATCH bump based on consumer impact, tagging versions with annotated git tags, and maintaining a human-readable changelog grouped by Added, Changed, Fixed, Deprecated, Removed and Security. It expects a git repository and the project's own test, lint and type-check tooling, with examples written for JavaScript and TypeScript projects.

## When your agent uses it

> Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, splitting uncommitted work in a messy working tree into clean atomic commits, opening or reviewing a pull request (PR), pushing to a remote, or when you need to organize work across multiple parallel streams. Use when cutting a release, choosing a semantic version bump, tagging, or writing a changelog. Use when asked to write a commit message or a changelog entry for a change, or to split a change into commits, even when the diff is pasted inline and the message seems easy to write from it.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/addyosmani/agent-skills/tree/HEAD/skills/git-workflow-and-versioning)
- [License: MIT](https://github.com/addyosmani/agent-skills/tree/HEAD/skills/git-workflow-and-versioning)

## Features

- **Atomic commit discipline:** Rules for keeping each commit to one logical change, with size targets and separated refactors.
- **Commit message format:** A type-prefixed message layout that explains the reason for a change rather than restating the diff.
- **Branching and worktrees:** Short-lived feature branches and git worktrees for running parallel agent work in isolated directories.
- **Pre-commit checks:** A checklist covering staged diff review, secret scanning, tests, linting and type checking before each commit.
- **Semantic version bumps:** Guidance on choosing major, minor or patch releases based on what consumers can observe.
- **Tagging and changelogs:** Annotated release tags and a consumer-facing changelog format grouped by impact.

## Good for

- Split a messy working tree into clean, reviewable commits
- Write a commit message explaining why a change was made
- Set up parallel branches with worktrees for several agents
- Choose the right semantic version bump for a release
- Draft a changelog entry for a user-facing change
- Prepare a pull request with a size-appropriate scope

## Install

### Claude Code

This skill ships in the `agent-skills` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add chrisalehman/bionic
/plugin install agent-skills@bionic
```

Or copy only this skill to `~/.claude/skills/git-workflow-and-versioning`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/git-workflow-and-versioning &&
cp -R "$tmp/skills/git-workflow-and-versioning" ~/.claude/skills/git-workflow-and-versioning &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/git-workflow-and-versioning` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/git-workflow-and-versioning` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/git-workflow-and-versioning &&
cp -R "$tmp/skills/git-workflow-and-versioning" ~/.agents/skills/git-workflow-and-versioning &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/git-workflow-and-versioning` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/git-workflow-and-versioning` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/git-workflow-and-versioning &&
cp -R "$tmp/skills/git-workflow-and-versioning" ~/.cursor/skills/git-workflow-and-versioning &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/git-workflow-and-versioning` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/addyosmani/agent-skills.git --path skills/git-workflow-and-versioning
```

Or copy the folder to `~/.gemini/skills/git-workflow-and-versioning` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/git-workflow-and-versioning`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/git-workflow-and-versioning &&
cp -R "$tmp/skills/git-workflow-and-versioning" ~/.copilot/skills/git-workflow-and-versioning &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/git-workflow-and-versioning` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/addyosmani/agent-skills.git
```

Then copy `agent-skills/skills/git-workflow-and-versioning` into your agent's skills folder as `git-workflow-and-versioning`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Git workflow and versioning trigger?

It is meant for any code change and applies when committing, branching, resolving conflicts, opening or reviewing pull requests, pushing, cutting releases, tagging, or writing commit messages and changelog entries.

### Does Git workflow and versioning require any scripts or extra tools?

It ships no scripts. It relies on git and on the project's own test, lint and type-check commands, and it references a shared agent CLI guidance file for machine-readable git output.

### Does Git workflow and versioning enforce a branching model?

It recommends trunk-based development with short-lived branches, but says teams using gitflow or long-lived branches can keep the commit discipline while adapting the branching model.

### Does Git workflow and versioning set up git hooks for me?

It shows an example lint-staged and husky configuration for package.json but does not install or configure hooks itself.

### How do I install Git workflow and versioning in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/git-workflow-and-versioning to use it in all your projects, or to .claude/skills/git-workflow-and-versioning in one project. Or install the agent-skills plugin, which includes it: /plugin marketplace add chrisalehman/bionic, then /plugin install agent-skills@bionic.

### Does Git workflow and versioning run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Git workflow and versioning?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Git workflow and versioning?

The closest alternatives to Git workflow and versioning are Git workflow, Git, Git workflow, GitHub workflow and Git and release ops edho ferdian.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Git workflow](https://ai-powered.com/skills/git-workflow-aws-solutions): Git workflow is an open-source agent skill for developer tools.
- [Git](https://ai-powered.com/skills/git-jasgujral): Git is an open-source agent skill for developer tools.
- [Git workflow](https://ai-powered.com/skills/git-workflow-nabwinsaud): Git workflow is an open-source agent skill for developer tools.
- [GitHub workflow](https://ai-powered.com/skills/github-workflow): GitHub workflow is an open-source agent skill for developer tools.
- [Git and release ops edho ferdian](https://ai-powered.com/skills/git-and-release-ops-edho-ferdian): Git and release ops edho ferdian is an open-source agent skill for developer tools.
- [Git commit](https://ai-powered.com/skills/git-commit-ruan-cat): Git commit is an open-source agent skill for developer tools.
- [Autocommit](https://ai-powered.com/skills/autocommit): Autocommit is an open-source agent skill for developer tools.
- [Git commit](https://ai-powered.com/skills/git-commit): Git commit is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/git-workflow-and-versioning
