agentleFS
palpenpalpen/claude-skills/sync/SKILL.md

sync

Skill0 starsChanged 7 months agoMITView on GitHub

Pull latest main and rebase the current feature branch on top of it. Handles conflicts gracefully. Use when asked to "sync", "rebase on main", "pull latest", "update branch", or "catch up with main".

  • Deletes or force-pushes
  • Commits and pushes

54 other projects use a version of this.

Adopted by

Most recently taken up by

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.
  • hong9LeeSkill

    develop

    빌드, 아키텍처, git 관련 작업 시 OMS MSA 공통 인프라 규칙을 적용한다. 기술 스택, 빌드 명령, 헥사고날 아키텍처 구조, git 워크플로우, AI Context 동기화 규칙을 다룬다. 코드 작성 컨벤션은 /convention, 테스트 컨벤션은 /test-guide 스킬을 참조.

    Also in 6 projects that use this

  • YuriNachosSkill

    scope

    Configure claude-scope status line widgets for Claude Code. Use when user wants to customize widgets, change theme, reorder elements, or modify display style.

    Also in 7 projects that use this

  • nicolasestremSkill

    document

    Create focused documentation for specific components or features

    Also in 5 projects that use this

  • kt057Skill

    check

    lint, typecheck, test を一括実行して結果をサマリーする

    Also in 6 projects that use this

  • Microsoft AzureSkill

    test

    Also in 8 projects that use this

  • Microsoft AzureSkill

    validate

    Run the full CI validation workflow locally before submitting a PR. Use this as a final check to ensure all Azure DevOps CI pipeline steps will pass.

    Also in 4 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 11 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 47 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 2

    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
  1. Distinctive:

    Run git branch --show-current — if on main, stop and warn ("You're on main, nothing to sync.")

    line 23
  2. Distinctive:

    Run git status --porcelain — if there are uncommitted changes, stop and say: "You have uncommitted changes.

    line 24
  3. Distinctive:

    If already up to date (no output), say "Already up to date with main." and stop.

    line 29
  4. Distinctive:

    If the rebase succeeds cleanly, report success: "Rebased on latest main (N new commits).

    line 35
  5. Distinctive:

    If there are conflicts:

    line 36
  6. Very specific:

    Run git diff --name-only --diff-filter=U to list conflicted files

    line 37
  7. Very specific:

    After resolving each file, run git add <file>

    line 40
  8. Distinctive:

    When all conflicts are resolved, run git rebase --continue

    line 41
  9. Distinctive:

    If a conflict is ambiguous and you can't confidently resolve it, run git rebase --abort, report the conflicted files, and ask the user to …

    line 42
  10. Distinctive:

    Never force-push after a rebase unless the user explicitly asks.

    line 48
  11. Distinctive:

    Never rebase main itself.

    line 49
  12. Distinctive:

    If the working tree is dirty, refuse to start — don't stash automatically (the user may have staged changes intentionally).

    line 50
  13. Distinctive:

    After a successful rebase, remind the user: "You'll need to force-push (git push --force-with-lease) to update the remote branch."

    line 51

“Common” is measured: kept by at least 6 in 10 of the 47 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Sync — Rebase on Latest Main

Pull the latest main branch and rebase the current feature branch on top of it.

Steps

  1. Preflight checks:
    • Run git branch --show-current — if on main, stop and warn ("You're on main, nothing to sync.")
    • Run git status --porcelain — if there are uncommitted changes, stop and say: "You have uncommitted changes. Commit or stash them first, then run /sync again."
  2. Fetch — run git fetch origin main to get the latest without modifying anything.
  3. Check divergence — run git log HEAD..origin/main --oneline to see how many commits behind you are.
    • If already up to date (no output), say "Already up to date with main." and stop.
    • Otherwise, report how many commits behind: "Branch is N commits behind main. Rebasing..."
  4. Rebase — run git pull --rebase origin main.
  5. Handle conflicts:
    • If the rebase succeeds cleanly, report success: "Rebased on latest main (N new commits). You're up to date."
    • If there are conflicts:
      • Run git diff --name-only --diff-filter=U to list conflicted files
      • Report the conflicted files to the user
      • Attempt to resolve each conflict by reading the file, understanding both sides, and making the correct edit
      • After resolving each file, run git add <file>
      • When all conflicts are resolved, run git rebase --continue
      • If a conflict is ambiguous and you can't confidently resolve it, run git rebase --abort, report the conflicted files, and ask the user to resolve manually
  6. Verify — run git log --oneline -5 and report the current state.

Rules

  • Never force-push after a rebase unless the user explicitly asks.
  • Never rebase main itself.
  • If the working tree is dirty, refuse to start — don't stash automatically (the user may have staged changes intentionally).
  • After a successful rebase, remind the user: "You'll need to force-push (git push --force-with-lease) to update the remote branch."

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.