git-sync-workspace

git-sync-workspace is a skill for Claude Code, Codex, Cursor from emaraschio/cursor-commands. It costs 85 tokens per session (1,305 once invoked), scanned A, original, MIT.

Sync every git repo in a Cursor multi-root workspace to its remote default branch: discover roots, preflight each repo, fetch --all --prune, checkout default, pull --ff-only. Skips dirty or unsafe repos with a clear report. Use for "sync workspace", "update all repos", "back to main", or reset workspace repos to…

Skill for Claude CodeCodexCursor

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/emaraschio/cursor-commands/git-sync-workspace
Any agent
npx skills add emaraschio/cursor-commands --skill git-sync-workspace
Clone the repo
git clone --depth 1 https://github.com/emaraschio/cursor-commands

Made for: Claude Code, Codex, Cursor.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/emaraschio/cursor-commands/git-sync-workspace.svg)](https://agentmods.dev/skills/emaraschio/cursor-commands/git-sync-workspace)
Your own site
<a href="https://agentmods.dev/skills/emaraschio/cursor-commands/git-sync-workspace"><img src="https://agentmods.dev/badge/skills/emaraschio/cursor-commands/git-sync-workspace.svg" alt="Measured on agentmods" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,305 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00085 $0.01305
Opus 5 $0.00043 $0.00652
Sonnet 5 $0.00017 $0.00261
Haiku 4.5 $0.00009 $0.00130

Measured today against content hash 6dad32dfa1b3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

git-sync-workspace 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 today.

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.

.cursor/skill-contracts/git-sync-workspace/SKILL.md · 106 lines

How it starts

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

Git sync workspace

Role

You sync multiple git repositories in a Cursor workspace to the latest remote default branch (main or master). This is the safe "back to base state" routine: fetch, checkout default, fast-forward pull, not a destructive reset.

When to use

Use when the user wants every repo in a multi-root workspace updated after context-switching, before cross-repo assessments, or when starting fresh work from remote HEAD. For a single broken repo (merge conflict, detached HEAD), use fix-git-issues instead.

Workflow

Run phases in order. Preflight every repo before any write.

Phase 0: Discover repos

  1. Workspace file (preferred): find *.code-workspace under the Cursor workspace root(s). Parse folders[].path and resolve relative paths against the workspace file location.
  2. Host profile (fallback): if no workspace file, read optional profiles/repos.yaml beside this skill (see Host overlay).
  3. Ask (last resort): if discovery yields nothing, ask the user which paths to include. Do not scan arbitrary ~/code/* without direction.
  4. De-duplicate paths. Keep only directories that contain a .git directory.
  5. If the user scopes the request (e.g. "only repo1 and repo2"), filter to matching paths only.

Phase 1: Preflight (read-only, every repo)

Before modifying any repo, show a preflight table:

Path Current branch Default branch Working tree Ahead / behind

Collect:

  • Path: repository root (absolute or workspace-relative).
  • Current branch: git branch --show-current (note detached HEAD).
  • Default branch: from git symbolic-ref refs/remotes/origin/HEAD (strip refs/remotes/origin/), else main, else master.
  • Working tree: git status --porcelain (empty = clean).
  • Ahead / behind: git rev-list --left-right --count @{u}...HEAD when upstream exists.

Also detect in-progress operations (merge, rebase, cherry-pick) via git status or .git/MERGE_HEAD / .git/rebase-merge. Treat these as unsafe; skip with reason skipped_unsafe.

Read the full file on GitHub · 106 lines

Files

What ships with it

4 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. today First seen · 106 lines · 85 tokens per session scan A 6dad32dfa1b3

Subscribe to this mod's changes

git-sync-workspace is a skill published in the GitHub repository emaraschio/cursor-commands (9 stars, last pushed 27d ago), licensed MIT. It adds 85 tokens to every session and 1,305 once invoked, about $0.0004 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-09-03.

Related

Other skills, from other repositories

email-lifecycle

Plan, build, and run lifecycle email programs through the Hyper MCP — welcome / onboarding, nurture, re-engagement, win-back, and abandoned-cart sequences across whichever provider fits (Klaviyo for ecommerce, Resend for SaaS / dev tools, Beehiiv for newsletters, Gmail for low-volume ops). Use when the user wants to…

hyperfx-ai/marketing-skills · 111 tokens

shopify-developer

Complete Shopify development reference covering Liquid templating, OS 2.0 themes, GraphQL APIs, Hydrogen, Functions, and performance optimization (API v2026-01). Use when working with .liquid files, building Shopify themes or apps, writing GraphQL queries for Shopify, debugging Liquid errors, creating app extensions…

tech-leads-club/agent-skills · 127 tokens

grok-build-supervisor

Initialize the persistent local proxy, then immediately ensure a visible Grok Build TUI for the current workspace when /grokexecute on activates, and continuously supervise that coding-agent session through a user-level Supervisor daemon as the user sends work, waits for completion, reconnects from another host task…

Vanyangyang/cursor-bridge · 103 tokens

cursor-delegate

Delegate bounded light-to-medium implementation, investigation, documentation, configuration, testing, and tooling work to Cursor Bridge after the primary agent owns direction and risk boundaries. Also use when the user explicitly asks to create, keep, continue, inspect, or close the same Cursor execution session…

Vanyangyang/cursor-bridge · 151 tokens

netllm-setup

First-time install and bootstrap of swarm-llm (netllm) from a repo checkout. Use when the user asks to install swarm-llm, set up netllm, get the router running, clone and configure llm-swarm-router, or invokes /netllm-setup. Runs uv sync, netllm init (--single or --swarm), discover, serve verification, and prints…

matthewdcage/llm-swarm-router · 118 tokens

distribution-channels

When the user wants to plan product distribution via marketplaces, app stores, or third-party platforms. Also use when the user mentions "distribution channels," "marketplace listing," "app store listing," "Figma plugin," "Chrome extension marketplace," "AWS Marketplace," "Shopify app," "GPTs store," "app…

kostja94/marketing-skills · 86 tokens