Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/harness-base/harness-control/hc-git-workflownpx skills add harness-base/harness-control --skill hc-git-workflowgit clone --depth 1 https://github.com/harness-base/harness-controlWrote 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/harness-base/harness-control/hc-git-workflow)<a href="https://agentmods.dev/skills/harness-base/harness-control/hc-git-workflow"><img src="https://agentmods.dev/badge/skills/harness-base/harness-control/hc-git-workflow.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 | $0.00166 | $0.01788 |
| Opus 5 | $0.00083 | $0.00894 |
| Sonnet 5 | $0.00033 | $0.00358 |
| Haiku 4.5 | $0.00017 | $0.00179 |
Grade C, and why
hc-git-workflow scanned grade C with 1 finding 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 4d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
| **高危禁止** | `reset --hard` / 裸强推(`--force` / `-f`,任意分支——一律用 `--force-with-lease`)/ 直推·强推 `main`(main 只走 PR merge)/ `rm -rf` | hook 会拦(ADR-0025 补齐机器拦截);**有授权也不做** | How it starts
The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Git Workflow
git 写操作可能不可逆(reset / 删分支 / 强推),未授权的提交 / 推送会污染历史。先授权、走约定。
何时用 / 何时不用
- 用:建分支 / 提交 / 合并 / rebase / 解冲突 / 推送 / worktree。
- 不用:只读查询(status / log / diff)随意。
操作三档分级表(rule-0006)
| 档 | 操作 | 规矩 |
|---|---|---|
| 只读随意 | status / log / diff / fetch / ls-remote | 不用问,随时跑 |
| 写需授权 | commit / push / rebase 后强推(仅 --force-with-lease 形态)/ 删分支 / 改 remote / tag |
先问用户;授权不跨批——上一批的"提交吧"不延续到下一批新改动,新改动要重新授权 |
| 高危禁止 | reset --hard / 裸强推(--force / -f,任意分支——一律用 --force-with-lease)/ 直推·强推 main(main 只走 PR merge)/ rm -rf |
hook 会拦(ADR-0025 补齐机器拦截);有授权也不做 |
- 不直接在
main上干活。
发布前起手式(只挂发布类操作前)
发布类操作 = push / 合并 / rebase 后强推 / 开 PR。动手前先过四步:
git status——确认在哪个分支、工作树干不干净。git fetch+ 核 ahead/behind——本地远程对齐了没。- force-with-lease 用显式远端 SHA(
git ls-remote origin <branch>拿),防本地 remote-tracking 信息 stale:git push --force-with-lease=<branch>:<远端SHA> origin <branch> - 核目标 PR 状态(如
gh pr view)——防"PR 已被合了还往老分支推"。
有效期 = 本轮对话:同一轮内查过不重查;跨轮、或有理由怀疑远端变了(如用户说"我合了")才重查。commit 等本地操作不强制查。
分支约定
- 需求分支
feat/<desc>、bug 分支fix/<desc>,都从最新main切。 - Claude Code 自动开的 worktree 分支(
claude/<auto>,前缀不可配)无视它——在 worktree 里手动切自己的需求/bug 分支:git fetch origin main git switch -c feat/<desc> origin/main # bug 修复用 fix/<desc>
改完 → 更新 → 合并
- 干活、提交都在
feat//fix/分支上。 - 落后 main 时本地
rebase main(不是 merge main,保持历史线性):git fetch origin main && git rebase origin/main - 冲突在本地解决:逐文件看
<<<<<<<标记、留对的、git add <file>、git rebase --continue;拿不准停下问,别瞎合。 - push 分支(rebase 后用
git push --force-with-lease;main受保护、不可强推)。 - 开 PR 到
main,CI 绿 + review 才合,合并方式 = merge commit。
备注:SSH 不通的环境(sandbox)push 走:
git -c credential.helper='!gh auth git-credential' push https://github.com/<org>/<repo>.git <branch>
CI 处理(工程级快门,通用不针对具体项目)
CI = 工程级 / 运维级的事故拦截,不针对某个需求、不针对某个具体工程。权威口径见 docs/harness/CI.md;这里讲它跟 git 流程的接口。
三层分工(各管一层,别混):
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.
- 4d ago First seen · 88 lines · 166 tokens per session scan C d1ded17be965
hc-git-workflow is a skill published in the GitHub repository harness-base/harness-control (22 stars, last pushed 1mo ago), licensed MIT. It adds 166 tokens to every session and 1,788 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
auto-perf-optimize
Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.
chat-perf
Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…