git-sync

git-sync is a skill for Claude Code from basher83/lunar-claude. It costs 95 tokens per session (1,043 once invoked), scanned A, original, MIT.

A Git workflow step that updates a local branch with changes from the shared remote repository. Git is the system that records code changes and lets teams share them.

In plain words
What is it for?
It is for bringing a branch up to date through a fast-forward or merge, without rebasing or force-pushing.
Why use it?
It reduces the risk of overwriting other people's work by checking the repository state and stopping when changes conflict.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the blake-os plugin — 4 skills shipped together

Good fit It is for bringing a branch up to date through a fast-forward or merge, without rebasing or force-pushing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/basher83/lunar-claude/git-sync
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 basher83/lunar-claude --skill git-sync
Clone the repo
git clone --depth 1 https://github.com/basher83/lunar-claude

Made for: Claude Code.

Or install blake-os, the plugin that ships this one along with the rest of its 4 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 git-sync

README.md
[![agentmods](https://agentmods.dev/badge/skills/basher83/lunar-claude/git-sync/github.svg)](https://agentmods.dev/skills/basher83/lunar-claude/git-sync)
Your own site
<a href="https://agentmods.dev/skills/basher83/lunar-claude/git-sync"><img src="https://agentmods.dev/badge/skills/basher83/lunar-claude/git-sync/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 git-sync

Your own site · 80×15
<a href="https://agentmods.dev/skills/basher83/lunar-claude/git-sync"><img src="https://agentmods.dev/badge/skills/basher83/lunar-claude/git-sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,043 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 85
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
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.00095 $0.01043
Opus 5.5 $0.00038 $0.00417
Sonnet 5.5 $0.00019 $0.00209
Haiku 4.5 $0.00010 $0.00104

Measured 2mo ago against content hash 0789ed373a25, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

git-sync 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 2mo 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.

plugins/personal/blake-os/skills/git-sync/SKILL.md · 93 lines

How it starts

The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git Sync

Bring the local branch current with origin. Fast-forward when the branch is only behind; merge to integrate when local and remote have both moved. Never rebase, never force-push, never resolve conflicts automatically.

When to run

  • The router (blake-os:git-ops) sends a "get the latest" request
  • As the integrate step of a full backup, after git-commit — a clean working tree is required (Step 3), which is why the router commits first
  • Directly, only on the exact request "git pull" or "git sync"

Workflow

Step 1: Verify repo and remote

git rev-parse --is-inside-work-tree >/dev/null 2>&1 && echo "in_repo: yes"
git remote get-url origin
git branch --show-current

If not a git repo, stop: "This directory is not a git repository." If no origin remote, stop: "No remote configured." Do not invent one.

Step 2: Fetch and measure state

git fetch origin
git rev-list --left-right --count @{u}...HEAD   # output: "<behind>	<ahead>"
git status --porcelain                          # any output = dirty working tree

If git fetch fails (network, auth), report the error verbatim and stop. Do not pull.

The rev-list line prints two numbers: behind (commits the remote has that the local branch doesn't) and ahead (local commits the remote doesn't have). These two numbers drive the decision in Step 3 — not error-message text. (If @{u} errors because no upstream is set, the branch has never been pushed; there is nothing to sync — tell the user to git-push to publish it.)

Step 3: Act on the measured state

behind = 0 — already current. If ahead > 0, note there are unpushed commits (run git-push). Done.

behind > 0 and ahead = 0 — simple fast-forward:

git pull --ff-only

On success, report how many commits were pulled. If it fails because the working tree is dirty (local changes would be overwritten), stop — list the blocking files and tell the user to commit them with git-commit or set them aside, then sync again. Do not stash.

Read the full file on GitHub · 93 lines

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. 2mo ago First seen · 93 lines · 95 tokens per session scan A 0789ed373a25

Subscribe to this mod's changes

git-sync is a skill published in the GitHub repository basher83/lunar-claude (23 stars, last pushed today), licensed MIT. It adds 95 tokens to every session and 1,043 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-03.

Related

git-sync compared with skills from other repositories

git-sync next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
git-syncbasher83/lunar-claudeSkill23todayMITA95Claude Code
merge-batchdiegosouzapw/OmniRouteSkill85k2d agoMITA46Claude Code
prowler-commitprowler-cloud/prowlerSkill15ktodayApache-2.0A44Claude Code, Codex
gh-auth-isolationgithub/gh-awSkill5.6ktodayMITA20Claude Code, Codex
comet-githubrpamis/cometSkill3.3ktodayMITA72Claude Code, Codex
github-skillzeenie-ai/OpenCompanySkill1.1ktodayMITA51Claude Code
re0-mergeLilMGenius/paperthinSkill1.4ktodayMITA51Claude Code, Codex