Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
← Back to list

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★ 1,039⑂ 245AI score 9/10Last updated: Oct 3, 2026

What it does

  • Reads PR metadata via gh pr view: head repo, branch, head SHA, and maintainerCanModify.
  • 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 origin never updates the PR.
  • GitHub CLI users delegating PR updates to Claude Code.

Examples

  1. "Don't create a branch — push these changes directly to PR #412": the skill detects a fork head and pushes to the fork branch.
  2. Fixing a typo in a contributor's PR as a maintainer: it checks maintainerCanModify and aborts with a clear message if edits aren't allowed.
  3. A non-fast-forward rejection: 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)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download 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.

  1. Make sure GitHub CLI is installed and authenticated: gh auth status (run gh auth login if not).
  2. Clone the repo to a temp folder: git clone https://github.com/hoangsonww/Claude-Code-Agent-Monitor.git /tmp/ccam
  3. Create your skills folder: mkdir -p ~/.claude/skills
  4. Copy the skill in: cp -r /tmp/ccam/.agents/skills/push-to-forked-pr ~/.claude/skills/
  5. Restart Claude Code and say something like "push this straight to PR #123" to trigger it.
  6. (Recommended) Edit step 5 of ~/.claude/skills/push-to-forked-pr/SKILL.md to use your own project's test and build commands.