sync-branch
Skill2 starsChanged 21 days agoApache-2.0View on GitHub
Quickly sync current branch with main using rebase. Use when you need to pull latest main into your feature branch, before creating MR or after ongoing work. Fetches main, rebases, auto-stashes changes, optionally force-pushes.
- Deletes or force-pushes
- Commits and pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- longmajs/claude-skillstheir own version, first seen Oct 15, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- longmajs/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 repository124 other files it gives its agents.
- add-projectSkill
- ansible-configure-vmSkill
- api-smoke-testSkill
- appinterface-checkSkill
- attach-session-to-jiraSkill
- aws-rds-debugSkill
- beerSkill
- bootstrap-all-knowledgeSkill
- bootstrap-knowledgeSkill
- build-persona-styleSkill
- cancel-pipelineSkill
- cert-checkSkill
- check-ci-healthSkill
- check-integration-testsSkill
- check-mr-feedbackSkill
- check-my-prsSkill
- check-secretsSkill
- ci-retrySkill
- cleanup-branchesSkill
- cleanup-stale-executionsSkill
- clone-jira-issueSkill
- close-issueSkill
- close-mrSkill
- cloud-inventorySkill
- coffeeSkill
- compare-optionsSkill
- create-jira-issueSkill
- create-mrSkill
- create-slide-deckSkill
- data-migration-verifySkill
- debug-local-dbSkill
- debug-prodSkill
- deploy-to-ephemeralSkill
- dev-workflow-orchestratorSkill
- discovered-work-summarySkill
- edit-slide-deckSkill
- email-digestSkill
- environment-overviewSkill
- explain-codeSkill
- export-presentationSkill
- extend-ephemeralSkill
- find-similar-codeSkill
- gather-contextSkill
- gdrive-researchSkill
- gke-cluster-opsSkill
- hello-worldSkill
- hotfixSkill
- inscope-researchSkill
- investigate-alertSkill
- investigate-service-issuesSkill
- investigate-slack-alertSkill
- jira-hygiene-allSkill
- jira-hygieneSkill
- knowledge-refreshSkill
- konflux-statusSkill
- learn-architectureSkill
- learn-patternSkill
- list-presentationsSkill
- local-build-testSkill
- local-dev-environmentSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
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
- Very specific: line 28
Use repo, repo_name, issue_key, or cwd from config
- Very specific: line 34
If uncommitted changes and stash_changes: git_stash(repo, action="push", message="sync_branch: auto-stash before rebase")
- Distinctive: line 76
If conflicts: list files, resolution steps
- Very specific: line 77
If not pushed: git push --force-with-lease origin {branch}
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Sync Branch
Rebase current feature branch onto main. Less aggressive than rebase_pr — good for ongoing work.
Inputs
| Input | Type | Default | Purpose |
repo | string | cwd | Repository path |
repo_name | string | - | Config repo name (e.g. automation-analytics-backend) |
issue_key | string | - | Jira key to resolve repo |
base_branch | string | main | Branch to sync with |
stash_changes | bool | true | Stash uncommitted changes before rebase |
force_push | bool | false | Force push after successful rebase |
run_linting | bool | true | Run black/flake8 before force push |
Workflow
1. Load Persona
persona_load("developer")
2. Resolve Repository
- Use
repo,repo_name,issue_key, or cwd from config - Get
default_branchfrom config (usually main)
3. Pre-flight
git_status(repo)— get current branch, check uncommitted changes- Abort if on main/master
- If uncommitted changes and
stash_changes:git_stash(repo, action="push", message="sync_branch: auto-stash before rebase")
4. Fetch
git_fetch(repo, prune=true)
5. Check Commit Status
git_log(repo, range_spec="HEAD..origin/{base_branch}", count_only=true)— commits behindgit_log(repo, range_spec="origin/{base_branch}..HEAD", count_only=true)— commits ahead
6. Rebase (if behind > 0)
git_rebase(repo, onto="origin/{base_branch}")- On conflict: report conflict files, suggest
git add+git rebase --continue
7. Pop Stash (if stashed and rebase success)
git_stash(repo, action="pop")
8. Linting (if force_push and run_linting)
git_format/git_lint— black, flake8- Block push if lint fails
9. Force Push (if force_push and rebase success)
git_push(repo, branch="{current_branch}", force=true)
10. Memory
memory_session_log("Synced branch {branch}", "behind: X, rebased: success")- On conflict:
learn_tool_fix("git_rebase", "conflict", "Merge conflicts", "Resolve manually, git add, git rebase --continue")
MCP Tools
persona_loadgit_statusgit_stash(push/pop)git_fetchgit_loggit_rebasegit_pushmemory_session_loglearn_tool_fix
Output Summary
- Already up to date / Successfully rebased / Conflicts detected
- If conflicts: list files, resolution steps
- If not pushed:
git push --force-with-lease origin {branch}
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.

