# Git Workflow

> Git workflow — branch, PR, squash merge, cleanup

- **Type:** Skill
- **Install:** `agentstack add skill-anthroos-claude-code-orchestrator-git-workflow`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [anthroos](https://agentstack.voostack.com/s/anthroos)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [anthroos](https://github.com/anthroos)
- **Source:** https://github.com/anthroos/claude-code-orchestrator/tree/main/skills/examples/git-workflow

## Install

```sh
agentstack add skill-anthroos-claude-code-orchestrator-git-workflow
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Git Workflow

> Standardized git workflow: branch → PR → squash merge → delete branch. Never push to main.

## When to use

- "Create a branch for this feature"
- "Open a PR"
- "Merge and clean up"
- Any git operation that should follow team conventions

## How to execute

### Step 1: Create branch

```bash
# Branch naming: {type}/{short-description}
# Types: feature, fix, refactor, docs, chore
git checkout -b feature/add-user-auth
```

### Step 2: Commit changes

```bash
# Commit message format: ": "
# Actions: Add, Update, Fix, Remove, Refactor
git add 
git commit -m "Add: user authentication flow"
```

### Step 3: Push and create PR

```bash
git push -u origin feature/add-user-auth
gh pr create --title "Add user authentication" --body "## Summary
- Added login/logout flow
- Added session management

## Test plan
- [ ] Login with valid credentials
- [ ] Login with invalid credentials
- [ ] Session expires after timeout"
```

### Step 4: After review — squash merge

```bash
gh pr merge --squash --delete-branch
```

### Step 5: Clean up local

```bash
git checkout main
git pull
git branch -d feature/add-user-auth
```

## Rules

- **Never push directly to main** — always use a branch + PR
- **Squash merge** — keeps history clean
- **Delete branch after merge** — no stale branches
- **One PR per logical change** — don't mix unrelated changes

## Troubleshooting

| Problem | Solution |
|---------|----------|
| PR has conflicts | `git checkout main && git pull && git checkout feature-branch && git rebase main` |
| Accidentally committed to main | `git reset HEAD~1` then create branch |
| Need to update PR | Push to the same branch, PR updates automatically |

## Related skills

- `code-review` — review before merging

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [anthroos](https://github.com/anthroos)
- **Source:** [anthroos/claude-code-orchestrator](https://github.com/anthroos/claude-code-orchestrator)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-anthroos-claude-code-orchestrator-git-workflow
- Seller: https://agentstack.voostack.com/s/anthroos
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
