sync-workspace

sync-workspace is a skill for Claude Code from paulinevos/claude-stuff. It costs 46 tokens per session (651 once invoked), scanned A, original, MIT.

A troubleshooting guide for bringing a Jujutsu workspace back into sync with the shared repository. It covers stale working copies, rebasing a slice, divergent changes, and bookmarks that resolve to multiple revisions.

In plain words
What is it for?
Use it to update stale workspaces, rebase slices onto a moved base or parent, resolve divergent changes, and repair ambiguous bookmarks.
Why use it?
It explains why a workspace no longer matches the repository and gives a specific recovery path for each symptom. This helps preserve local edits while restoring the intended revision relationship.

Skill for Claude Code

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

Part of the jj-workflow plugin — 4 skills shipped together

Good fit Use it to update stale workspaces, rebase slices onto a moved base or parent, resolve divergent changes, and repair ambiguous bookmarks.

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

Made for: Claude Code.

Or install jj-workflow, 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 sync-workspace

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

agentmods 80×15 button for sync-workspace

Your own site · 80×15
<a href="https://agentmods.dev/skills/paulinevos/claude-stuff/sync-workspace"><img src="https://agentmods.dev/badge/skills/paulinevos/claude-stuff/sync-workspace.svg" alt="Reviewed on agentmods" width="80" 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 651 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.00046 $0.00651
Opus 5.5 $0.00018 $0.00260
Sonnet 5.5 $0.00009 $0.00130
Haiku 4.5 $0.00005 $0.00065

Measured 11d ago against content hash 87108f98e906, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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 11d 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/jj-workflow/skills/sync-workspace/SKILL.md · 51 lines

How it starts

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

sync-workspace

Identify the symptom before acting.

Symptom Recovery
Stale working copy jj workspace update-stale, then jj status. If @ is divergent and edits disappeared, handle it below.
Base or parent moved jj git fetch && jj rebase -b <slice> -o <base>; check jj log -r 'conflicts() & (<base>..@)'. Rebase only your slice.
Divergent change/0, change/1 Inspect versions; combine with jj squash --from <other-commit-id> --into @, abandon the unwanted version, or preserve both with jj metaedit --update-change-id <commit-id>. Verify jj log -r @ and jj status.
Bookmark name?? Inspect jj bookmark list <name>, rebase wanted work together if necessary, then jj bookmark move <name> --to <change-id>; fetch for a remote conflict.
Divergence you cannot rewrite The versions are immutable. See below.

update-stale snapshots first. Unsnapshotted edits during an ancestor rewrite become a divergent change and leave the working copy. jj merges racing operations rather than locking; one owner per workspace, bookmark, and change prevents these states.

Divergence in immutable history

jj squash and jj abandon need mutable revisions, so neither applies once the divergent versions are published. Never reach for --ignore-immutable; diagnose instead, because the cause decides the fix:

jj log -r 'divergent()' --no-graph -T 'commit_id.short() ++ " imm=" ++ if(immutable,"Y","n") ++ " [" ++ bookmarks ++ "]\n"'
jj diff --from <one-commit-id> --to <other-commit-id> --stat   # empty = duplicates
jj log -r '<bookmark> ~ ::main'                                # empty = nothing unique

Both empty means a stale bookmark — typically a merged pull request whose branch the forge kept, holding pre-rebase copies of revisions now in main. Nothing is lost; the bookmark is only keeping the old copies visible. Deleting it changes a shared remote, so confirm with the user first. A remote bookmark with no local counterpart must be tracked before the deletion can propagate:

Read the full file on GitHub · 51 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. 11d ago Changed · +30 lines 87108f98e906
  2. 21d ago Changed · -69 lines · -116 tokens per session a08dd352f616
  3. 1mo ago First seen · 90 lines · 162 tokens per session scan A f058065f76d7

Subscribe to this mod's changes

sync-workspace is a skill published in the GitHub repository paulinevos/claude-stuff (64 stars, last pushed 4d ago), licensed MIT. It adds 46 tokens to every session and 651 once invoked, about $0.0002 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-10.