Borrowing it
Nothing to install: this file belongs to Smana/cloud-native-ref. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Smana/cloud-native-ref/main/.agents/skills/sync-branch/SKILL.mdgit clone --depth 1 https://github.com/Smana/cloud-native-refWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/smana/cloud-native-ref/sync-branch)<a href="https://agentmods.dev/skills/smana/cloud-native-ref/sync-branch"><img src="https://agentmods.dev/badge/skills/smana/cloud-native-ref/sync-branch/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/smana/cloud-native-ref/sync-branch"><img src="https://agentmods.dev/badge/skills/smana/cloud-native-ref/sync-branch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00095 | $0.00978 |
| Opus 5.5 | $0.00038 | $0.00391 |
| Sonnet 5.5 | $0.00019 | $0.00196 |
| Haiku 4.5 | $0.00010 | $0.00098 |
Grade A, and why
sync-branch scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Sync branch onto origin/main
A branch that is behind origin/main produces a diff that no longer describes what will merge.
Reviews read the wrong merge base, CI passes against code nobody will ship, and conflicts surface
at merge time instead of now.
Run this before every review, push and PR — not only when a conflict is suspected.
1. Refuse the unsafe cases
Stop and report, do not proceed, when any of these hold:
| Condition | Check | Why |
|---|---|---|
| On the base branch itself | git branch --show-current is main |
nothing to rebase |
| Uncommitted changes | git status --porcelain is non-empty |
a rebase would strand them. Commit first — ship-it does this before calling you |
| Rebase already running | test -d "$(git rev-parse --git-path rebase-merge)", same for rebase-apply |
finish or abort it first |
Resolve that third one through git rev-parse --git-path, never as a literal .git/…. In a
worktree .git is a file, not a directory — it holds gitdir: …/.git/worktrees/<name> — so a
literal path can never match and the guard silently passes. This repo mandates a worktree for every
change, which would make the check dead everywhere it matters.
2. Fetch, then compare
The fetch is the point. Comparing against a local origin/main that was last updated hours ago
reports "up to date" on a branch that is not.
BASE="${BASE:-main}"
git fetch origin "$BASE"
if git merge-base --is-ancestor "origin/$BASE" HEAD; then
echo "up to date with origin/$BASE"
else
echo "behind origin/$BASE by $(git rev-list --count HEAD..origin/$BASE) commit(s)"
fi
When the branch is already up to date, say so and stop. Do not rebase for the sake of it — a no-op rebase still rewrites committer dates and invalidates anyone's local copy.
3. Rebase
git rebase "origin/$BASE"
On conflict, resolve one file at a time and preserve intent from both sides:
git status --short | grep '^UU' # conflicted files
# edit, then:
git add <file>
git rebase --continue
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 94 lines · 95 tokens per session scan A a0ac9c75171e
sync-branch is a skill published in the GitHub repository Smana/cloud-native-ref (104 stars, last pushed today), licensed Apache-2.0. It adds 95 tokens to every session and 978 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-18.
Other skills, from other repositories
argocd-expert
Expert-level ArgoCD GitOps deployment, application management, sync strategies, and production operations. Use when the user mentions GitOps, Kubernetes, continuous deployment, declarative, or automation, or when the task involves ArgoCD Architecture, Application CRD, AppProject, or ApplicationSet.
land-and-deploy
Land and deploy workflow. (gstack).
release-review
Review Orchard deployment manifests.
orchard-release
Check deployment evidence and recovery conditions.
network-rca
Kubernetes network root cause analysis skill powered by Kubeshark MCP. Use this skill whenever the user wants to investigate past incidents, perform retrospective traffic analysis, take or manage traffic snapshots, extract PCAPs, dissect L7 API calls from historical captures, compare traffic patterns over time, detect…
mirrord-prev-env
Help users create and manage mirrord preview environments — running a modified service as an isolated pod in a shared Kubernetes cluster, scoped by an environment key and HTTP/queue traffic filtering, so teams can validate and review changes against real traffic without affecting live services. Use when a developer…