Fork a public GitHub repo, make it private, and keep it automatically synced with the upstream — from A to Z.
Concrete example: Suppose your team uses Claude Code and you want to manage a shared set of skills (for example obra/superpowers) for your entire organization. To do this, you need to:
- Fork the public skills repo into your org's private GitHub
- Keep it private so you can add internal customizations without exposing them
- Automatically pull upstream improvements daily so your team always gets the latest skills
The same pattern applies anywhere you want to privately maintain and customize a public open-source repo — internal tooling, config templates, AI prompts, documentation bases, and more.
| File | Purpose |
|---|---|
.github/workflows/sync-upstream.yml |
GitHub Actions workflow — runs daily, syncs your fork with upstream |
skills/fork-private-sync/SKILL.md |
Skill that automates the entire setup — requires the Claude desktop app (or Claude Code) with the Claude in Chrome extension; the Claude.ai web chat does not work |
- A GitHub account (personal or org)
- The URL of the public repo you want to fork privately
- Go to the public repo on GitHub (e.g.,
https://github.com/obra/superpowers) - Click Fork in the top-right corner
- Select your account or org as the destination
- Click Create fork
GitHub won't allow changing visibility to private while the repo is still part of the upstream fork network — you must detach it first.
- In your new fork, go to Settings
- Scroll to Danger Zone at the bottom
- Click Leave fork network (or "Convert to independent repository")
- Type the repo name to confirm, then click the confirmation button
- Still in Settings → Danger Zone
- Click Change repository visibility → Make private
- Type the repo name to confirm, then click the confirmation button
- In your fork, click Add file → Create new file
- Name it:
.github/workflows/sync-upstream.yml - Copy the contents of
sync-upstream.ymlfrom this repo - Replace
UPSTREAM_URL_HEREwith your upstream URL (e.g.,https://github.com/obra/superpowers.git) - Click Commit changes… → Commit directly to main → Commit changes
- In your fork, go to the Actions tab
- Click Sync upstream in the left sidebar
- Click Run workflow → Run workflow (green button)
- Wait ~10 seconds — you should see a green ✓
The workflow now runs every day at 06:00 UTC automatically. No further setup needed — GITHUB_TOKEN is provided automatically by GitHub Actions, no secrets to configure.
The fork-private-sync skill tells Claude exactly what to do — it will open GitHub in Chrome and handle every step: fork, leave fork network, make private, add the sync workflow, and test it.
Prerequisites: This requires the Claude desktop app (or Claude Code) with the Claude in Chrome browser extension connected. Claude needs browser control to click through GitHub. The Claude.ai web chat does not work — it has no browser control.
Get the skill — pick one:
- Copy — open
SKILL.mdon GitHub and click the copy icon in the top-right of the file view to copy the full contents - Download — download
SKILL.mddirectly
Then paste it into Claude with your request, for example:
[paste SKILL.md contents here]
---
Fork https://github.com/obra/superpowers privately into my GitHub account and set up daily upstream sync.
Claude will take it from there.
Every day at 06:00 UTC (or on-demand via Actions tab):
1. Checkout your fork's main branch (always latest HEAD)
2. Fetch all branches from upstream
3. Merge upstream/main into your main (fast-forward only)
4. Push to your fork
→ If your fork has diverged (custom commits), the sync skips safely
Key design decisions:
ref: mainin checkout — ensures the workflow always operates on the current HEAD, not the SHA that triggered it. Without this, the push fails with a non-fast-forward error whenmainhas been updated since the workflow was triggered.--ff-onlymerge — protects your custom commits. If you've made changes on your fork'smainthat aren't in upstream, the workflow exits cleanly instead of overwriting your work.actions/checkout@v5— uses Node.js 24, avoiding the deprecation warning that affects@v4from June 2026.- No secrets needed —
GITHUB_TOKENis automatically injected by GitHub Actions.
MIT