Push to Forked PR
A step-by-step skill for committing and pushing your working tree straight to a PR whose head branch lives on a fork — without touching origin/upstream.
Dev & CodingIntermediate★ 923⑂ 208AI score 9/10Last updated: Aug 19, 2026
What it does
- Reads PR metadata via
gh pr view: head repo, branch, head SHA, andmaintainerCanModify. - Distinguishes internal PRs (push to
origin) from fork PRs (add a one-off remote and push to the fork). - Verifies your local HEAD is a descendant of the PR head and that your commit email maps to a real GitHub account.
- Enforces guardrails: no
git add -A, exclude.claude/settings.local.json, never force-push someone else's branch without permission. - Confirms the push landed by comparing local HEAD to the PR's head SHA, then reports the URL and diff stat.
Who it's for
- Open-source maintainers editing contributor PRs that live on forks.
- Developers confused why
git push originnever updates the PR. - GitHub CLI users delegating PR updates to Claude Code.
Examples
- "Don't create a branch — push these changes directly to PR #412": the skill detects a fork head and pushes to the fork branch.
- Fixing a typo in a contributor's PR as a maintainer: it checks
maintainerCanModifyand aborts with a clear message if edits aren't allowed. - A
non-fast-forwardrejection: the failure-mode table steers you to fetch + rebase instead of a destructive force-push.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/hoangsonww/Claude-Code-Agent-Monitor/HEAD/.agents/skills/push-to-forked-pr/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the .agents/skills/push-to-forked-pr folder from the GitHub repo hoangsonww/Claude-Code-Agent-Monitor into my ~/.claude/skills/push-to-forked-pr/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/hoangsonww/Claude-Code-Agent-Monitor.git /tmp/ccam && mkdir -p ~/.claude/skills && cp -r /tmp/ccam/.agents/skills/push-to-forked-pr ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Make sure GitHub CLI is installed and authenticated:
gh auth status(rungh auth loginif not). - Clone the repo to a temp folder:
git clone https://github.com/hoangsonww/Claude-Code-Agent-Monitor.git /tmp/ccam - Create your skills folder:
mkdir -p ~/.claude/skills - Copy the skill in:
cp -r /tmp/ccam/.agents/skills/push-to-forked-pr ~/.claude/skills/ - Restart Claude Code and say something like "push this straight to PR #123" to trigger it.
- (Recommended) Edit step 5 of
~/.claude/skills/push-to-forked-pr/SKILL.mdto use your own project's test and build commands.
View source on GitHub ↗License: MIT