How this skill is triggered — by the user, by Claude, or both
Slash command
/sync:notesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Syncing the personal notes repository to GitHub using jujutsu (jj).
Syncing the personal notes repository to GitHub using jujutsu (jj).
Navigate to the personal notes directory:
cd $HOME/Documents/personal/notes
If the directory doesn't exist, inform the user and stop.
Always fetch latest changes from GitHub:
jj git fetch
This updates the view of remote branches without modifying local work.
Check for local changes:
jj status
a) Summarize Changes
Run these commands to understand the changes:
jj diff --stat
jj status
b) Analyze and Generate Description
Review the output and generate an appropriate commit message.
c) Present Description for Approval
IMPORTANT: Do not automatically apply the description. Instead:
d) Apply Description
Once approved, apply the description using a heredoc for proper formatting:
jj describe -m "$(cat <<'EOF'
<approved description here>
EOF
)"
e) Check if Rebase is Needed
Check whether the remote has new commits that our working copy is not based on:
jj log -r '@..main@origin'
If this is non-empty, remote has moved ahead and we need to rebase. If empty, we can push directly.
f) Rebase if Needed
If remote has new commits, rebase onto the remote main:
jj rebase -d main@origin
Without -r or -b, this rebases the entire branch (equivalent to -b @),
moving all local commits on top of the updated remote.
Note: Jujutsu handles conflicts gracefully. If conflicts occur, they're tracked in the working copy and can be resolved in a subsequent change. The world doesn't stop.
g) Update Bookmark
Move the main bookmark to the current change:
jj bookmark set main -r @
h) Push to GitHub
Push the changes explicitly by bookmark name:
jj git push --bookmark main
After pushing, jujutsu will automatically create a new empty working copy commit on top.
i) Report Success
Inform the user what was synced and show the final status:
jj log --limit 3
a) Check for committed-but-unpushed changes
Check whether the working copy parent (@-) is ahead of main:
jj log -r 'main..@-'
If non-empty (commits exist between main and @-): push those commits.
jj log -r '@-..main@origin'
jj rebase -d main@origin
main bookmark to working copy parent:
jj bookmark set main -r @-
jj git push --bookmark main
jj log --limit 3If empty (no committed-but-unpushed changes): check whether the remote moved ahead of the local bookmark:
jj log -r '[email protected]'
If non-empty (remote moved): update the local bookmark to match remote, then inform the user:
jj bookmark set main -r main@origin
Report that the local bookmark was fast-forwarded to match remote.
If empty (fully up to date): inform the user:
Handle these scenarios gracefully:
$HOME/Documents/personal/notes$HOME environment variable for portability across different machinesmain..@- first — committed-but-unpushed
changes live between main and @-, not in the working copy@..main@origin (has changes) or @-..main@origin
(no working copy changes) is non-empty (remote ahead of us)When successful, provide clear feedback like:
✓ Changed to notes repository
✓ Fetched remote changes
✓ Found changes in working copy
✓ Generated description (presented for approval)
✓ Applied description
✓ Rebased onto main@origin
✓ Moved bookmark to current change
✓ Pushed to GitHub
Synced commit: 07cea23a "Add project documentation and sync recent notes"
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub christianromney/claude-plugins --plugin sync