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 skills add wan-huiyan/agent-traffic-control --skill async-doc-hook-autodocs-worktree-locks-branch-checkoutgit clone --depth 1 https://github.com/wan-huiyan/agent-traffic-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/wan-huiyan/agent-traffic-control/async-doc-hook-autodocs-worktree-locks-branch-checkout)<a href="https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/async-doc-hook-autodocs-worktree-locks-branch-checkout"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/async-doc-hook-autodocs-worktree-locks-branch-checkout/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/wan-huiyan/agent-traffic-control/async-doc-hook-autodocs-worktree-locks-branch-checkout"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/async-doc-hook-autodocs-worktree-locks-branch-checkout.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.00251 | $0.01214 |
| Opus 5 | $0.00125 | $0.00607 |
| Sonnet 5 | $0.00050 | $0.00243 |
| Haiku 4.5 | $0.00025 | $0.00121 |
Grade A, and why
async-doc-hook-autodocs-worktree-locks-branch-checkout 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 — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Async doc-update hook spawns an autodocs worktree that locks your branch
Problem
This repo's async post-commit hook ("running doc update in background") materializes its own
git worktree (e.g. .claude/worktrees/autodocs-<topic>) and checks out the branch you just
committed to. Git only allows a branch to be checked out in ONE worktree, so a subsequent
git checkout <that-branch> in your main worktree fails:
fatal: '<branch>' is already used by worktree at
'/…/.claude/worktrees/autodocs-<topic>'
It also surfaces indirectly: a code-review subagent you pointed at the PR may report file
paths under .../worktrees/autodocs-<topic>/... — that's the hook's worktree, not yours.
Context / Trigger conditions
- You committed on a feature branch; the commit output included
[post-commit] Python files changed — running doc update in background.... - You then try to switch back to that branch (e.g. to apply a review fix) and git refuses.
- A subagent's review cites an
autodocs-*path. - Sibling symptom (different fix): the same hook also leaves
index.lockbehind →Unable to create '.git/worktrees/<name>/index.lock'→ that'srm -f(see See also).
Solution
- Confirm the hook committed nothing to your branch (it usually only reads/regenerates
docs and leaves them uncommitted):
If local == remote == your commit and the range is empty, the autodocs worktree added nothing — safe to remove.git rev-parse <branch> # local tip git rev-parse origin/<branch> # remote tip (if pushed) git log --oneline <your-sha>..<branch> # empty = no extra commits - Force-remove the autodocs worktree to free the branch:
git worktree remove --force .claude/worktrees/autodocs-<topic> git worktree list | grep autodocs # should be gone - Now checkout works. Clear any leftover lock first if present:
rm -f .git/worktrees/<your-worktree>/index.lock git checkout <branch>
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 · 90 lines · 251 tokens per session scan A 32d38a94bd3a
async-doc-hook-autodocs-worktree-locks-branch-checkout is a skill published in the GitHub repository wan-huiyan/agent-traffic-control (3 stars, last pushed 6d ago), licensed MIT. It adds 251 tokens to every session and 1,214 once invoked, about $0.0013 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
cloudflare-workers-ci-cd
Complete CI/CD guide for Cloudflare Workers using GitHub Actions and GitLab CI. Use for automated testing, deployment pipelines, preview environments, secrets management, or encountering deployment failures, workflow errors, environment configuration issues.
claude-code-bash-patterns
Claude Code Bash tool patterns with hooks, automation, git workflows. Use for PreToolUse hooks, command chaining, CLI orchestration, custom commands, or encountering bash permissions, command failures, security guards, hook configurations.
bump-sdk-version
Bump the FutureSearch SDK version across all files. Use when releasing a new SDK version, updating version numbers, or the user says bump version, release, version bump.
pr-check
PR review compliance: fetch review comments from an open PR, categorize as resolved/unresolved/dismissed, critically evaluate fixable items, implement approved fixes, and reply inline. Pass --unattended to halt on human-judgment items (emitted as Pending-Human) instead of prompting via AskUserQuestion.
babysit
PR babysitter: monitors CI status, auto-rebases when behind, auto-fixes CI where possible, delegates review comment handling to dlc:pr-check, and re-requests review after fixes. Designed for /loop usage with Remote Control.
git-ops
Git hygiene: clean up merged branches, prune stale remotes, and verify repository state.