git-workflow-and-versioning

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

A guide to using Git, a system for tracking code changes, branches, and saved versions. It recommends small, focused commits and short-lived feature branches while keeping the main branch deployable.

In plain words
What is it for?
Use it when making code changes, creating commits or branches, resolving conflicts, coordinating parallel work, or choosing a version-control workflow.
Why use it?
It makes code changes easier to review, combine, undo, and investigate. It reduces the conflicts and hidden work that build up when branches live for too long.

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 — 26 skills, 10 commands, 4 agents shipped together

Good fit Use it when making code changes, creating commits or branches, resolving conflicts, coordinating parallel work, or choosing a version-control workflow.

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/vinvcn/addyosmani-agent-skills-zh
agentmods
npx agentmods add skills/vinvcn/addyosmani-agent-skills-zh/git-workflow-and-versioning

Made for: Claude Code.

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

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/vinvcn/addyosmani-agent-skills-zh/git-workflow-and-versioning/github.svg)](https://agentmods.dev/skills/vinvcn/addyosmani-agent-skills-zh/git-workflow-and-versioning)
Your own site
<a href="https://agentmods.dev/skills/vinvcn/addyosmani-agent-skills-zh/git-workflow-and-versioning"><img src="https://agentmods.dev/badge/skills/vinvcn/addyosmani-agent-skills-zh/git-workflow-and-versioning/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for git-workflow-and-versioning

Your own site · 80×15
<a href="https://agentmods.dev/skills/vinvcn/addyosmani-agent-skills-zh/git-workflow-and-versioning"><img src="https://agentmods.dev/badge/skills/vinvcn/addyosmani-agent-skills-zh/git-workflow-and-versioning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,654 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.00097 $0.03654
Opus 5.5 $0.00039 $0.01462
Sonnet 5.5 $0.00019 $0.00731
Haiku 4.5 $0.00010 $0.00365

Measured 2mo ago against content hash a9122bddaa99, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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 2mo 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 · 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 工作流和版本管理

概览

Git 是你的安全网。把 commits 当作保存点,把 branches 当作沙盒,把 history 当作文档。AI agents 会高速生成代码,而有纪律的版本控制是让变更可管理、可审查、可回滚的机制。

何时使用

始终使用。每个代码变更都经过 git。

核心原则

Trunk-Based Development(推荐)

保持 main 始终可部署。在短生命周期 feature branches 中工作,并在 1-3 天内合回。长期存在的开发分支是隐藏成本:它们会分叉、制造 merge conflicts,并延迟集成。DORA 研究持续表明,trunk-based development 与高绩效工程团队相关。

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

这是推荐默认方式。使用 gitflow 或长期分支的团队,可以把这些原则(atomic commits、小变更、描述性消息)适配到自己的分支模型中。commit 纪律比具体分支策略更重要。

  • Dev branches 是成本。 分支每多存活一天,就会累积 merge 风险。
  • Release branches 可以接受。 当你需要在 main 继续前进的同时稳定某个 release。
  • Feature flags > long branches。 优先把未完成工作藏在 flags 后部署,而不是让它在分支上停留数周。

1. 尽早提交,经常提交

每个成功的增量都应该有自己的 commit。不要累积大量未提交变更。

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

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

Commits 是保存点。如果下一个变更破坏了东西,你可以立刻回到最后一个已知良好状态。

2. Atomic Commits(原子提交)

每个 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 messages 解释 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>

类型:

  • feat — 新功能
  • fix — Bug fix
  • refactor — 既不修 bug 也不加功能的代码变更
  • test — 添加或更新测试
  • docs — 仅文档
  • chore — 工具、依赖、配置

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. 2mo ago Changed · +55 lines · +56 tokens per session a9122bddaa99
  2. 3mo ago First seen · 301 lines · 41 tokens per session scan A 60e8c20b6e96

Subscribe to this mod's changes

git-workflow-and-versioning is a skill published in the GitHub repository vinvcn/addyosmani-agent-skills-zh (57 stars, last pushed 1mo ago), licensed MIT. It adds 97 tokens to every session and 3,654 once invoked, about $0.0004 per session on Opus 5.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

git-workflow-and-versioning compared with skills from other repositories

git-workflow-and-versioning next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
git-workflow-and-versioningvinvcn/addyosmani-agent-skills-zhSkill571mo agoMITA97Claude Code
git-workflow-and-versioningborhen68/SkillEngineSkill175mo agoMITA40Claude Code
shipping-and-launchborhen68/SkillEngineSkill175mo agoMITA45Claude Code
git-workflow-and-versioningaddyosmani/agent-skillsSkill121k6d agoMITA131Claude Code
git-workflowDevelopersGlobal/ai-agent-skillsSkill2205d agoMITA27Claude Code, Codex
production-deploymentDevelopersGlobal/ai-agent-skillsSkill2205d agoMITA32Claude Code, Codex
to-prhelderberto/agent-skillsSkill212d agoMITA25Claude Code