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/233i/agent-skillsnpx agentmods add skills/233i/agent-skills/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/233i/agent-skills/git-workflow-and-versioning)<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>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.00045 | $0.02761 |
| Opus 5 | $0.00023 | $0.01380 |
| Sonnet 5 | $0.00009 | $0.00552 |
| Haiku 4.5 | $0.00005 | $0.00276 |
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.
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:
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.
- 7d ago First seen · 301 lines · 45 tokens per session scan A 85686a4f53a3
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.
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.
gh-auth-isolation
Safely manage multiple GitHub identities (EMU + personal) in agent workflows.
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.
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.
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…
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".