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.
git clone --depth 1 https://github.com/vinvcn/addyosmani-agent-skills-zhnpx agentmods add skills/vinvcn/addyosmani-agent-skills-zh/git-workflow-and-versioningWrote 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.
[](https://agentmods.dev/skills/vinvcn/addyosmani-agent-skills-zh/git-workflow-and-versioning)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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 fixrefactor— 既不修 bug 也不加功能的代码变更test— 添加或更新测试docs— 仅文档chore— 工具、依赖、配置
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.
- 2mo ago Changed · +55 lines · +56 tokens per session a9122bddaa99
- 3mo ago First seen · 301 lines · 41 tokens per session scan A 60e8c20b6e96
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.
git-workflow-and-versioning compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| git-workflow-and-versioningvinvcn/addyosmani-agent-skills-zh | Skill | 57 | 1mo ago | MIT | A | 97 | Claude Code |
| git-workflow-and-versioningborhen68/SkillEngine | Skill | 17 | 5mo ago | MIT | A | 40 | Claude Code |
| shipping-and-launchborhen68/SkillEngine | Skill | 17 | 5mo ago | MIT | A | 45 | Claude Code |
| git-workflow-and-versioningaddyosmani/agent-skills | Skill | 121k | 6d ago | MIT | A | 131 | Claude Code |
| git-workflowDevelopersGlobal/ai-agent-skills | Skill | 220 | 5d ago | MIT | A | 27 | Claude Code, Codex |
| production-deploymentDevelopersGlobal/ai-agent-skills | Skill | 220 | 5d ago | MIT | A | 32 | Claude Code, Codex |
| to-prhelderberto/agent-skills | Skill | 21 | 2d ago | MIT | A | 25 | Claude Code |