beads-session-sync
Flush and sync Beads changes to git (export/commit/pull/import/push)
When & Why to Use This Skill
This Claude skill automates the synchronization of Beads session changes with Git repositories. It streamlines the developer workflow by executing comprehensive sync operations—including export, commit, pull, import, and push—ensuring that task data is consistently versioned, backed up, and synchronized with remote environments.
Use Cases
- Session State Persistence: Automatically flush and sync Beads task progress to a Git repository at the end of a session to ensure no data is lost.
- Version Control for Agent Tasks: Maintain a clean, traceable history of Beads JSONL changes by committing updates directly to version control systems.
- Collaborative Environment Sync: Synchronize local agent changes with remote repositories (pull/push) to keep multi-user or multi-agent environments in sync.
- Workflow Automation: Integrate 'bd sync' into automated runbooks to ensure repository states remain clean and up-to-date after task modifications.
| name | beads-session-sync |
|---|---|
| description | Flush and sync Beads changes to git (export/commit/pull/import/push) |
Beads: session sync
When to use
Use this at the end of any session where Beads tasks are changed.
This follows Beads upstream agent workflow guidance: bd sync forces an immediate flush of pending changes and synchronizes with the remote.
Procedure
- Run:
bd sync
- Confirm:
- command succeeded (exit code 0)
- repo state is clean (
git statusshows no Beads JSONL changes pending)
Notes
- If your environment requires explicit git push, Beads'
bd syncshould handle it; if it fails, report the failure clearly and stop.