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 gha-pr-merge-ref-shows-upstream-changesgit 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/gha-pr-merge-ref-shows-upstream-changes)<a href="https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/gha-pr-merge-ref-shows-upstream-changes"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/gha-pr-merge-ref-shows-upstream-changes/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/gha-pr-merge-ref-shows-upstream-changes"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/gha-pr-merge-ref-shows-upstream-changes.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.00306 | $0.02427 |
| Opus 5 | $0.00153 | $0.01213 |
| Sonnet 5 | $0.00061 | $0.00485 |
| Haiku 4.5 | $0.00031 | $0.00243 |
Grade A, and why
gha-pr-merge-ref-shows-upstream-changes 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 — 228 lines — stays where its author put it; the contents beside it link to each section on GitHub.
GHA pull_request Event Uses Merge-Ref, Not Head-Ref
Problem
You push a commit to a PR branch at T0. CI starts running at T0+10s. A sibling PR merges to main at T0+5s. Your CI run sees the sibling's changes mixed into your branch and fails on something neither side introduced alone.
Most confusingly: locally on the exact same commit SHA, every check
passes. gh run view <N> --json headSha reports your SHA correctly.
git show <SHA>:<file> shows your file is clean. But CI failed on that
SHA citing duplicates / conflicts / violations that aren't there.
Context / Trigger Conditions
- CI failure on a
pull_requestevent (NOTpush) - Failure cites a violation in a file you didn't touch in your last push
- The same SHA passes the same check locally
gh run view <N> --json headShamatches your local HEADgit fetch origin main && git rev-list --left-right --count origin/main...HEADshows main is ahead by 1+ commits since your push- The failure message references identifiers / strings present in main
but not in your branch (e.g. "duplicate ID
X" whereXwas added to main by a PR that merged seconds before your CI ran) - You're in a dense parallel-PR window (multiple PRs merging within minutes — release day, mass-merge sweep, several agents shipping concurrently)
Root cause
GitHub Actions, when triggered by pull_request: [opened, synchronize, reopened, ...], checks out a SYNTHETIC ref called refs/pull/<N>/merge.
This ref is the **3-way merge of refs/pull/<N>/head + refs/heads/main
- their merge-base**, recomputed by GitHub every time either side changes.
Concretely:
Local view: your-branch-HEAD (clean)
CI view: merge(your-branch-HEAD, main-HEAD-at-CI-start) (may have collisions)
GitHub regenerates the merge ref whenever:
- The PR branch is pushed
- The base branch (main) receives a new commit
- The PR is rebased / force-pushed
If main moves between your push and your CI's checkout step, the merge ref includes main's NEW state plus your 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 · 228 lines · 306 tokens per session scan A ae915941032c
gha-pr-merge-ref-shows-upstream-changes is a skill published in the GitHub repository wan-huiyan/agent-traffic-control (3 stars, last pushed 6d ago), licensed MIT. It adds 306 tokens to every session and 2,427 once invoked, about $0.0015 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.
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.
claude-plugin-repo-ci-release
Wire up CI validation and automatic release-cutting for a Claude Code plugin or marketplace repo (a repo with a .claude-plugin/marketplace.json and plugins/). Adds two GitHub Actions — a structure validator that runs on every PR/push, and a release-on-version-bump job that cuts a GitHub Release whenever a VERSION file…
abd-devops
ABD DevOps agent: scaffolds CI/CD, validates .env.example coverage, checks Dockerfile hygiene, and handles release tasks.
pr-watch
Local PR watcher. Monitors CI status, automatically fixes failing checks by reading failure logs and applying targeted fixes, then optionally merges when all checks pass. Local CLI analog to Claude Code's cloud auto-fix feature.
swarm-migrate
Cross-repo migration swarm — one coordinator + N parallel subagents (one per target repo) that apply the same transformation, open PRs, wait for CI, and report back to a shared JSON ledger. Coordinator handles topology, conflict auto-rebase, and stop-on-novel-failure. Use when bumping a shared dependency, rolling out…