Sync Upstream
nyaruka/phonenumbers
Sync this Go port with a new upstream google/libphonenumber release — regenerate the embedded metadata and reconcile the ported Java logic.
Compare this project's base prompts and model metadata against a Claude Code release.
$ npx skills add nklisch/claude-code-modes --skill sync-upstream -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install nklisch/claude-code-modes sync-upstream --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/nklisch/claude-code-modes.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/sync-upstream .claude/skills/sync-upstream && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "sync-upstream" agent skill from https://github.com/nklisch/claude-code-modes/tree/main/.claude/skills/sync-upstream into .claude/skills/sync-upstream/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sync-upstream", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/nklisch/claude-code-modes/tree/main/.claude/skills/sync-upstreamType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add nklisch/claude-code-modes --skill sync-upstream -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install nklisch/claude-code-modes sync-upstream --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nklisch/claude-code-modes.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/sync-upstream .agents/skills/sync-upstream && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "sync-upstream" agent skill from https://github.com/nklisch/claude-code-modes/tree/main/.claude/skills/sync-upstream into .agents/skills/sync-upstream/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sync-upstream", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add nklisch/claude-code-modes --skill sync-upstream -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install nklisch/claude-code-modes sync-upstream --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nklisch/claude-code-modes.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/sync-upstream .cursor/skills/sync-upstream && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "sync-upstream" agent skill from https://github.com/nklisch/claude-code-modes/tree/main/.claude/skills/sync-upstream into .cursor/skills/sync-upstream/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sync-upstream", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/nklisch/claude-code-modes.git --path .claude/skills/sync-upstream--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add nklisch/claude-code-modes --skill sync-upstream -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install nklisch/claude-code-modes sync-upstream --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nklisch/claude-code-modes.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/sync-upstream .gemini/skills/sync-upstream && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "sync-upstream" agent skill from https://github.com/nklisch/claude-code-modes/tree/main/.claude/skills/sync-upstream into .gemini/skills/sync-upstream/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sync-upstream", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install nklisch/claude-code-modes sync-upstreamInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add nklisch/claude-code-modes --skill sync-upstream -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/nklisch/claude-code-modes.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/sync-upstream .github/skills/sync-upstream && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "sync-upstream" agent skill from https://github.com/nklisch/claude-code-modes/tree/main/.claude/skills/sync-upstream into .github/skills/sync-upstream/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sync-upstream", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add nklisch/claude-code-modes --skill sync-upstream -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install nklisch/claude-code-modes sync-upstream --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nklisch/claude-code-modes.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/sync-upstream .opencode/skills/sync-upstream && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "sync-upstream" agent skill from https://github.com/nklisch/claude-code-modes/tree/main/.claude/skills/sync-upstream into .opencode/skills/sync-upstream/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sync-upstream", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
sync-upstreamCompare this project's base prompts and model metadata against a Claude Code release.
Sync Upstream is an agent skill from nklisch/claude-code-modes. Compare this project's base prompts and model metadata against a Claude Code release. Extracts and greps the upstream prompt assembly, finds both drift in tracked fragments and content we never tracked at all, classifies each change as intentional omission or real drift, and applies approved updates. Use when user says "sync upstream", "check for drift", "new CC version", or runs /sync-upstream.
Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/fragment-map.md` and `references/intentional-omissions.md`).
The repository describes itself as: CLI launcher for Claude Code with behaviorally-tuned system prompts — control agency, quality, and scope instead of fighting the defaults. The licence is MIT.
Read from SKILL.md and the folder at commit 4dbbb28. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
BashReadEditGrepGlobWriteAskUserQuestionFrom allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
bunnpmFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Sync Upstream loads about 1.8k tokens when it runs, and up to ~11k if it reads all its reference files. Until then it costs about 103 tokens; SKILL.md has 914 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Bash, Read, Edit, Grep, Glob, Write, AskUserQuestionAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from nklisch/claude-code-modes at commit 4dbbb28, republished under its MIT licence (© nklisch). 914 words, ~1,772 tokens.
.claude/skills/sync-upstream/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Keep prompts/base/, prompts/lean/, the prompt-bundle modifiers, and the model
table in src/env.ts aligned with what Claude Code actually sends.
This is an investigation, not a checklist. The sections below describe what has to be true when you're done and the tools available to get there — how you sequence them is yours to judge. Two things are not yours to judge: confirm the target version before doing the work, and get changes approved before applying them.
Three prompt shapes exist upstream, assembled by one function that forks on a model-capability predicate. All three matter here:
| Shape | Who gets it | Tracked in |
|---|---|---|
| standard head | models without lean_prompt | prompts/base/ |
| lean head | models with lean_prompt | prompts/lean/ |
| shared tail | everyone, both heads | duplicated in both bases |
| bundle sections | models with opus_5_prompt_bundle | prompts/modifiers/ |
Capabilities also drive --base auto, so the model table in src/env.ts is part
of the sync, not a side note: a new flagship changes which base users get by default.
references/fragment-map.md holds the current local↔upstream mapping and the marker strings to find each piece. references/intentional-omissions.md holds every difference that is deliberate.
bun run scripts/extract-upstream-prompt.ts [version] pulls named prompt functions
into upstream-prompts/. It is the fastest path for what it covers, which is
the standard head and not much else. It does not extract the shared tail, the lean
head, the bundle sections, or model capabilities.
For anything it misses, grep the release binary directly:
npm pack @anthropic-ai/claude-code-linux-x64@<version> && tar xzf *.tgz # → package/claudeIt's ~275 MB, so slice by byte offset in Python rather than running wide regexes:
data = open("package/claude","rb").read()
i = data.find(b"<marker text>")
print(data[i-4000:i+4000].decode("utf8","replace"))Useful anchors: search a distinctive sentence to land in the assembler, then read
outward. strings -n 8 package/claude | grep -o 'id:"claude-[a-z0-9-]*"[^}]\{0,220\}'
gets the model table with its capabilities arrays.
Diffing two extractions is the cheapest first move. If a previous version's file
is still in upstream-prompts/, diff it against the new one — most releases are
pure minifier churn (ja_ → aO_) with one or two real sentence changes, and the
diff isolates them in seconds. Ignore renamed symbols, template-variable syntax, and
whitespace; they are noise.
You may be running under one of these prompts yourself. If so, your own system prompt is a live sample of what a real session receives — worth more than inference about which branch fires. Use it to confirm, and say so when you report.
The mapping files are a record of what we already know. Diffing only against them
can never surface content we never tracked — that blind spot is exactly how the
shared tail sections went missing from prompts/base/ for several releases.
So each sync, spend some effort in the other direction: read the assembler's return value and account for every section it can emit. For each one, land in a category and be able to say which:
Watch for gates that turn out to mean something other than their name suggests. A
branch filed as "some terser variant" may be a whole prompt shape; a "compact"
mode may be reachable on exactly one model in one experiment. When a gate's meaning
is unresolved, resolving it is usually higher-value than diffing another fragment,
because an unresolved gate can hide an entire category of content.
New content that lands in axis territory is a new omission, not drift. The test:
would carrying it in a base contradict any value of the agency, quality, or scope
axes? Read the axis fragments and check rather than guessing — # Delivering work
looked like neutral guidance until its scope sentences were read against
scope/unrestricted.
Report grouped by classification, with the specific changed text for each drift
item, and an explicit count of what didn't change so the user can see coverage. Then
get approval — AskUserQuestion with a multi-select works well when there are
several independent items.
When applying:
MODEL_TABLE,
MODEL_ALIASES, and the "most recent Claude models" line in every base's env.md.scripts/generate-prompts.ts and
src/embedded-prompts.test.ts, plus the manifest and the fragment counts in the
count tests and CLAUDE.md.CLAUDE.md and README.md.bun test.The reference files are the durable output of every sync — more so than the prompt edits, which git already records. Before finishing, make sure they reflect what you learned: new mappings and refreshed minified names in fragment-map.md; new or newly-grounded omissions in intentional-omissions.md.
Record resolved mysteries, not just changes. "vE is the lean predicate" and
"YFc returns false outright, so that section is dead code" are the findings that
save the next sync the most time, and neither shows up as a diff.
© nklisch, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (references) in .claude/skills/sync-upstream of nklisch/claude-code-modes.
Open the folder on GitHubat commit 4dbbb28
Sync Upstream next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Sync Upstream this skillnklisch/claude-code-modes | 116 | — | ~1.8k | Automated safety check: Notes | MIT | |
| Sync Upstreamnyaruka/phonenumbers | 1.6k | — | ~2.8k | Automated safety check: Pass | MIT | |
| Upstream Syncevloghq/evlog | 1.9k | — | ~856 | Automated safety check: Pass | MIT | |
| Knowledge Basesickn33/agentic-awesome-skills | 47k | 1 repos | ~3.3k | Automated safety check: Pass | MIT | |
| React Syncvercel/next.js | 143k | — | ~486 | Automated safety check: Pass | MIT | |
| Sync Upstream Radiustalkincode/toughradius | 691 | — | ~736 | Automated safety check: Pass | MIT |
nyaruka/phonenumbers
Sync this Go port with a new upstream google/libphonenumber release — regenerate the embedded metadata and reconcile the ported Java logic.
evloghq/evlog
Check the eve and Vercel Connect ecosystem for updates and new features, keep the app current with them, and replace workarounds with the real improvements.
sickn33/agentic-awesome-skills
Knowledge base register: article title, category, department, owner, tags, summary, linked SOP, audience, last and next review dates and status.
vercel/next.js
Build local React changes in the bundle variants consumed by Next.js, sync them into a local Next.js checkout, and test the resulting integration.
talkincode/toughradius
Track and sync the upstream layeh.com/radius library to the org fork talkincode/radius (TR-F021/TR-F022).
thedotmack/claude-mem
Checks claude-mem cloud sync status and guides you through connecting a cmem.ai Pro account without the sync token ever passing through the chat.
nklisch/claude-code-modes
Project structural organization rules for Bun/TypeScript CLI.
nklisch/claude-code-modes
Project stylistic refactoring rules for Bun/TypeScript CLI. An agent skill from nklisch/claude-code-modes.
nklisch/claude-code-modes
Project code patterns and conventions. An agent skill from nklisch/claude-code-modes.
Compare this project's base prompts and model metadata against a Claude Code release. Sync Upstream is an agent skill from nklisch/claude-code-modes. Compare this project's base prompts and model metadata against a Claude Code release.
Sync Upstream fits situations like: user says sync upstream; check for drift; runs /sync-upstream.
Run `npx skills add nklisch/claude-code-modes --skill sync-upstream -a claude-code`. Or copy the skill folder (.claude/skills/sync-upstream in nklisch/claude-code-modes) into .claude/skills/sync-upstream in your project. Claude Code loads it when a task matches its description.
Run `npx skills add nklisch/claude-code-modes --skill sync-upstream -a codex`. Or copy the skill folder (.claude/skills/sync-upstream in nklisch/claude-code-modes) into .agents/skills/sync-upstream in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nklisch/claude-code-modes --skill sync-upstream -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sync-upstream, .gemini/skills/sync-upstream, .github/skills/sync-upstream and .opencode/skills/sync-upstream in your project.
Going by SKILL.md and its folder, Sync Upstream needs the command-line tools its instructions call (bun and npm). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Bash, Read, Edit, Grep, Glob, Write, AskUserQuestion.
SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Sync Upstream is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 9.2k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Sync Upstream: Sync Upstream (nyaruka/phonenumbers, 1.6k stars), Upstream Sync (evloghq/evlog, 1.9k stars), Knowledge Base (sickn33/agentic-awesome-skills, 47k stars) and React Sync (vercel/next.js, 143k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
nklisch (a GitHub user) maintains it in nklisch/claude-code-modes, which has 116 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 1, 2026.
Source: nklisch/claude-code-modes on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.