avibebuilder/prime-sync
Syncs Claude config between prime repo and target projects. Trigger on 'sync', 'prime-sync', 'push config', 'pull config', 'update prime', 'sync claude config'. Push mode deploys to targets; pull mode imports changes back.
npx skills add https://github.com/avibebuilder/claude-prime --skill prime-sync
Ultrathink.
Detect operating mode before anything else:
VERSION file exists in CWD → push mode (CWD is the prime repo).claude/.prime-version exists in CWD → pull mode (CWD is a target project)Source = CWD (prime repo). Target = resolved project path.
State file: .claude/prime-projects.json
Tracks known target paths, last sync time, and version. Shape:
{ "projects": [{ "path": "/absolute/path", "lastSynced": "2025-12-30T10:30:00Z", "version": "1.4.2" }] }
Create as { "projects": [] } if missing.
Resolution flow:
State file management:
.claude/ only if you need to persist the state fileSource = cloned prime repo. Target = CWD.
Flow:
.claude/.prime-version in CWDdate +%Y%m%d%H%M%Sgit clone https://github.com/avibebuilder/claude-prime.git /tmp/claude-prime-sync-<timestamp>//tmp/claude-prime-sync-<timestamp>/, target = CWD/tmp/claude-prime-sync-<timestamp>/ after sync completes (success or failure)No state file in pull mode — the target project is self-contained.
.claude/ is appropriate.claude/.prime-version) and prime (VERSION)If the path fails those checks, abort and explain why.
Change Detection:
.claude/ based on the target's recorded version stateHEAD and include uncommitted changes; warn if the tag is missingStack Detection (only if skills or starter-skills changed): check target for stack indicators relevant to each changed skill/starter.
File Comparison: compare each changed file with target. Detect: NEW, UPDATE, IDENTICAL, CONFLICT.
Aggregate results and present:
CHANGED (will sync): ...
IDENTICAL (skip): ...
CONFLICTS (will ask): ...
IRRELEVANT (skip, wrong stack): ...
GATE: User approves sync plan.
For each conflict, show the relevant diff and ask the user how to proceed:
.claude/ in target if needed.claude/starter-skills/ in target.prime-version with prime's VERSIONSync complete! (prime vX.X.X)
Updated: ...
Skipped: ...
Version: X.X.X → written to .prime-version
Push mode only: update state file (lastSynced timestamp + version).
Pull mode only: clean up /tmp/claude-prime-sync-* clone directory.
prime-sync stays in prime — do not copy this skill into target projects.<target-path>$ARGUMENTS</target-path>
Take avibebuilder/prime-sync from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.