git-concurrency-preflight

git-concurrency-preflight is a skill for Claude Code, Codex from sabbour/agentweaver. It costs 46 tokens per session (1,096 once invoked), scanned A, original, MIT.

A safety check for Git repositories where multiple coding sessions, agents, or worktrees may be active at the same time.

In plain words
What is it for?
Use it before large uncommitted changes, when another session is active, or before operations such as checkout, reset, rebase, or pull with rebase.
Why use it?
It reveals the current branch, worktrees, recent commits, and stashes before changes or risky Git operations could interfere with other work.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/sabbour/agentweaver/git-concurrency-preflight
Any agent
npx skills add sabbour/agentweaver --skill git-concurrency-preflight
Clone the repo
git clone --depth 1 https://github.com/sabbour/agentweaver

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-concurrency-preflight

README.md
[![agentmods](https://agentmods.dev/badge/skills/sabbour/agentweaver/git-concurrency-preflight.svg)](https://agentmods.dev/skills/sabbour/agentweaver/git-concurrency-preflight)
Your own site
<a href="https://agentmods.dev/skills/sabbour/agentweaver/git-concurrency-preflight"><img src="https://agentmods.dev/badge/skills/sabbour/agentweaver/git-concurrency-preflight.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,096 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00046 $0.01096
Opus 5 $0.00023 $0.00548
Sonnet 5 $0.00009 $0.00219
Haiku 4.5 $0.00005 $0.00110

Measured 5d ago against content hash 8ad01510f19b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

git-concurrency-preflight 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 5d 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.

.github/skills/git-concurrency-preflight/SKILL.md · 151 lines

How it starts

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

Git concurrency pre-flight

Use this skill when git state may be shared across multiple active sessions or agents. Typical triggers:

  • before starting large or multi-file uncommitted work in a shared checkout
  • when told another session/agent is doing significant concurrent work
  • before destructive git operations such as checkout, reset, rebase, or pull --rebase in a repo known to use concurrent sessions or many worktrees

This is repo-agnostic guidance. Agentweaver is the motivating example because it often has many .worktrees/ plus parallel Squad/Copilot sessions, but the same risk pattern applies anywhere multiple processes may touch the same clone.

Goal

Confirm whether the current working directory is isolated and whether local branch state still matches expectations before you add more uncommitted changes or run a destructive git command.

Run this exact pre-flight

git status --short --branch
git worktree list
git log <branch> -N --oneline
git log origin/<branch> -N --oneline
git stash list

Replace:

  • <branch> with the current branch from git status --short --branch
  • N with a small comparison window such as 5 or 10

How to interpret each result

1) git status --short --branch

Use this to confirm:

  • which branch you are actually on
  • whether the branch tracks a remote
  • whether git reports ahead/behind/diverged state
  • whether uncommitted changes are already present

Safe-ish result:

  • expected branch
  • no surprising ahead/behind/diverged marker
  • the uncommitted diff is understood and intentionally yours

Escalate/pause if:

  • the branch is not the one you expected
  • git reports unexpected divergence from the tracking branch
  • there is a large uncommitted diff you did not create or cannot confidently attribute

2) git worktree list

Use this to understand whether concurrent work is likely isolated in separate worktrees or happening in the exact same checkout.

Read the full file on GitHub · 151 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. 5d ago First seen · 151 lines · 46 tokens per session scan A 8ad01510f19b

Subscribe to this mod's changes

git-concurrency-preflight is a skill published in the GitHub repository sabbour/agentweaver (5 stars, last pushed today), licensed MIT. It adds 46 tokens to every session and 1,096 once invoked, about $0.0002 per session on Opus 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