git-workflow

A set of guidelines for using Git to save work, manage branches, handle conflicts, and add safeguards. Git is a tool that records code history and lets developers work on separate lines of change.

In plain words
What is it for?
Use it when branching, committing, merging, rebasing, preparing releases, or setting up pre-commit checks that inspect changes before they are saved.
Why use it?
It keeps the main branch deployable, makes changes easier to review or undo, and explains how to resolve conflicts based on intent rather than discarding one side.

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/int2t05/engineering-skills/git-workflow
Any agent
npx skills add int2t05/engineering-skills --skill git-workflow
Clone the repo
git clone --depth 1 https://github.com/int2t05/engineering-skills

Made for: Claude Code, Codex.

Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,933 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.00077 $0.01933
Opus 5 $0.00039 $0.00966
Sonnet 5 $0.00015 $0.00387
Haiku 4.5 $0.00008 $0.00193

Measured 2d ago against content hash 77f33d383abc, 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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (references/block-dangerous-git.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/08-ship/git-workflow/SKILL.md · 139 lines

How it starts

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

Git Workflow and Versioning

Git is your safety net: commits are save points, branches are sandboxes, history is documentation. With AI agents generating code at high speed, disciplined version control is what keeps changes manageable, reviewable, and reversible.

When to use

  • Committing, branching, or organizing work across parallel streams.
  • Resolving an in-progress merge or rebase conflict.
  • Cutting a release, choosing a semantic version bump, tagging, or writing a changelog.
  • Setting up git guardrails (blocking dangerous commands) or pre-commit hooks.

Not for: a simple commit of finished work with no conflicts (just commit it); designing CI pipelines (use ci-cd); production deployment strategy (use shipping).

Steps

1. Work trunk-based with short-lived branches

Keep main always deployable. Work in short-lived feature branches that merge back within 1–3 days. Long-lived branches are a hidden cost — they diverge, create merge conflicts, and delay integration. DORA research consistently links trunk-based development with high-performing teams.

main ──●──●──●──●──●──●──●──●──●──  (always deployable)
        ╲      ╱  ╲    ╱
         ●──●─╱    ●──╱    ← short-lived feature branches (1-3 days)

Branch naming: feature/<desc>, fix/<desc>, chore/<desc>, refactor/<desc>. Delete branches after merge. Prefer feature flags over long-lived branches for incomplete features.

For parallel AI-agent work, use git worktrees so each agent works in its own directory with its own branch — no branch switching, no interference:

git worktree add ../project-feature-a feature/task-creation
# ...later
git worktree remove ../project-feature-a

2. Commit early, atomic, descriptive

Each successful increment gets its own commit (implement slice → test → verify → commit). If the next change breaks something, you can revert to the last known-good state instantly.

Atomic — each commit does one logical thing:

# Good: self-contained
feat: add task creation endpoint with validation
feat: add task creation form component
test: add task creation tests (unit + integration)

# Bad: mixed
feat: add task feature, fix sidebar, update deps, refactor utils

Read the full file on GitHub · 139 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 139 lines · 77 tokens per session scan A 77f33d383abc

Subscribe to this mod's changes

git-workflow is a skill published in the GitHub repository int2t05/engineering-skills (3 stars, last pushed 14d ago), licensed MIT. It adds 77 tokens to every session and 1,933 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

repo-ship

Split existing repository work into commits by intent as it happens, or give a new repository its name, visibility, description, and topics at creation. Use the matching path when work is about to be committed or pushed, before a push that would otherwise land as one large commit, or when a new repository is being…

aethrox/doctrine · 68 tokens

checkpoint

Save a checkpoint — bump version, commit, push. Use when work is complete and ready to ship without the full finish protocol.

rmzi/portable-dev-system · 26 tokens

dev-standards

วางมาตรฐานการพัฒนาให้ทีม — coding standard/linting, branching strategy (Gitflow/trunk-based), commit convention, code review checklist, secure coding และ Definition of Ready/Done. Sets up team development standards: coding style, branching, commits, code review, secure coding, and DoR/DoD. Trigger เมื่อผู้ใช้พิมพ์…

ksmaster03/claude-canfly-skill · 0 tokens

git-workflow-and-versioning

Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, 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…

addyosmani/agent-skills · 74 tokens

prowler-commit

Creates professional git commits following conventional-commits format. Trigger: When creating commits, after completing code changes, when user asks to commit.

prowler-cloud/prowler · 33 tokens

git-commit

Generate well-formatted git commit messages following conventional commit standards.

ThinkInAIXYZ/deepchat · 15 tokens