git-workflow

A set of rules for safely moving code changes from a task branch into a pull request. A branch is a separate line of development, and a pull request is a review request for merging changes into the main code line.

In plain words
What is it for?
Creating task branches, connecting tasks to commits and pull requests, preparing draft pull requests, recording verification evidence, and coordinating parallel code work.
Why use it?
It prevents agents from putting unfinished work directly on the main branch and defines checks and human review before merging. It also gives parallel agents a consistent way to divide work.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/affectionatec/agentic-engineering/git-workflow
Any agent
npx skills add affectionatec/agentic-engineering --skill git-workflow
Clone the repo
git clone --depth 1 https://github.com/affectionatec/agentic-engineering

Made for: Claude Code, Codex.

Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,809 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00104 $0.01809
Opus 5 $0.00052 $0.00905
Sonnet 5 $0.00021 $0.00362
Haiku 4.5 $0.00010 $0.00181

Measured yesterday against content hash 738594fdeec8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

git-workflow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/git-workflow/SKILL.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git Workflow — Shipping Through the Gate

Core constraint: main is read-only for agents. Work lands on task branches, ships as draft PRs carrying verification evidence, and merges only after the verifier's PASS and a human who has read the diff. The agent never merges its own PR.

Quick Reference

Use when Code work starts (branch first); a task is built and needs to ship; parallel agents share a repo
Skip when Doc-only edits the user has exempted, or repos where the user explicitly owns all git operations
Output One branch + one draft PR per task, the PR description carrying the done condition and verdict reference
Sequence IMPL PLAN task starts → BRANCH → build → self-check → DRAFT PR → VERIFY → PASS → ready → human gate → MERGE → STATUS ✅
Iron rule One task, one branch, one PR. Never commit to main. Never merge your own PR.
Sibling skills [[project-kickoff-prd]] · [[technical-specification]] · [[architecture-decision-record]] · [[implementation-plan]] · [[status-tracker]] · [[independent-verification]] · [[agents-md-template]]

Why This Exists

The rest of the chain defines what to build (IMPL PLAN), how to prove it (VERIFY), and how to remember it (STATUS) — but without a git contract, how code actually lands is left to agent defaults, and agent defaults are destructive: commits straight to main, three tasks bundled into one diff, "done" declared with nothing pushed.

Two concepts the chain repeats — merging through the verification gate and the human gate — only become operational when there is a branch to verify and a PR for the human to read. This skill is that contract.

Branch Protocol

  1. main is protected. Agents never commit to it, never push to it, never rewrite it.
  2. One branch per task, created from up-to-date main at task start (the branch is the workspace — the In-Flight Checkpoint references it):
    • Naming: task/<task-id>-<slug> — e.g. task/m1-t2-user-model
    • For long milestones, an optional integration branch milestone/<id> — task branches then fork from and PR into it
  3. Never reuse a branch across tasks. Never let a task branch outlive its merge.

Read the full file on GitHub · 107 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 107 lines · 104 tokens per session scan A 738594fdeec8

Subscribe to this mod's changes

git-workflow is a skill published in the GitHub repository affectionatec/agentic-engineering (4 stars, last pushed 2mo ago), licensed MIT. It adds 104 tokens to every session and 1,809 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.