# Git workflow

> Git workflow is an open-source agent skill for developer tools. Git conventions for agent-run job branches: worktrees, commits, rebasing and PR bodies. 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/Nabwinsaud/forgeline/tree/main/skills/git-workflow
- **Repository:** https://github.com/nabwinsaud/forgeline
- **GitHub stars:** 8
- **License:** MIT
- **Skill name:** git-workflow
- **Collection:** https://github.com/Nabwinsaud/forgeline
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill sets the git rules an agent follows while working on a job in its own worktree and branch. It covers committing in small Conventional Commits style with a defined subject format, staging deliberately, and keeping out secrets, build output and unrelated edits. It also explains how to bring a branch up to date with its base, choosing rebase for local branches and merge for branches that already have an open PR, and it bans force-pushing shared branches and skipping hooks.

The skill adds a template for writing a pull request body with sections for summary, acceptance criteria, changes, risk, testing and reviewer notes. Its rules also define the division of labour: the agent commits, while the surrounding factory handles pushing, opening, merging and closing PRs.

The guidance is plain markdown with no scripts. It relies on standard git commands and assumes the repository is already set up with a branch and a base to rebase or merge against.

## When your agent uses it

> Git conventions for factory jobs - one branch per job in its own worktree, small conventional commits, message format, what never to commit, keeping the branch current with base (rebase vs merge), never force-pushing shared branches, and the PR description shape. Use when committing, updating a job branch, or writing a PR description.

## What it can access

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

- [Instructions only, no scripts](https://github.com/Nabwinsaud/forgeline/tree/HEAD/skills/git-workflow)
- [License: MIT](https://github.com/Nabwinsaud/forgeline/tree/HEAD/skills/git-workflow)

## Features

- **Branch per job:** Keeps each job on its own worktree and branch and forbids touching other branches or files.
- **Conventional commit format:** Defines commit types, subject length limits and examples of good and bad messages.
- **Secrets and artifacts exclusion:** Lists files that must never be committed, such as env files, keys, dependencies and build output.
- **Rebase or merge guidance:** Explains when to rebase a local branch and when to merge into a branch already under review.
- **History safety rules:** Prohibits force pushes to shared branches, amending pushed commits and changing git config or hooks.
- **PR body template:** Provides a structured markdown template for summary, acceptance criteria, risk and testing notes.

## Good for

- Commit my changes to the current job branch using the project's message format
- Bring my feature branch up to date with main after it fell behind
- Draft a pull request description for the finished job
- Check the working tree for files that should not be committed before I commit
- Recover from a conflict when rebasing my branch onto origin/main

## Install

### Claude Code

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

```sh
/plugin marketplace add Nabwinsaud/forgeline
/plugin install forgeline@forgeline
```

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

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

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

### Codex

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

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

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

### Cursor

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

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

For one project only, put the folder in `.cursor/skills/git-workflow` 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/Nabwinsaud/forgeline.git --path skills/git-workflow
```

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

### VS Code

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

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

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

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/Nabwinsaud/forgeline.git
```

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

## FAQ

### When does Git workflow trigger?

It is meant for committing, updating a job branch, or writing a PR description, as stated in its description.

### Does Git workflow run any scripts?

No. The skill contains only instructions and a template, with no scripts or additional files.

### Can the agent push or merge with Git workflow?

No. The skill says the agent commits only, while the factory pushes, opens, merges and closes PRs.

### Which clients does Git workflow support?

The skill does not name specific clients, so it follows the shared agent skills format.

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

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

### Does Git workflow 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?

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?

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

## Where this comes from

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

## Alternatives

- [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): Git commit 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 commit](https://ai-powered.com/skills/git-commit-eduardo-sl): Git commit is an open-source agent skill for developer tools.
- [Make PR easy to review](https://ai-powered.com/skills/make-pr-easy-to-review): Make PR easy to review is an open-source agent skill for developer tools.
- [Implement](https://ai-powered.com/skills/implement-kripu77): Implement is an open-source agent skill for developer tools.
- [Conventional branch](https://ai-powered.com/skills/conventional-branch): Conventional branch is an open-source agent skill for developer tools.

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