sync
Skill0 starsChanged 4 months agoMITView on GitHub
Bring the current git repo and its remote to the same, newest state — fetch, then pull / rebase / commit / push as the divergence requires. Use when the user says /sync, "sync", "원격이랑 맞춰줘", "동기화", "최신으로 맞춰줘", "pull 받고 push 해줘", or otherwise asks to reconcile local and remote.
- Deletes or force-pushes
- Commits and pushes
50 other projects use a version of this.
Adopted by
Most recently taken up by
- microsoft/vscodetheir own version, first seen Nov 12, 2026
- thekinv21/NotificationServicetheir own version, first seen Oct 3, 2026
- GavinGreenwood/agentic-workflow-templatetheir own version, first seen Oct 2, 2026
- kapadias/nonnatheir own version, first seen Oct 1, 2026
- thekinv21/RBAC_Authenticationtheir own version, first seen Oct 1, 2026
- lurio84/claude-skillstheir own version, first seen Oct 1, 2026
Used with
Projects with it also use develop, scope and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
bamechoSkilldevelop
开发实施阶段详细规则;进入开发实施时读取;包含执行流程、代码规范、一致性审计、方案包迁移
Also in 6 projects that use this
vltingSkillscope
Interactive planning + orchestration. Approval-gated workflow covering saga→epic→task hierarchy via progressive scoping.
Also in 6 projects that use this
kt057Skillcheck
lint, typecheck, test を一括実行して結果をサマリーする
Also in 7 projects that use this
nicolasestremSkilldocument
Create focused documentation for specific components or features
Also in 5 projects that use this
Microsoft AzureSkilltest
Also in 9 projects that use this
jdonohooSkillarchitect
Architect Vern - Systems design, scalable architecture, production-grade thinking. The blueprints before the build.
Also in 7 projects that use this
Other versions50 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 50
- microsoft/vscode★ 196ksame name
- jsmastery-pro/skills★ 1.4ksame name
- H-mmer/pentest-agents★ 984same name
- cortex-tms/cortex-tms★ 182same name
- iurykrieger/claude-bedrock★ 104same name
- jdpolasky/ai-chief-of-staff★ 104same name
- grainulation/grainulator★ 86same name
- anombyte93/atlas-session-lifecycle★ 85same name
- tomascortereal/claude-code-setup★ 62same name
- lsnackerman/raw-clauding-skills★ 44same name
40 more not listed
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 repositoryOne other file it gives its agents.
- tunnelSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 10 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 45 edited versions we read keep these.
10
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
- could be automatic: a setting could enforce it
- Distinctive: line 12
Run these first and base every decision on the output:
- Distinctive: line 22
Use git rev-list, not git log, for the count — git log --count prints nothing through some shells.
- Very specific: line 24
Read the first line of git status -sb before anything else — it reports branch, upstream, unborn state, and a deleted upstream in one shot, …
- Very specific: line 29
No upstream at all (rev-parse '@{u}' fails).
- Distinctive: line 30
No remote configured (git remote prints nothing) — there is nothing to sync against.
- Distinctive: line 36
If git status --porcelain is non-empty:
- Distinctive: line 39
Ask whether to commit them or stash them for the duration.
- Distinctive: line 40
If committing: stage the files the user named (git add), write a commit message in the repo's existing style (check git log --oneline -20 …
- Very specific: line 41
If stashing: git stash push -u -m "sync: <timestamp>", finish the sync, then git stash pop and report any conflicts.
- Distinctive: line 42
Never git checkout --, git reset --hard, or git clean to get a clean tree.
- Distinctive: line 59
If unsure which, ask. Do not guess on a shared branch.
- Very specific: line 61
Never use git push --force or --force-with-lease unless the user explicitly asks for it in this conversation.
- Distinctive: line 65
If the pull/rebase stops on conflicts:
- Very specific: line 70
After resolving, run the repo's typecheck/test command if one is obvious from package.json before pushing.
- Distinctive: line 84
If the current branch is the default branch (main/master) and the user has local commits on it, mention that the repo convention may be to …
“Common” is measured: kept by at least 6 in 10 of the 45 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
sync — reconcile local and remote
One command that inspects the divergence between the current branch and its upstream, then does the smallest thing that leaves both sides on the same newest commit. Works in any repo. Never rewrites published history, never discards work without asking.
1. Read the state
Run these first and base every decision on the output:
git rev-parse --abbrev-ref HEAD # current branch
git rev-parse --abbrev-ref --symbolic-full-name '@{u}' # upstream (may fail)
git fetch --all --prune
git status --porcelain=v1 -b
git rev-list --left-right --count '@{u}...HEAD' # behind<TAB>aheadUse git rev-list, not git log, for the count — git log --count prints nothing through some shells.
Read the first line of git status -sb before anything else — it reports branch, upstream, unborn state, and a deleted upstream in one shot, and it succeeds in cases where rev-parse errors out. Stop and report, rather than proceeding, on any of these:
fatal: not a git repository— the directory is not a repo, or its.gitis incomplete (a.githolding onlyobjects, say). Nothing to sync; do not rungit initto "fix" it.## No commits yet on <branch>— unborn branch.rev-parse HEADfails and no count exists. If the remote has commits,git pullcan still populate it; otherwise there is nothing to sync until the first commit.## <branch>...<upstream> [gone]— the upstream branch was deleted on the remote (usually merged and cleaned up). Counting against it fails. Tell the user, and offer either re-pointing at the default branch (git switch main && git pull) or re-publishing this one (git push -u origin <branch>). Never delete the local branch for them.- No upstream at all (
rev-parse '@{u}'fails). Push it withgit push -u origin <branch>if the user wants it published; otherwise say so and stop. - No remote configured (
git remoteprints nothing) — there is nothing to sync against.
Detached HEAD (## HEAD (no branch)) has no upstream by definition — report it and stop rather than guessing a branch name.
2. Handle uncommitted work
If git status --porcelain is non-empty:
- Show the user the changed paths and a short
git diff --stat. - Ask whether to commit them or stash them for the duration. Do not decide silently — uncommitted work is the user's, and the answer changes what the rest of the run does.
- If committing: stage the files the user named (
git add), write a commit message in the repo's existing style (checkgit log --oneline -20for the convention — this repo family uses Conventional Commits with Korean bodies), and commit. - If stashing:
git stash push -u -m "sync: <timestamp>", finish the sync, thengit stash popand report any conflicts. - Never
git checkout --,git reset --hard, orgit cleanto get a clean tree.
3. Reconcile by divergence
Four cases, from the ahead/behind counts:
| behind | ahead | Action |
| 0 | 0 | Already in sync. Report and stop. |
| >0 | 0 | git pull --ff-only. Fast-forward, nothing else needed. |
| 0 | >0 | git push. |
| >0 | >0 | Diverged — see below. |
Diverged. Show both sides first (git log --oneline '@{u}..HEAD' and git log --oneline 'HEAD..@{u}'), then pick:
- Local commits are unpushed and private →
git pull --rebase, thengit push. Preferred default: linear history, no merge noise. - Local commits are already pushed elsewhere, or the branch is shared →
git pull --no-rebase(merge), thengit push. Rebasing published commits rewrites history other people have. - If unsure which, ask. Do not guess on a shared branch.
Never use git push --force or --force-with-lease unless the user explicitly asks for it in this conversation.
4. Conflicts
If the pull/rebase stops on conflicts:
- List the conflicted files (
git diff --name-only --diff-filter=U). - Resolve only conflicts whose intent is unambiguous (lockfiles, generated types, an import list where both sides clearly want their line). For anything touching real logic, show both sides and ask.
- Rebase:
git rebase --continueafter staging. Merge:git commit. Offergit rebase --abort/git merge --abortif the user would rather back out. - After resolving, run the repo's typecheck/test command if one is obvious from
package.jsonbefore pushing.
5. Report
End with a short summary the user can verify at a glance:
- branch and upstream
- what happened (fast-forwarded / rebased N commits / merged / pushed N commits / already in sync)
- final
git log --oneline -1for both local and@{u}, showing they match - anything left for the user: stash popped with conflicts, a branch with no upstream, tests not run
Notes
git fetch --prunedeletes remote-tracking refs for branches deleted on the remote. That is local bookkeeping only — it never touches the user's local branches.- If the current branch is the default branch (
main/master) and the user has local commits on it, mention that the repo convention may be to work on a feature branch — but still complete the sync they asked for. - With multiple remotes, sync against the branch's own upstream, not
originby assumption.
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.

