upstream-sync
Skill259 starsChanged 27 days agoMITView on GitHub
Sync the fork with upstream ggml-org/llama.cpp every 3 days - check for an open sync PR, merge upstream step by step without losing fork code, validate with the benchmarks on a Strix Halo machine, and open the PR with the results. Use when asked to sync, update from, catch up with, or pull upstream / ggml-org master into the fork. To check a sync PR someone else opened, use upstream-sync-verify.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- ilien-dev/quirontheir own version, first seen Nov 8, 2026
- Blueforce-Tech-Inc/BlueCortexCEtheir own version, first seen Nov 8, 2026
- lrstanley/skillstheir own version, first seen Nov 1, 2026
- shruthis4/claude-skillstheir own version, first seen Oct 20, 2026
- bradcstevens/git-loopy-skillstheir own version, first seen Oct 15, 2026
- chenson42/stackkeeltheir own version, first seen Sep 22, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- microsoft/intelligent-terminal★ 2.2ksame name
- ilien-dev/quiron★ 65same name
- Blueforce-Tech-Inc/BlueCortexCE★ 4same name
- chenson42/stackkeel★ 1same name
- dris1153/upstream-sync★ 1same name
- lrstanley/skills★ 1same name
- steven-pribilinskiy/tabby-claude-status★ 1same name
- bradcstevens/git-loopy-skills★ 0same name
- shruthis4/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-new-modelSkill
- code-reviewSkill
- upstream-sync-verifySkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 0 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Upstream wins only with numbers: When upstream now does what a fork change did, take upstream's version only if the fork change was not a …
- Very specific: line 22
No private data: No machine names, home paths or model paths in commits, PRs or the repo.
- Very specific: line 23
Always pass --repo halo-box/strix-llama.cpp to gh.
- Very specific: line 31
Do them in order. Each phase has its full instructions in references/: read the file when you reach the phase.
- Very specific: line 50
All are in skills/upstream-sync/scripts/ (not the repo's scripts/).
“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Upstream sync
Bring upstream/master (ggml-org/llama.cpp) into master (halo-box/strix-llama.cpp) without losing fork code, prove it with the benchmarks, and open the PR. Read SYNC.md and AGENTS.md first. halo-box/llama.cpp is archived and is not part of this sync.
Rules (do not deviate without asking)
- Merge, never rebase or squash
master. The sync goes on a branch and lands through a PR merged with "Create a merge commit". Squash drops the upstream ancestry and the next sync replays everything (seeSYNC.md). - Branch name:
sync/upstream-<YYYY-MM-DD>-<sha>, the day of the sync and the short sha of the last upstream commit it merges, for examplesync/upstream-2026-10-12-8019dc563. - Every 3 days. At about 25 upstream PRs a day, a sync brings about 75 upstream PRs, about 9 of them conflicting (measured: 37 in 13 days during the catch-up).
.github/workflows/upstream-sync-report.ymlposts the plan to an issue as a reminder. - One step per conflicting upstream PR. A step merges all clean upstream PRs up to and including the next one that conflicts with the fork, so each merge commit carries the conflicts of one upstream PR. A clean run is cut every 100 commits (
MAX_STEP). - Merge from the content base, not
git merge-base. Whilescripts/upstream-sync.baseexists (at the repo root), it holds the upstream commit whose content is really in the fork, andsync.sh mergemerges from it: after a reverted sync,git merge-baseclaims upstream commits whose content is gone, and a plaingit mergewould skip them.SYNC.mdexplains it and says when to delete the file. - Never drop fork code to make a conflict go away. Re-apply the fork behaviour on upstream's new code. If the right resolution is unclear, stop and ask.
- Upstream wins only with numbers. When upstream now does what a fork change did, take upstream's version only if the fork change was not a gfx1151 optimization, or if
llama-benchshows upstream is as fast. Otherwise keep the fork code. - Explain first, once. Before the first command, tell the user in a few short lines what this skill will do (the phases, what they change and fetch, from the scripts table below, and roughly how long), then ask "OK?" and wait. Do not ask again at each command: ask again only if the plan changes (more steps, a stop rule, a push or PR that was not announced). A scheduled run with nobody to ask counts as accepted for local work and a draft PR only (see Input).
- No private data. No machine names, home paths or model paths in commits, PRs or the repo. Use placeholders like
<model.gguf>. - Always pass
--repo halo-box/strix-llama.cpptogh. Never open anything against ggml-org/llama.cpp or halo-box/llama.cpp.
Input
The user may give how many steps to merge, or the upstream commit to stop at. Without it, show the plan of phase 1 and ask. When nobody can answer (a scheduled run), merge steps until the first stop rule of phase 2 applies, and open the PR as a draft.
Phases
Do them in order. Each phase has its full instructions in references/: read the file when you reach the phase.
- Check (references/1-check.md): no sync PR already open, the repo prepared (upstream remote, rerere), the step plan read and the number of steps agreed with the user.
- Do the steps (references/2-steps.md): for each step, merge from the content base, resolve each conflict by putting the fork change back on upstream's code, commit with one line per conflicted file,
verifythat no fork code was lost, build what the step can break. Stop at the stop rules. End with the CPU build andctest. - Write the PR body (references/3-pr-body.md): generate it with
summary, explain every edit outside the conflicts, choose the models from "Where upstream changes fork code" andmodels, fill the models tables and the checklist. - Verify with the benchmarks (references/4-benchmarks.md): on a Strix Halo machine,
validate.shcompares the fork before the sync with the sync branch on HIP and Vulkan (op tests, every archtest-llama-archssupports, a small model in every quant, KLD,llama-benchup to 128k depth, server, memory) and gives one status per backend. - Create the PR (references/5-create-pr.md): the body with the results, as a draft unless both backends pass.
Scripts
| Command | Does | Changes | Network |
sync.sh report | the step plan and the next step in detail (about a minute) | nothing (only unreferenced git objects for the plan) | fetches upstream |
sync.sh merge [sha] | merges one step from the content base and stops before the commit | the current branch's working tree and index (a merge in progress, its message, scripts/upstream-sync.base); refuses master and a dirty tree; undo with git merge --abort | none |
sync.sh verify <old> | every fork line still there (exit 0), or the files and lines to explain (exit 2); no conflict marker | nothing | none |
sync.sh summary <old> | the PR body: steps, conflicts, conflict zones, resolutions, edits outside conflicts | nothing (prints) | none |
sync.sh models <old>, sync.sh owners <old> | the model archs the sync concerns; where upstream changes fork code (git blame) | nothing | none |
validate.sh | builds the fork before the sync and the sync branch for HIP and Vulkan, runs every check, writes summary.md (hours) | an output directory (../sync-validate/<sha>: the worktrees and the candidate builds) and the baseline builds next to it (../sync-validate/base-builds, reused by later runs), about 40 GB the first time; the model cache, the GPU for the whole run; it runs the candidate's code with your environment. With --pr: rewrites the results section of the PR body, or posts a comment (--post comment) | fetches origin; downloads models (Hugging Face, anonymous) and the SPIR-V headers (GitHub) |
All are in skills/upstream-sync/scripts/ (not the repo's scripts/); run them from the repo root.
Example of the explanation at the start: "I will fetch upstream and show the plan, merge the steps on a new branch sync/upstream-<date>-<sha> (local only), then on this machine build and benchmark the fork before the sync and the branch (HIP and Vulkan: <duration from 4.2>, the GPU busy, about 40 GB in ../sync-validate/, models downloaded to the cache), and at the end push the branch and open the PR. OK?"
Abort
git merge --abort in the middle of a merge, or git switch master && git branch -D <sync branch>. master is never touched before the PR is merged.
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.

