git-workflow

A set of Git working rules based on trunk-based development, where changes stay close to the main branch, and atomic commits, where each commit contains one complete change.

In plain words
What is it for?
It guides commit size, Conventional Commit messages, branch usage, and checks that each commit is complete and independently reversible.
Why use it?
It keeps project history understandable and makes individual changes easier to review, deploy, debug, or undo.

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

Made for: Claude Code, Codex.

Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 650 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.00027 $0.00650
Opus 5 $0.00014 $0.00325
Sonnet 5 $0.00005 $0.00130
Haiku 4.5 $0.00003 $0.00065

Measured 3d ago against content hash ad9c6433f8df, 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 3d ago.

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 · 77 lines

How it starts

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

Overview

Git is not just a backup system — it's a communication tool. Clean git history enables fast debugging (git bisect), clear attribution, and safe reverts. This skill enforces atomic commits, meaningful messages, and trunk-based development.

When to Use

  • Before making any commit
  • When reviewing a PR's git history
  • When setting up a new project

Process

Step 1: Atomic Commits

  1. Each commit should represent ONE logical change — not a day's worth of work.
  2. A commit should be: independently deployable, independently revertable.
  3. Never commit "WIP" or partial implementations.

Verify: You could revert this commit without affecting adjacent functionality.

Step 2: Commit Message Format

  1. Follow Conventional Commits:
    type(scope): short summary (max 72 chars)
    
    Body: what changed and WHY (not how — the diff shows how).
    
    Closes: #issue-number
    
  2. Types: feat, fix, docs, style, refactor, test, chore
  3. The summary is imperative mood: "Add feature" not "Added feature"

Verify: Message passes: feat|fix|docs|...(<scope>): <summary> format.

Step 3: Trunk-Based Development

  1. Work directly on main for small changes (<1 day of work).
  2. For larger features: short-lived feature branches (max 2 days), frequent merges to main.
  3. Never let a branch live more than 3 days without merging or rebasing.
  4. Use feature flags for incomplete features, not long-lived branches.

Verify: No branch is more than 2 days old without a merge/rebase plan.

Step 4: Pre-Commit Gates

  1. Before every commit: tests pass, linter passes, no secrets in diff.
  2. Use pre-commit hooks to enforce automatically.

Common Rationalizations (and Rebuttals)

Excuse Rebuttal
"I'll clean up the commits later" You won't. Clean as you go.
"The commit message doesn't matter" It matters in 6 months when you're bisecting a production bug.
"Feature branches protect main" Long-lived branches cause merge nightmares. Trunk-based is safer.

Read the full file on GitHub · 77 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. 3d ago First seen · 77 lines · 27 tokens per session scan A ad9c6433f8df

Subscribe to this mod's changes

git-workflow is a skill published in the GitHub repository DevelopersGlobal/ai-agent-skills (65 stars, last pushed 4mo ago), licensed MIT. It adds 27 tokens to every session and 650 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

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

setup-pre-commit

Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests. Use when user asks to "add pre-commit hooks", "setup husky", "setup pre-commit", "configure lint-staged", or wants commit-time formatting/typechecking/testing. Don't use for running linters manually or writing tests.

helderberto/agent-skills · 77 tokens

commit

Group unstaged changes into atomic commits by concern, following repository style. Use when user asks to "commit", "create a commit", "commit changes", or "/commit". Don't use for pushing (that belongs to /ship) or creating pull requests.

helderberto/agent-skills · 53 tokens

ship

Commit and push changes with a pre-launch gate (validate-code + safe-repo) by default. --fast skips the gate.

helderberto/agent-skills · 30 tokens

git-workflow-and-versioning

规范 git 工作流实践。用于进行任何代码变更时;用于提交、分支、解决冲突,或需要组织多个并行工作流时。.

vinvcn/addyosmani-agent-skills-zh · 41 tokens

code-review-and-quality

Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch.

addyosmani/agent-skills · 51 tokens