28 lines
1.3 KiB
Markdown
28 lines
1.3 KiB
Markdown
---
|
|
name: sync
|
|
description: >
|
|
Sync the ClaudeTools and vault repos with Gitea. Use when the user says /sync, "sync now", "push the changes", "sync repos", after offline work, before switching machines, or to check queue status.
|
|
---
|
|
|
|
# /sync — Cross-Machine Context Sync
|
|
|
|
Synchronize queued contexts across machines (and the vault repo).
|
|
|
|
**Grok note:** Native Grok skill for the shared command. Authoritative details in `.claude/commands/sync.md`.
|
|
|
|
When this skill activates:
|
|
- First, check for uncommitted session-logs (as described in the source).
|
|
- If uncommitted logs exist, warn the user and recommend /save first.
|
|
- Then run the sync logic (typically `bash .claude/scripts/sync.sh`).
|
|
- Use `run_terminal_command` for the git / sync operations.
|
|
- Follow any pre/post steps in the command doc.
|
|
|
|
## Key logic (see full source)
|
|
- Phase 0: Check `git status --porcelain` for uncommitted session-logs/*.md . If present, emit warning and suggest /save.
|
|
- Then delegate to the sync script for staging, committing with conventional messages, pushing to Gitea, and handling the vault repo sync.
|
|
|
|
The command also covers offline mode, queue handling, and conflict resolution.
|
|
|
|
Read `.claude/commands/sync.md` (and related sync.sh) for the complete implementation and safeguards.
|
|
|
|
This is often used after /save or as part of /scc. |