push-to-forked-pr

push-to-forked-pr is a skill for Codex from hoangsonww/Claude-Code-Agent-Monitor. It costs 57 tokens per session (2,243 once invoked), scanned A, original, MIT.

A Git workflow for pushing changes directly to the branch that backs a GitHub pull request when that branch is stored in someone else’s fork.

In plain words
What is it for?
It is for updating an existing fork-based pull request without creating a new branch or pushing to the upstream repository.
Why use it?
It prevents accidentally updating the upstream repository instead of the pull request’s source branch and checks whether the push is permitted.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: reads .claude/ paths; mentions CLAUDE.md; installed under .agents/ (shared by several agents).

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash .claude/skills/file-headers/scripts/check-headers.sh.

Good fit It is for updating an existing fork-based pull request without creating a new branch or pushing to the upstream repository.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/hoangsonww/Claude-Code-Agent-Monitor
agentmods
npx agentmods add skills/hoangsonww/claude-code-agent-monitor/push-to-forked-pr

Made for: Codex.

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 push-to-forked-pr

README.md
[![agentmods](https://agentmods.dev/badge/skills/hoangsonww/claude-code-agent-monitor/push-to-forked-pr/github.svg)](https://agentmods.dev/skills/hoangsonww/claude-code-agent-monitor/push-to-forked-pr)
Your own site
<a href="https://agentmods.dev/skills/hoangsonww/claude-code-agent-monitor/push-to-forked-pr"><img src="https://agentmods.dev/badge/skills/hoangsonww/claude-code-agent-monitor/push-to-forked-pr/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 push-to-forked-pr

Your own site · 80×15
<a href="https://agentmods.dev/skills/hoangsonww/claude-code-agent-monitor/push-to-forked-pr"><img src="https://agentmods.dev/badge/skills/hoangsonww/claude-code-agent-monitor/push-to-forked-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,243 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00057 $0.02243
Opus 5 $0.00028 $0.01122
Sonnet 5 $0.00011 $0.00449
Haiku 4.5 $0.00006 $0.00224

Measured 13d ago against content hash 7a308a538365, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

push-to-forked-pr 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 13d 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.

.agents/skills/push-to-forked-pr/SKILL.md · 181 lines

How it starts

The opening of the file, as written. The whole thing — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.

push-to-forked-pr

The whole point of this skill: origin is usually the upstream, but the PR's head is on someone else's fork. Pushing to origin updates the upstream's branch, not the PR. You have to push to the fork.

GitHub allows this in two situations:

  1. You are the fork owner — straightforward, you own that branch.
  2. You are an upstream maintainer and the PR has maintainerCanModify: true (the "Allow edits from maintainers" checkbox the PR author leaves on by default). GitHub then lets the upstream's auth push to the fork branch.

If neither holds, abort and tell the user only the fork owner can push.


Procedure

1. Read the PR's head metadata

PR_NUMBER=<N>
gh pr view "$PR_NUMBER" --json state,headRefName,headRefOid,headRepository,headRepositoryOwner,maintainerCanModify,url

Capture:

  • state — bail if not "OPEN".
  • headRepository.nameWithOwner → the fork (e.g. someone/Repo).
  • headRepositoryOwner.login → the fork owner.
  • headRefName → the branch on the fork (usually matches local).
  • headRefOid → the PR's current head SHA. Your local HEAD must be a descendant.
  • maintainerCanModify → must be true if you are not the fork owner.

If headRepository.nameWithOwner matches the upstream's nameWithOwner, this PR is internal:

HEAD_BRANCH=$(gh pr view "$PR_NUMBER" --json headRefName --jq .headRefName)
HEAD_REF_OID=$(gh pr view "$PR_NUMBER" --json headRefOid --jq .headRefOid)
git merge-base --is-ancestor "$HEAD_REF_OID" HEAD && echo ok || echo NOT-DESCENDANT   # abort if NOT-DESCENDANT
git push origin "HEAD:${HEAD_BRANCH}"

Exit the skill once this push lands — do not continue to the fork-push steps below.

2. Confirm you can actually push

gh auth status                        # who am I?
git remote get-url origin             # fetch URL — confirm origin is the UPSTREAM, not the fork
git remote get-url --push origin      # push URL — can differ from the fetch URL if `pushurl` is configured

Read the full file on GitHub · 181 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 13d ago First seen · 181 lines · 57 tokens per session scan A 7a308a538365

Subscribe to this mod's changes

push-to-forked-pr is a skill published in the GitHub repository hoangsonww/Claude-Code-Agent-Monitor (991 stars, last pushed 4d ago), licensed MIT. It adds 57 tokens to every session and 2,243 once invoked, about $0.0003 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-30.