Slash Command86 repo starsupdated 2mo ago
sync
The sync command pushes the current session state to GitHub immediately, including tasks, accessed files, discoveries, and session metadata. Use this command to manually back up session progress to a repository at any point during work, particularly when you want to ensure changes are saved before closing or switching contexts.
Install in Claude Code
Copymkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/arpitnath/claude-capsule-kit/HEAD/commands/sync.md -o ~/.claude/commands/sync.mdThen start a new Claude Code session; the slash command loads automatically.
Definition
sync.md
# Sync Session Now
Push the current session state to GitHub immediately.
## Sync
```bash
if [ -f ".claude/scripts/push-session.sh" ]; then
bash .claude/scripts/push-session.sh
else
echo "Session sync not installed. Run /sync-enable first."
fi
```
## What Gets Synced
- Current tasks (completed, in-progress, pending)
- Files accessed this session
- Discoveries logged
- Session duration and metadata
## Notes
- Safe to run multiple times (updates existing session)
- Requires sync to be enabled first (`/sync-enable`)
- Sessions also sync automatically on exit