git-sync-check

git-sync-check is a skill for Claude Code, Codex from tuwulalo/git-sync-check. It costs 153 tokens per session (1,610 once invoked), scanned A, original, MIT.

A preliminary check of a Git repository's local and remote state before work begins. It looks for uncommitted changes and differences between the current branch and its remote branch.

In plain words
What is it for?
Use it before editing, reviewing, committing, or deploying code. It is also intended for repositories shared by multiple people or coding-agent sessions.
Why use it?
It helps avoid editing an outdated working tree or accidentally conflicting with changes made elsewhere.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it before editing, reviewing, committing, or deploying code. It is also intended for repositories shared by multiple people or coding-agent sessions.

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

Made for: Claude Code, Codex.

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-check

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/tuwulalo/git-sync-check/git-sync-check"><img src="https://agentmods.dev/badge/skills/tuwulalo/git-sync-check/git-sync-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 153 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,610 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.00153 $0.01610
Opus 5.5 $0.00061 $0.00644
Sonnet 5.5 $0.00031 $0.00322
Haiku 4.5 $0.00015 $0.00161

Measured 1mo ago against content hash 718cd028387b, 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-check 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 1mo ago.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/claim.ps1, scripts/claim.sh, scripts/preflight.ps1, …), 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.

SKILL.md · 131 lines

How it starts

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

Git sync pre-flight check

Several writers can touch the same working tree at once: the user, this session, and often a second Claude session that commits, builds and deploys in parallel. Your memory of the tree is stale the moment another writer acts. The point of this check is to learn the CURRENT state before you act on an outdated picture of it.

If the status is already in context

This skill ships with companion pre-flight scripts (see the repo README) that many setups run automatically before each turn, injecting a [git-sync] ... block into context. If you can see a fresh [git-sync] line for the current prompt, do NOT re-run the commands — the snapshot is already in front of you. Jump straight to the decision matrix and act on it.

The check

Run this before the first file edit of the task (one tool call):

git -C <repo> fetch origin --quiet
git -C <repo> status --short
git -C <repo> rev-list --left-right --count HEAD...origin/<default-branch>

When the default branch is unknown, resolve it first (falls back to main):

git -C <repo> symbolic-ref --short refs/remotes/origin/HEAD

Three signals come back: dirty files, ahead count (left), behind count (right).

Decision matrix

State What to do
Clean tree, 0 ahead / 0 behind Proceed. Report at most one line: ✅ git: чисто, синхронизировано
Behind, tree clean git pull --rebase origin <branch>, then proceed
Ahead only Note the unpushed commits. If they are complete work, push; if they look mid-flight (another session may still be working), leave them and say so
Dirty files Classify them first — see below. Never blindly commit or revert
Dirty AND behind Classify first, then follow the playbook below
Operation in progress (.git/MERGE_HEAD, .git/rebase-merge/, .git/rebase-apply/, CHERRY_PICK_HEAD) STOP. Someone is mid-merge/rebase. Don't edit, don't commit, don't git rebase --abort on your own initiative — report it and wait for instructions
Detached HEAD (git symbolic-ref HEAD fails) Don't commit onto it silently — a commit there is one GC away from being lost. Create/checkout a branch first, or ask which branch the work belongs on

Read the full file on GitHub · 131 lines

Files

What ships with it

6 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. 1mo ago First seen · 131 lines · 0 tokens per session scan A 718cd028387b

Subscribe to this mod's changes

git-sync-check is a skill published in the GitHub repository tuwulalo/git-sync-check (5 stars, last pushed 4mo ago), licensed MIT. It adds 153 tokens to every session and 1,610 once invoked, about $0.0006 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-08-31.

Related

Other skills, from other repositories