git-workflow-and-versioning

git-workflow-and-versioning is a skill for Claude Code from 233i/agent-skills. It costs 45 tokens per session (2,761 once invoked), scanned A, original, MIT.

A set of Git practices for saving, organizing, reviewing, and rolling back code changes. Git is a version-control system that records project history through commits and separates work through branches.

In plain words
What is it for?
Use it for everyday code changes, commits, branches, conflict resolution, release preparation, and coordinating work across parallel development efforts.
Why use it?
Unstructured changes are harder to review, merge, or undo. Frequent, focused commits and short-lived branches make collaborative development easier to manage.

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 — 20 skills, 7 commands, 3 agents, 1 hook shipped together

Good fit Use it for everyday code changes, commits, branches, conflict resolution, release preparation, and coordinating work across parallel development efforts.

Compare 6 skills from other repositories ↓
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/233i/agent-skills
agentmods
npx agentmods add skills/233i/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 20 skills, 7 commands, 3 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/233i/agent-skills/git-workflow-and-versioning.svg)](https://agentmods.dev/skills/233i/agent-skills/git-workflow-and-versioning)
Your own site
<a href="https://agentmods.dev/skills/233i/agent-skills/git-workflow-and-versioning"><img src="https://agentmods.dev/badge/skills/233i/agent-skills/git-workflow-and-versioning.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,761 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.
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.00045 $0.02761
Opus 5 $0.00023 $0.01380
Sonnet 5 $0.00009 $0.00552
Haiku 4.5 $0.00005 $0.00276

Measured 7d ago against content hash 85686a4f53a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, 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 7d 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-and-versioning/SKILL.md · 301 lines

How it starts

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

Git 工作流与版本管理

概览

Git 是你的安全网。把 commit 当作存档点,把 branch 当作沙箱,把历史当作文档。面对高速生成代码的 AI agent,严格的版本控制纪律,是让改动保持可管理、可评审、可回滚的关键机制。

何时使用

始终如此。每一项代码改动都应该经过 git。

核心原则

基于主干的开发(Trunk-Based Development,推荐)

main 始终保持可部署。使用 1-3 天内就回合并的短命 feature branch。长期存在的开发分支是一种隐性成本,它们会逐渐分叉、制造冲突,并推迟集成。DORA 的研究长期显示,trunk-based development 与高绩效工程团队显著相关。

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

这是默认推荐做法。使用 gitflow 或长期分支的团队,也可以把这些原则迁移过去,例如原子提交、小改动、清晰描述。真正重要的是提交纪律,而不是某个固定分支模型。

  • 开发分支本身就是成本。 分支每多活一天,就多积累一天合并风险
  • 发布分支可以接受。 当你需要稳定某个版本,而 main 继续前进时
  • Feature flags 优于长期分支。 相比在分支上挂几周,不如把未完成功能放在 flag 后面提前部署

1. 早点提交,经常提交

每个成功的增量都应该有独立 commit,不要堆出一大坨未提交改动。

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

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

Commit 就是存档点。下一个改动如果把东西弄坏了,你能立刻回到最后一个已知正确状态。

2. 原子提交

每个 commit 只做一件逻辑上的事:

# 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

3. 描述性提交信息

Commit message 要解释 why,而不只是 what

# Good: Explains intent
feat: add email validation to registration endpoint

Prevents invalid email formats from reaching the database.
Uses Zod schema validation at the route handler level,
consistent with existing validation patterns in auth.ts.

# Bad: Describes what's obvious from the diff
update auth.ts

格式:

<type>: <short description>

<optional body explaining why, not what>

常见 type:

  • feat:新功能
  • fix:bug 修复
  • refactor:既不修 bug 也不加功能的代码改动
  • test:补测或改测
  • docs:纯文档改动
  • chore:工具、依赖、配置

4. 把关注点分开

不要把格式化改动和行为改动混在一起,也不要把重构和功能混在一起。每一种类型的改动都应该是单独 commit,理想情况下也是单独 PR:

Read the full file on GitHub · 301 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. 7d ago First seen · 301 lines · 45 tokens per session scan A 85686a4f53a3

Subscribe to this mod's changes

git-workflow-and-versioning is a skill published in the GitHub repository 233i/agent-skills (6 stars, last pushed 5mo ago), licensed MIT. It adds 45 tokens to every session and 2,761 once invoked, about $0.0002 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

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

gh-auth-isolation

Safely manage multiple GitHub identities (EMU + personal) in agent workflows.

github/gh-aw · 20 tokens

comet-github

A routing guide for Comet-related GitHub work. It directs requests about pull requests, issues, CI failures, ideas, and fixes to the appropriate review or implementation process.

rpamis/comet · 72 tokens

github-skill

Work with GitHub via the gh CLI — clone repositories, create/list/merge pull requests, create/list issues, and run any other gh command (API calls, workflow runs, releases, repo administration). List operations return parsed JSON.

zeenie-ai/OpenCompany · 51 tokens

codex-autoresearch

Run autonomous, measurable experiments in a Git repository: change one hypothesis, verify a numeric metric, keep improvements, and revert failures. Use when the user wants Codex to keep iterating toward a numeric target in the foreground or as a detached background run. Do not use for ordinary one-shot coding…

leo-lilinxiao/codex-autoresearch · 80 tokens

changelog-composer

Generates structured changelogs and release notes from git history and PRs, classifying breaking changes, features, fixes, performance, docs. Triggers on: "generate changelog", "write release notes", "what changed since", "prepare release", "release notes for", "diff since tag".

Mathews-Tom/armory · 67 tokens