git-workflow-and-versioning

git-workflow-and-versioning is a skill for Claude Code from addyosmani/agent-skills. It costs 74 tokens per session (3,269 once invoked), scanned A, original, MIT.

A set of rules for using Git, a tool that records code history, to manage changes safely. It covers commits, branches, merges, pull requests, releases, and version numbers.

In plain words
What is it for?
Use it for every code change, including branching, committing, reviewing or opening pull requests, resolving conflicts, pushing code, and preparing releases.
Why use it?
It keeps changes understandable, reviewable, and reversible, especially when several pieces of work happen at once. Good history also reduces confusion during conflicts and releases.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is git worktree add ../project-feature-a feature/task-creation.

Part of the agent-skills plugin — 25 skills, 10 commands, 4 agents, 1 hook shipped together

Good fit Use it for every code change, including branching, committing, reviewing or opening pull requests, resolving conflicts, pushing code, and preparing releases.

Compare 6 skills from other repositories ↓
About the project

addyosmani/agent-skills is a collection of reusable workflows, quality checks, commands, and other instructions that guide AI coding agents through software development. It is for developers who want agents to follow consistent engineering practices, and the catalogue entries are its packaged skills, commands, agents, plugins, instructions, and hooks.

addyosmani/agent-skills · 92,877 stars · on GitHub · skills.addy.ie

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/addyosmani/agent-skills
agentmods
npx agentmods add skills/addyosmani/agent-skills/git-workflow-and-versioning

Made for: Claude Code.

Or install agent-skills, the plugin that ships this one along with the rest of its 25 skills, 10 commands, 4 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git-workflow-and-versioning

README.md
[![agentmods](https://agentmods.dev/badge/skills/addyosmani/agent-skills/git-workflow-and-versioning.svg)](https://agentmods.dev/skills/addyosmani/agent-skills/git-workflow-and-versioning)
Your own site
<a href="https://agentmods.dev/skills/addyosmani/agent-skills/git-workflow-and-versioning"><img src="https://agentmods.dev/badge/skills/addyosmani/agent-skills/git-workflow-and-versioning.svg" alt="Measured on agentmods" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,269 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 4 Apr 2026
  • Snyk pass 4 Apr 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 189
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • medium MCP Rug Pull · line 229
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.1 $0.00074 $0.03269
Opus 5 $0.00037 $0.01635
Sonnet 5 $0.00015 $0.00654
Haiku 4.5 $0.00007 $0.00327

Measured 9d ago against content hash 39665e84d944, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

git-workflow-and-versioning 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 9d 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.

Origin

Copies of this mod

8 near-identical copies found in the catalogue:

skills/git-workflow-and-versioning/SKILL.md · 356 lines

How it starts

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

Git Workflow and Versioning

Overview

Git is your safety net. Treat commits as save points, branches as sandboxes, and history as documentation. With AI agents generating code at high speed, disciplined version control is the mechanism that keeps changes manageable, reviewable, and reversible.

When to Use

Always. Every code change flows through git.

Core Principles

Trunk-Based Development (Recommended)

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

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

This is the recommended default. Teams using gitflow or long-lived branches can adapt the principles (atomic commits, small changes, descriptive messages) to their branching model — the commit discipline matters more than the specific branching strategy.

  • Dev branches are costs. Every day a branch lives, it accumulates merge risk.
  • Release branches are acceptable. When you need to stabilize a release while main moves forward.
  • Feature flags > long branches. Prefer deploying incomplete work behind flags rather than keeping it on a branch for weeks.

1. Commit Early, Commit Often

Each successful increment gets its own commit. Don't accumulate large uncommitted changes.

Work pattern:
  Implement slice → Test → Verify → Commit → Next slice

Not this:
  Implement everything → Hope it works → Giant commit

Commits are save points. If the next change breaks something, you can revert to the last known-good state instantly.

2. Atomic Commits

Each commit does one logical thing:

# Good: Each commit is self-contained
git log --oneline
a1b2c3d Add task creation endpoint with validation
d4e5f6g Add task creation form component
h7i8j9k Connect form to API and add loading state
m1n2o3p Add task creation tests (unit + integration)

# Bad: Everything mixed together
git log --oneline
x1y2z3a Add task feature, fix sidebar, update deps, refactor utils

Read the full file on GitHub · 356 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. 9d ago First seen · 356 lines · 74 tokens per session scan A 39665e84d944

Subscribe to this mod's changes

git-workflow-and-versioning is a skill published in the GitHub repository addyosmani/agent-skills (92,877 stars, last pushed 2d ago), licensed MIT. It adds 74 tokens to every session and 3,269 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-30.

Related

Other skills, from other repositories

shipping-and-launch

Prepares production launches. Use when preparing to deploy to production. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.

borhen68/SkillEngine · 45 tokens

conventional-commits

Enforce, validate, lint, and manage Conventional Commits across git repositories. Generates semantic changelogs and installs git hooks. Use this skill whenever the user mentions commit messages, commit conventions, conventional commits, semantic versioning, changelogs, commit linting, git hooks for commits, or wants…

hankunpeng/skills · 85 tokens

git-workflow-and-versioning

Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, or when you need to organize work across multiple parallel streams.

borhen68/SkillEngine · 40 tokens

git-workflow

Trunk-based development with atomic commits, clean history, and meaningful commit messages. Every commit should be deployable.

DevelopersGlobal/ai-agent-skills · 27 tokens

shipping-and-launch

A production-release checklist and planning guide for putting software in front of real users. It covers testing, security, monitoring, staged rollout, and rollback, which means returning to the previous working version.

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

production-deployment

Zero-downtime deployments with pre-flight checks, staged rollouts, and rollback plans. Never ship to production without a verified rollback strategy.

DevelopersGlobal/ai-agent-skills · 32 tokens