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.00041 | $0.02682 |
| Opus 5 | $0.00020 | $0.01341 |
| Sonnet 5 | $0.00008 | $0.00536 |
| Haiku 4.5 | $0.00004 | $0.00268 |
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 11d 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 — 301 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.
- 11d 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 (31 stars, last pushed 4mo ago), licensed MIT. It adds 41 tokens to every session and 2,682 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-30.
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, or when you need to organize work across multiple parallel streams.
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.
git-workflow-and-versioning
Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, splitting uncommitted work in a messy working tree into clean atomic commits, opening or reviewing a pull request (PR), pushing to a remote, or when you need to organize work across multiple…
test-driven-development
Drives development with tests via Red-Green-Refactor and the Prove-It pattern, with hard rules against weakening assertions or faking green suites. Use when implementing any logic, fixing any bug, or changing any behavior. Triggers on "add a feature", "fix this bug", "write tests", or any task where done must be…
context-engineering
Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching between tasks, or when you need to configure rules files and context for a project.
debugging-and-error-recovery
Guides systematic root-cause debugging with hard rules against guess-fixes and symptom suppression. Use when tests fail, builds break, behavior doesn't match expectations, or you encounter any unexpected error. Triggers on "this is broken", "tests are failing", "why doesn't this work", or any error output.