Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/emaraschio/cursor-commandsnpx agentmods add skills/emaraschio/cursor-commands/git-sync-workspaceWrote 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.
[](https://agentmods.dev/skills/emaraschio/cursor-commands/git-sync-workspace)<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/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.
<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="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00085 | $0.01305 |
| Opus 5.5 | $0.00034 | $0.00522 |
| Sonnet 5.5 | $0.00017 | $0.00261 |
| Haiku 4.5 | $0.00009 | $0.00130 |
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 1mo 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.
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
- Workspace file (preferred): find
*.code-workspaceunder the Cursor workspace root(s). Parsefolders[].pathand resolve relative paths against the workspace file location. - Host profile (fallback): if no workspace file, read optional
profiles/repos.yamlbeside this skill (see Host overlay). - Ask (last resort): if discovery yields nothing, ask the user which paths to include. Do not scan arbitrary
~/code/*without direction. - De-duplicate paths. Keep only directories that contain a
.gitdirectory. - 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(striprefs/remotes/origin/), elsemain, elsemaster. - Working tree:
git status --porcelain(empty = clean). - Ahead / behind:
git rev-list --left-right --count @{u}...HEADwhen 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.
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.
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.
- 1mo ago First seen · 106 lines · 85 tokens per session scan A 6dad32dfa1b3
git-sync-workspace is a skill published in the GitHub repository emaraschio/cursor-commands (9 stars, last pushed 2d ago), licensed MIT. It adds 85 tokens to every session and 1,305 once invoked, about $0.0003 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.
Other skills, from other repositories
active-review
Use when the user wants to prepare for a manual PR code review and asks for help targeting it — a terse PR summary, ranked files to read first, and paste-ready inline comment drafts with GitHub deep-links. Triggers: "active review this PR", "walk me through this PR", "help me review this", "give me inline comments to…
bisect
Use when hunting a regression, phrases like "bisect", "find the commit that broke X", "this used to work", "regression in test Y", "when did start". Also use when escalated from ci-debug-loop because log analysis can't pinpoint the offending change, or when a previously-passing test/build/behavior is now failing and…
analyze-knowledge
Use when the user asks who knows specific code, who should review a PR or files, what the lottery factor is, whether knowledge is concentrated or spread, who to talk to about a code area, or when suggesting reviewers beyond GitHub's built-in suggestions.
fix-pr-conflict
Resolve merge conflicts on a pull request by rebasing onto the base branch. Use when a PR is not mergeable, has merge conflicts, or the user asks to fix conflicts on a PR.
ship-it
End-to-end shipping workflow. Formats, lints, tests, creates a changelog entry, commits with conventional commits, pushes, updates PR description, and suggests reviewers. Use when the user says "ship it", "commit and push", "fmt lint test commit push", or similar shipping commands.
create-pr
Use when creating a new GitHub pull request, opening a PR for the current branch, or when another skill (like ship-it) needs a PR created for a branch that does not have one yet.