You're offline — showing cached data

Sync ~/.claude from conrelma/claude repo (pull-only, Mac is source of truth)

claude-sync
2026-06-13 06:09:21 SAST
← Back to Tasks

OVERRIDES runtime profile: uses direct_shell (plain shell, no model) because the command chain never invokes the claude CLI or any LLM API — pure-infra task; scheduler provider env injection is a no-op (MC-4942 U12 sweep).

One-way mirror from GitHub → Luci, non-destructive. Phase 2 (MC-698): ~/.claude/ IS now the git checkout — no rsync bridge. Mac is the only authoritative writer to conrelma/claude. Luci consumes (pulls master) and authors via autopush on Stop hook.

How it works

Every 15 min (7,22,37,52 offset to stagger from git-sync / cowork-sync):

  1. flock prevents concurrent runs.
  2. cd ~/.claude && git fetch origin — refresh remote refs.
  3. Dirty-check ONLY on tracked-config pathsskills/ rules/ vault/ agents/ hooks/. Other tracked paths (.mcp.json, env/, google/) may differ per-machine and are not considered "dirty" for sync purposes.
  4. Conditional merge:
  5. If on master AND the tracked-config paths are clean → git merge --ff-only origin/master. Fast-forwards Mac's commits in. Luci-specific modifications outside tracked paths survive (ff-merge doesn't touch them unless incoming commits explicitly modify those files).
  6. Otherwise → SKIP-FF, preserving Luci's in-progress feature branch work or concurrent edits.
  7. Log counts + branch.

Why only tracked-config paths matter for the dirty check

After MC-698 Phase 2, Luci's ~/.claude/ has legitimate local-only state in tracked paths: her .mcp.json (different MCPs), env/api_keys.env (systemd variants), google/ (Luci's own OAuth or empty). These show as M or D in git status but are NOT supposed to propagate to master — they're per-machine differences that haven't been untracked yet (follow-up work).

Autopush is the authority on what flows to master. It stages ONLY skills/ agents/ hooks/ rules/. The sync's dirty check matches that scope — if nothing in those paths is modified, a fast-forward is safe even though other noise exists.

Luci authoring

She edits in ~/.claude/skills/, agents/, etc. directly. On Stop hook, luci_autopush.sh commits + pushes to master. Mac pulls via session-start hook.

Related

Every hour at :07, :22, :37, :527,22,37,52 * * * *
Yes
shell
120s
No
in 13m (2026-06-13 06:22)

Task Definition

tasks/claude-sync.md
shell
set
No
No
( flock -n 200 || exit 0; cd /home/lucienne/.claude && git fetch --quiet origin && BRANCH=$(git rev-parse --abbrev-ref HEAD) && DIRTY=$(git status --porcelain -- skills/ rules/ vault/ agents/ hooks/); if [ "$BRANCH" = "master" ] && [ -z "$DIRTY" ]; then git merge --ff-only --quiet origin/master; else echo "$(date -u +%FT%TZ) SKIP-FF: branch=$BRANCH dirty_lines=$(echo -n "$DIRTY" | wc -l)"; fi; echo "$(date -u +%FT%TZ) synced: $(ls /home/lucienne/.claude/skills/ | wc -l) skills, $(ls /home/lucienne/.claude/agents/ 2>/dev/null | wc -l) agents, $(ls /home/lucienne/.claude/hooks/ 2>/dev/null | wc -l) hooks (branch=$BRANCH)" ) 200>/tmp/claude-sync.lock >> /home/lucienne/workspace/logs/claude-sync.log 2>&1
This task calls claude directly. If the scheduler profile is GLM, Kimi, or MiniMax, prefer ~/workspace/PKA/scripts/claude-provider-run.sh so backup providers run in API-key-only mode with explicit settings/MCP context.

Edit Schedule

Result:
696
Runs (7d)
696
Completed
0
Failed
0
Timeout
100%
Success (7d)
2s
Avg Duration
infrastructure claude sync

Run History (50)

StartedFinishedStatusDurationOutputLog
2m ago 2m ago completed 2s
View log
17m ago 17m ago completed 2s
View log
32m ago 32m ago completed 2s
View log
47m ago 47m ago completed 2s
View log
1h ago 1h ago completed 2s
View log
1h ago 1h ago completed 2s
View log
2h ago 2h ago completed 2s
View log
2h ago 2h ago completed 2s
View log
2h ago 2h ago completed 2s
View log
2h ago 2h ago completed 2s
View log
3h ago 3h ago completed 2s
View log
3h ago 3h ago completed 2s
View log
3h ago 3h ago completed 2s
View log
3h ago 3h ago completed 2s
View log
4h ago 4h ago completed 2s
View log
4h ago 4h ago completed 2s
View log
4h ago 4h ago completed 2s
View log
4h ago 4h ago completed 2s
View log
5h ago 5h ago completed 2s
View log
5h ago 5h ago completed 2s
View log
5h ago 5h ago completed 2s
View log
5h ago 5h ago completed 2s
View log
6h ago 6h ago completed 2s
View log
6h ago 6h ago completed 2s
View log
6h ago 6h ago completed 2s
View log
6h ago 6h ago completed 2s
View log
7h ago 7h ago completed 2s
View log
7h ago 7h ago completed 2s
View log
7h ago 7h ago completed 2s
View log
7h ago 7h ago completed 2s
View log
8h ago 8h ago completed 2s
View log
8h ago 8h ago completed 2s
View log
8h ago 8h ago completed 2s
View log
8h ago 8h ago completed 2s
View log
9h ago 9h ago completed 2s
View log
9h ago 9h ago completed 2s
View log
9h ago 9h ago completed 2s
View log
9h ago 9h ago completed 2s
View log
10h ago 10h ago completed 2s
View log
10h ago 10h ago completed 2s
View log
10h ago 10h ago completed 2s
View log
10h ago 10h ago completed 2s
View log
11h ago 11h ago completed 2s
View log
11h ago 11h ago completed 2s
View log
11h ago 11h ago completed 2s
View log
11h ago 11h ago completed 2s
View log
12h ago 12h ago completed 2s
View log
12h ago 12h ago completed 2s
View log
12h ago 12h ago completed 2s
View log
12h ago 12h ago completed 2s
View log

Comments (0)

No comments yet — add instructions for Luci
Help