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 git-stash-pop-pulls-unrelated-stashgit 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/git-stash-pop-pulls-unrelated-stash)<a href="https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/git-stash-pop-pulls-unrelated-stash"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/git-stash-pop-pulls-unrelated-stash/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/git-stash-pop-pulls-unrelated-stash"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/git-stash-pop-pulls-unrelated-stash.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.00221 | $0.01808 |
| Opus 5 | $0.00111 | $0.00904 |
| Sonnet 5 | $0.00044 | $0.00362 |
| Haiku 4.5 | $0.00022 | $0.00181 |
Grade A, and why
git-stash-pop-pulls-unrelated-stash 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 12d 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 — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.
git stash pop pulls an unrelated stash when preceding git stash was a no-op
Problem
You defensively wrap a risky operation with git stash / ... / git stash pop
to preserve in-progress work. The working tree is clean, so git stash prints
"No local changes to save" and exits 0. Later, git stash pop pulls in
modifications from a different branch's stash entry — sometimes months old,
sometimes from another worktree, often producing merge conflicts in files you
never touched in this session.
Context / Trigger Conditions
You'll see one or more of:
git stashimmediately echoed "No local changes to save"git stash popruns without error and announces something likeOn branch <X>: WIP on <other-branch>: <sha> <commit-msg-from-elsewhere>git statusafterward shows:- Modified or unmerged files you didn't touch
both modified: <path>for paths from unrelated features- Filenames matching files on entirely different branches
git stash listshows entries likestash@{0}: WIP on feature/sca-polish: ...that reference branches you're not on
Root Cause
The stash stack is a global, branch-agnostic, LIFO data structure, shared
across every worktree of the repo. git stash pop always pops stash@{0} —
it doesn't care which branch the stash was created on. When git stash is a
no-op (clean tree), nothing is pushed onto the stack, so a subsequent
git stash pop reaches whatever was on top before this session — potentially
unrelated work from another branch, sometimes from months ago.
Solution
Prevent
- Don't pair
git stash/git stash popreflexively. Check the output ofgit stashfirst:git stash push -m "session-N defensive snapshot" 2>&1 | tee /tmp/stash-msg grep -q "Saved working directory" /tmp/stash-msg && DID_STASH=1 || DID_STASH=0 # ... do risky thing ... [ "$DID_STASH" = "1" ] && git stash pop - Always use
-mwithgit stash pushso your stash entries are identifiable ingit stash list. - Audit before popping when you're unsure:
git stash list | head -5 # show top of stack git stash show -p stash@{0} # full diff - Use a worktree-scoped stash alternative. Instead of
git stash, commit to a throwaway branch:git checkout -b /tmp/snapshot-$$ git add -A && git commit -m "snapshot" git checkout - # later: git cherry-pick /tmp/snapshot-$$ ; git branch -D /tmp/snapshot-$$
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.
- 12d ago First seen · 178 lines · 221 tokens per session scan A ac4292caaa1c
git-stash-pop-pulls-unrelated-stash is a skill published in the GitHub repository wan-huiyan/agent-traffic-control (3 stars, last pushed today), licensed MIT. It adds 221 tokens to every session and 1,808 once invoked, about $0.0011 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.