sync-github-forks
Skill1 starsChanged 4 days agoMITView on GitHub
Use when the user asks to "sync github forks", "sync forks", "pull all my forks", or wants to clone and pull all their GitHub forked repositories automatically across Windows, Linux, or macOS.
- Reads credentials
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-orchestratorSkill
- algorithmic-complexity-analyzerSkill
- api-securitySkill
- architectural-planningSkill
- caching-queues-reviewerSkill
- code-reviewerSkill
- csharp-developerSkill
- design-pattern-detectorSkill
- detect-overengineeringSkill
- github-security-scanner-hookSkill
- java-developerSkill
- legacy-code-modernizationSkill
- llm-as-judgeSkill
- load-memorySkill
- nodejs-executorSkill
- playwright-bdd-testerSkill
- powershell-writerSkill
- python-api-writerSkill
- python-developerSkill
- python-linterSkill
- react-developerSkill
- remote-pod-log-analyzerSkill
- save-memorySkill
- scan-halucinated-testsSkill
- scan-repo-readmeSkill
- skill-creatorSkill
- sql-connectorSkill
- sql-executorSkill
- trace-code-contextSkill
- troubleshoot-and-fixSkill
- typescript-developerSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 59
Run gh auth status — confirm you are logged in.
- Distinctive: line 60
Run the appropriate bundled script for your OS (see Usage above).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Sync GitHub Forks
Sync all GitHub forks for the authenticated user by cloning missing repositories and pulling existing ones via the gh CLI.
IMPORTANT: Both cross-platform scripts are already bundled with this skill. Do NOT create new script files. Detect the OS and run the bundled script:
- Windows (PowerShell) →
.github/skills/sync-github-forks/scripts/sync-forks.ps1- Linux / macOS (Bash) →
.github/skills/sync-github-forks/scripts/sync-forks.sh
Prerequisites
ghCLI installed and authenticated (gh auth login)gitonPATH- Linux / macOS only:
jqonPATH(Windows PowerShell uses built-inConvertFrom-Json) - SSH key configured with GitHub (for clone/pull via SSH)
Usage
Windows (PowerShell):
# Optional: override clone location (default: ~\git-repos)
$env:BASE_DIR = "$env:USERPROFILE\code"
pwsh .github/skills/sync-github-forks/scripts/sync-forks.ps1Linux / macOS (Bash):
# Optional: override clone location (default: ~/git-repos)
export BASE_DIR=~/code
bash .github/skills/sync-github-forks/scripts/sync-forks.shWhat the Script Does
- Checks required CLI tools (
ghandgit, plusjqon Linux/macOS). - Derives your GitHub username automatically via
gh api user. - Paginates
GET /user/repos?type=forks&per_page=100&page=Nviagh apiuntil all forks are fetched. - For each fork:
- Local directory exists →
git pull origin <current-branch>(fast-forward). - Local directory missing →
git clone <ssh_url> $BASE_DIR/<name>.
- Local directory exists →
- Prints a final summary:
Done — cloned N, pulled N, failed N.
Key Decisions
ghCLI handles authentication — noGITHUB_TOKENenvironment variable required.- Username is derived at runtime from
gh api user— no hardcoded configuration. - SSH clone URLs are used so no token is embedded in the remote URL.
- Pagination ensures all forks are fetched beyond the 100-repo API limit.
Verification
- Run
gh auth status— confirm you are logged in. - Run the appropriate bundled script for your OS (see Usage above).
- Confirm repositories are cloned or updated in
BASE_DIR.
Additional Resources
references/sync-github-forks-reference.md— Pagination mechanics, SSH vs HTTPS troubleshooting, and cron/Task Scheduler automation.scripts/sync-forks.ps1— Windows PowerShell implementation.scripts/sync-forks.sh— Linux / macOS Bash implementation.
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.

