sync-local-repos

sync-local-repos is a skill for Claude Code, Codex from vinta/hal-9000. It costs 38 tokens per session (773 once invoked), scanned A, original, MIT.

A Git workflow that updates the default branch in every local repository in a workspace, then rebases the current branch onto it. Rebasing reapplies your branch's commits on top of the newer base.

In plain words
What is it for?
Use it to sync one repository or a group of sibling repositories from their remote origin. It is intended for local Git workspaces.
Why use it?
It reduces drift between local checkouts and their remote default branches. Keeping branches current can expose conflicts before more work builds on them.

Skill for Claude CodeCodex

Written for Claude Code and Codex: allowed-tools in frontmatter, but also agents/openai.yaml present. Also seen: names the AskUserQuestion tool; mentions Claude Code; mentions Codex.

Part of the hal-skills plugin — 13 skills shipped together

Good fit Use it to sync one repository or a group of sibling repositories from their remote origin. It is intended for local Git workspaces.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vinta/hal-9000/sync-local-repos
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add vinta/hal-9000 --skill sync-local-repos
Clone the repo
git clone --depth 1 https://github.com/vinta/hal-9000

Made for: Claude Code, Codex.

Or install hal-skills, the plugin that ships this one along with the rest of its 13 skills.

Wrote 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.

agentmods badge for sync-local-repos

README.md
[![agentmods](https://agentmods.dev/badge/skills/vinta/hal-9000/sync-local-repos/github.svg)](https://agentmods.dev/skills/vinta/hal-9000/sync-local-repos)
Your own site
<a href="https://agentmods.dev/skills/vinta/hal-9000/sync-local-repos"><img src="https://agentmods.dev/badge/skills/vinta/hal-9000/sync-local-repos/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.

agentmods 80×15 button for sync-local-repos

Your own site · 80×15
<a href="https://agentmods.dev/skills/vinta/hal-9000/sync-local-repos"><img src="https://agentmods.dev/badge/skills/vinta/hal-9000/sync-local-repos.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 773 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.00773
Opus 5.5 $0.00015 $0.00309
Sonnet 5.5 $0.00008 $0.00155
Haiku 4.5 $0.00004 $0.00077

Measured yesterday against content hash f095ca256f0f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sync-local-repos 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 yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/sync_local_repos.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/sync-local-repos/SKILL.md · 39 lines

What it actually says

sync-local-repos

Use AskUserQuestion in Claude Code or request_user_input in Codex when available to ask the user anything below.

  1. Pick the folder to sync from the session's working directory. The repo's main checkout is git rev-parse --path-format=absolute --git-common-dir without the trailing /.git.

    • this: the main checkout, so only that repo is synced.
    • all or no argument, working directory not inside a git repo: the working directory, whose repos sit directly inside it.
    • all or no argument, working directory inside a repo: the folder holding the main checkout and its sibling repos, normally the main checkout's parent. When that folder holds no other repo, the repo is probably linked into the real folder by a symlink: find it with find ~ -maxdepth 3 -lname <main checkout> 2>/dev/null and use the symlink's folder. When neither gives a folder of sibling repos, ask the user which folder to sync.
  2. Run scripts/sync_local_repos.py from this skill's folder with that folder and the working directory:

    python3 ${CLAUDE_SKILL_DIR}/scripts/sync_local_repos.py "<folder>" "<working directory>"
    

    It fast-forwards each main checkout's default branch (pull --ff-only when checked out, fetch origin <def>:<def> otherwise), then rebases the branch at the working directory onto origin/<def>. Done when it exits: 0 means every step succeeded, 1 means a FAIL repo line or a STOP line.

  3. Settle each FAIL and STOP line:

    • FAIL on a repo: report the git error; a checkout whose default branch diverged from origin needs the user's call.
    • STOP <upstream> has N commits <branch> lacks: someone pushed work to the branch that this checkout does not have. Report the listed commits and ask the user before pulling them in. A remote that only holds the same commits rebased, or an older copy of them, does not stop the script: it adopts or rebases past them on its own.
    • STOP uncommitted changes, STOP merge commits, STOP conflict: report the files or commits listed and ask the user how to proceed. A conflict was already aborted, so the branch is unchanged.
  4. A rebased branch that was already pushed needs a force-push. Ask the user first, then push with a lease on the tip the remote holds, so a teammate's newer push makes it fail:

    git push --force-with-lease=<branch>:<old tip> origin <branch>
    
  5. When nothing needs the user, report one line: Synced <folder>: all N repos ok on their default branch, plus ; rebased <branch> onto origin/<def> when the branch moved. Otherwise lead with what needs the user (each FAIL and STOP, a tree check asking for review, a pending force-push), then the repos that moved, the branch's old and new tip, and whether anything was pushed. Never list checks that passed.

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. yesterday First seen · 39 lines · 38 tokens per session scan A f095ca256f0f

Subscribe to this mod's changes

sync-local-repos is a skill published in the GitHub repository vinta/hal-9000 (144 stars, last pushed yesterday), licensed MIT. It adds 38 tokens to every session and 773 once invoked, about $0.0002 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-11-29.

Related

sync-local-repos compared with skills from other repositories

sync-local-repos next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sync-local-reposvinta/hal-9000Skill144yesterdayMITA38Claude Code, Codex
mem0-test-integrationmem0ai/mem0Skill70k3d agoApache-2.0A207Claude Code, Codex
create-releasecocoindex-io/cocoindexSkill12k2d agoApache-2.0A202Claude Code, Codex
python-releaseComposioHQ/composioSkill31ktodayMITA53Claude Code, Codex
ghbubbuild/bubSkill1.7k3d agoApache-2.0A96Claude Code, Codex
factory-deferred-repositorieswarpdotdev/warpSkill66kyesterdayAGPL-3.0A53Claude Code, Codex
pr-watchsonichi/sutandoSkill413todayMITA125Claude Code