private-fork-sync
Skill3 starsChanged 2 months agoMITView on GitHub
Make a public GitHub fork private and keep it synced with its upstream parent. Use when the user wants to make a fork private, or to pull/sync newer commits from the upstream parent into their fork.
- Commits and pushes
In this repository28 other files it gives its agents.
- affix-domainsSkill
- apple-designSkill
- asus-esc8000-firmware-upgradeSkill
- asus-esc8000-gpu-bios-tuningSkill
- build-stealth-rustdeskSkill
- chrome-cdp-setupSkill
- cua-macos-lume-sandboxSkill
- deploy-kimi-k26-on-rtx-pro-6000Skill
- deploy-kimi-k3-on-rtx-pro-6000Skill
- deploy-stealth-rustdeskSkill
- ghostty-terminfoSkill
- herdr-rename-hookSkill
- llm-inference-benchmarkSkill
- lxd-docker-firewall-conflictSkill
- mac-mini-as-headless-serverSkill
- macos-dual-instanceSkill
- macos-smb-serverSkill
- mac-smb-automountSkill
- openclaw-diagnoseSkill
- paseo-profilesSkill
- refresh-claude-accountSkill
- ssh-claude-authSkill
- sync-claude-accountsSkill
- to-featuresSkill
- trusted-publishSkill
- ubuntu-lxd-gpu-serverSkill
- ubuntu-nvidia-gpu-enablementSkill
- ubuntu-zfs-mirror-installSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
If the direct change is ever rejected (e.g.
- Very specific: line 30
Add the parent as a fetch-only upstream remote, with push disabled so you can never accidentally push to a repo you don't own:
- Very specific: line 62
If master has already diverged, git rev-list above shows a nonzero left count and the merge stops fast-forwarding — move those commits onto …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Convert a fork's visibility to private, then keep it current by fetching from the parent. The whole workflow stays effortless on one condition: the fork's default branch is a clean mirror of upstream, so every sync is a fast-forward — no merge commits, no conflicts.
Prerequisite: gh authenticated with repo scope, plus a local clone of the fork. Examples use master; if the repo's default branch is main, substitute it (gh repo view <owner>/<fork> --json defaultBranchRef -q .defaultBranchRef.name).
Make a fork private
GitHub now converts a fork's visibility in place — historically this was blocked, which is why mirror-clone workarounds still circulate; you don't need them.
gh repo edit <owner>/<fork> --visibility private --accept-visibility-change-consequences--accept-visibility-change-consequences is required, and the command prints nothing on success.
Completion: gh repo view <owner>/<fork> --json visibility,isPrivate reports PRIVATE / true.
Tell the user two consequences:
- While private, you can't open PRs from the fork to the public parent. Reverse with
--visibility public --accept-visibility-change-consequenceswhen you want to contribute upstream. - Anyone who could see the public fork now needs to be added as a collaborator.
If the direct change is ever rejected (e.g. org policy), fall back to the documented mirror method: create a new private repo, then git clone --bare the fork and git push --mirror into it.
Set up syncing (one-time)
Add the parent as a fetch-only upstream remote, with push disabled so you can never accidentally push to a repo you don't own:
git remote add upstream https://github.com/<parent-owner>/<repo>.git
git remote set-url --push upstream DISABLE
git fetch upstreamCompletion: git remote -v shows upstream fetch plus push URL DISABLE.
Sync when upstream has new commits
git fetch upstream
git checkout master
git merge upstream/master
git push origin masterOne-liner alternative (relies on the same clean mirror condition): gh repo sync <owner>/<fork> -b master then git pull origin master.
Completion: git rev-list --left-right --count master...upstream/master prints 0 0 (local neither ahead nor behind).
Keep the mirror clean
The fast-forward guarantee holds only while master carries no commits of your own. Custom work goes on a separate branch, never on the mirror branch:
git switch -c my-changes # do your work here, not on master
git switch my-changes && git rebase master # pick up upstream after each syncIf master has already diverged, git rev-list above shows a nonzero left count and the merge stops fast-forwarding — move those commits onto a branch and hard-reset master to upstream/master to restore the mirror.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

