fork-and-pr

fork-and-pr is a skill for Claude Code from j-256/agent-skills. It costs 61 tokens per session (2,044 once invoked), scanned A, original, MIT.

A guide for sending one proposed change from a GitHub fork to the original repository as a pull request. A fork is your personal copy of a repository, and the pull request is the review request for the project’s maintainers.

In plain words
What is it for?
Use it to create or use a fork, make a branch and commit, push the branch, and open a pull request to an upstream repository.
Why use it?
It explains the Git and GitHub commands needed when you do not have permission to push to the original project. It is focused on one branch and one pull request.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the fork-and-pr plugin — 1 skill shipped together

Good fit Use it to create or use a fork, make a branch and commit, push the branch, and open a pull request to an upstream repository.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/j-256/agent-skills/fork-and-pr
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 j-256/agent-skills --skill fork-and-pr
Clone the repo
git clone --depth 1 https://github.com/j-256/agent-skills

Made for: Claude Code.

Or install fork-and-pr, the plugin that ships this one along with the rest of its 1 skill.

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 fork-and-pr

README.md
[![agentmods](https://agentmods.dev/badge/skills/j-256/agent-skills/fork-and-pr/github.svg)](https://agentmods.dev/skills/j-256/agent-skills/fork-and-pr)
Your own site
<a href="https://agentmods.dev/skills/j-256/agent-skills/fork-and-pr"><img src="https://agentmods.dev/badge/skills/j-256/agent-skills/fork-and-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 fork-and-pr

Your own site · 80×15
<a href="https://agentmods.dev/skills/j-256/agent-skills/fork-and-pr"><img src="https://agentmods.dev/badge/skills/j-256/agent-skills/fork-and-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,044 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.00061 $0.02044
Opus 5 $0.00030 $0.01022
Sonnet 5 $0.00012 $0.00409
Haiku 4.5 $0.00006 $0.00204

Measured 9d ago against content hash 373da81a28bc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

fork-and-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 9d 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/fork-and-pr/skills/fork-and-pr/SKILL.md · 162 lines

How it starts

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

Fork and PR

Walk a contributor through the standard "fork + branch + commit + push + PR" flow against a GitHub repo they don't have write access to. The user knows what they want to change; this skill codifies the boring gh/git syntax around it so they don't have to remember it.

When this applies

Trigger when the user wants to contribute upward to a repo they don't own. Common phrasings: "I want to make a PR to X", "contribute a fix to X", "fork and PR", "open a PR against the upstream X repo", or right after a git push fails with 403 on a clone of someone else's repo.

Skip when:

  • The user owns the repo (just git push + gh pr create – no fork needed).
  • The user is hitting a SAML SSO 403 on gh itself (Resource protected by organization SAML enforcement). That's a one-time per-org token authorization at https://github.com/settings/tokens, not a per-PR step. Tell them to grant SSO on their gh CLI token and retry; don't try to drive that through this skill.
  • The contribution is a stacked-diff or multi-PR series (this skill assumes one branch → one PR).

Inputs from the user

Usually one or more of:

  • Upstream repo (owner/name or full URL, e.g. SalesforceCommerceCloud/plugin_sitemap).
  • What they want to change (a one-line intent, used to suggest a branch name).
  • Where they're starting from – fresh, or already inside a clone.

If the upstream repo isn't named, ask. If the intent isn't named, ask before step 3 (branch naming) – not before steps 1–2.

Flow

The skill runs as a staged flow with a deliberate pause after workspace setup. The user makes their edits and commits before the publish steps resume.

Step 1: State check

Figure out the user's starting state. Run, in the directory the user is operating from:

git rev-parse --show-toplevel 2>/dev/null
git status --short 2>/dev/null
git remote -v 2>/dev/null
gh repo view <upstream> --json viewerPermission,parent 2>&1
gh api user --jq .login
gh repo view <user>/<repo> --json parent 2>/dev/null

Read the full file on GitHub · 162 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. 9d ago First seen · 162 lines · 61 tokens per session scan A 373da81a28bc

Subscribe to this mod's changes

fork-and-pr is a skill published in the GitHub repository j-256/agent-skills (2 stars, last pushed 6d ago), licensed MIT. It adds 61 tokens to every session and 2,044 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-31.

Related

Other skills, from other repositories

git-workflow

A guide for handling Git repository work safely, including status checks, branches, commits, pushes, pull requests, and rebasing. Git is a version-control system that records code changes and coordinates work between developers.

laolaoshiren/claude-code-skills-zh · 73 tokens

history-portability

Import Claude Code or Codex history and move complete CCAM datasets between machines. Use when rescanning provider history, importing a copied directory, uploading JSONL or archives, exporting a backup, restoring it idempotently, or verifying that tokens, workflows, runs, rules, and pricing survived.

hoangsonww/Claude-Code-Agent-Monitor · 63 tokens

changelog-gen

A changelog generator that turns Git history into a version-by-version record of project changes. A changelog is a readable summary of new features, fixes, breaking changes, documentation, and other updates.

laolaoshiren/claude-code-skills-zh · 19 tokens

release

CONTRIBUTOR TOOL - Cut a plugin release: bump plugin.json version, finalize CHANGELOG, update README if needed, gate on make ci, commit, tag vX.Y.Z, and create the GitHub release. Use when shipping a new plugin version. NOT distributed.

oliver-kriska/claude-elixir-phoenix · 60 tokens

changelog-rules

Shared changelog conventions and formatting rules referenced by /create-changelog and /update-changelog. Not typically invoked directly.

tobihagemann/turbo · 29 tokens

reply-to-pr-threads

Draft, confirm, and post replies to GitHub PR review threads. Handles per-category reply formatting, re-fetches thread resolution state so auto-resolved threads are skipped, and posts via GraphQL. Use when the user asks to "reply to PR threads", "post PR thread replies", or "draft PR reply messages".

tobihagemann/turbo · 71 tokens