Skip to content
Back to skills

Git Workflow

ASecurity

Branch names, commit messages, pushing and opening a pull request, and working with the task tracker. Use when branching, committing, pushing or opening a PR.

  • 82 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added May 28, 2026
ai-agentsgogit

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add monkilabs/opencastle --skill git-workflow --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git Workflow?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Git Workflow
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/monkilabs-git-workflow/badge)](https://www.skillsdirectory.com/skills/monkilabs-git-workflow)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: git-workflow
description: "Branch names, commit messages, pushing and opening a pull request, and working with the task tracker. Use when branching, committing, pushing or opening a PR."
---

# Git Workflow

**Never push to `main`.** Every change goes through a branch and a pull request, and a person merges it.

| | |
|---|---|
| Branch | From `main`: `<type>/<slug>`, or `<type>/<issue-id>-<slug>` when there is an issue. Types: `feat`, `fix`, `refactor`, `perf`, `docs`, `chore` |
| Commits | Small and atomic, with an imperative subject — the issue ID first when there is one (`TAS-42: Fix token refresh`) |
| History | Never `--force` or `--amend` on a shared branch; `--force-with-lease` on your own only |
| Secrets | None in commits, pull request bodies or output; a leaked one is rotated at once |

## One task, one pull request

A task (one tracker issue, or one request when there is none) gets one branch and one pull request in each repository it touches. Every part of it lands there as another commit, whoever does the part. A sub-agent commits to the branch it is given and never opens a pull request of its own. A fix the task needs while its pull request is open is another commit on that branch, not a second pull request. Split into several pull requests only when the person asks for a stack (**github-platform**).

The pull request is a **draft** from the first push until every part is in and the project's tests, lint and build pass locally. CI runs once it is marked ready, not on each push to a draft (**github-platform** shows the workflow setting), so check locally before marking it ready, and after that push the remaining fixes together rather than one at a time.

## Deliver

1. Commit, then push: `git push -u origin <branch>`.
2. At the first push, open the draft, with its body in a file — an inline `--body` breaks on backticks and quotes in zsh:

   ```sh
   cat > /tmp/pr-body.md << 'EOF'
   Resolves TAS-42

   ## Changes
   - ...
   EOF
   GH_PAGER=cat gh pr create --draft --base main --title "TAS-42: Short description" --body-file /tmp/pr-body.md
   ```

   Already open for this task? `gh pr list --head <branch>` finds it: push to its branch, and update its body when the scope grows (`gh pr edit <n> --body-file /tmp/pr-body.md`).

3. When every part is in and verified, mark it ready: `gh pr ready <n>`. CI runs now; fix what fails on the same branch.
4. Do not merge it. Link it from the tracker issue when there is one.

## The tracker

When the project uses one, its conventions are in `.opencastle/project/<tracker>-config.md` and the skill bound to the **task-management** slot. Without its tools in this session, list the issues you would have created — title and acceptance criteria — in your answer, and carry on.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.