gha-pr-merge-ref-shows-upstream-changes

gha-pr-merge-ref-shows-upstream-changes is a skill for Claude Code from wan-huiyan/agent-traffic-control. It costs 306 tokens per session (2,427 once invoked), scanned A, original, MIT.

A guide to GitHub Actions checks that run against a temporary combination of a pull-request branch and the current main branch. This combined version may include changes merged from another pull request.

In plain words
What is it for?
Use it to investigate pull-request-only failures, identify the code actually tested, and distinguish your branch's problems from newly merged main-branch changes.
Why use it?
It explains why CI can fail on code you did not change even though the same commit passes locally.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions Claude Code.

Part of the agent-traffic-control plugin — 118 skills shipped together

Good fit Use it to investigate pull-request-only failures, identify the code actually tested, and distinguish your branch's problems from newly merged main-branch changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wan-huiyan/agent-traffic-control/gha-pr-merge-ref-shows-upstream-changes
Install

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.

Any agent
npx skills add wan-huiyan/agent-traffic-control --skill gha-pr-merge-ref-shows-upstream-changes
Clone the repo
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control

Made for: Claude Code.

Or install agent-traffic-control, the plugin that ships this one along with the rest of its 118 skills.

Wrote 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.

agentmods badge for gha-pr-merge-ref-shows-upstream-changes

README.md
[![agentmods](https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/gha-pr-merge-ref-shows-upstream-changes/github.svg)](https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/gha-pr-merge-ref-shows-upstream-changes)
Your own site
<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.

agentmods 80×15 button for gha-pr-merge-ref-shows-upstream-changes

Your own site · 80×15
<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>
Per session 306 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,427 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00306 $0.02427
Opus 5.5 $0.00122 $0.00971
Sonnet 5.5 $0.00061 $0.00485
Haiku 4.5 $0.00031 $0.00243

Measured 3mo ago against content hash ae915941032c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 3mo 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.

plugins/agent-traffic-control/skills/gha-pr-merge-ref-shows-upstream-changes/SKILL.md · 228 lines

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_request event (NOT push)
  • 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 headSha matches your local HEAD
  • git fetch origin main && git rev-list --left-right --count origin/main...HEAD shows 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" where X was 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.

Read the full file on GitHub · 228 lines

Changes

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.

  1. 3mo ago First seen · 228 lines · 306 tokens per session scan A ae915941032c

Subscribe to this mod's changes

gha-pr-merge-ref-shows-upstream-changes is a skill published in the GitHub repository wan-huiyan/agent-traffic-control (3 stars, last pushed 4d ago), licensed MIT. It adds 306 tokens to every session and 2,427 once invoked, about $0.0012 per session on Opus 5.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.

Related

gha-pr-merge-ref-shows-upstream-changes compared with skills from other repositories

gha-pr-merge-ref-shows-upstream-changes next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gha-pr-merge-ref-shows-upstream-changeswan-huiyan/agent-traffic-controlSkill34d agoMITA306Claude Code
cloudflare-workers-ci-cdsecondsky/claude-skillsSkill2578d agoMITA50Claude Code
babysitrube-de/cc-skillsSkill11yesterdayMITA53Claude Code
abd-devopsRealDougEubanks/ClaudeMarketplaceSkill11mo agoMITA30Claude Code
claude-plugin-repo-ci-releasewan-huiyan/claude-ecosystem-hygieneSkill13mo agoMITA308Claude Code
dependency-upgradesecondsky/claude-skillsSkill2578d agoMITA34Claude Code
bun-sveltekitsecondsky/claude-skillsSkill2578d agoMITA26Claude Code