Codex-snyc Sync
Purpose
Use this skill for transport safety: split iCloud hubs move skills and memories; neat-freak cleans and deduplicates content. Keep those roles separate.
The user's preferred architecture is private-first:
Codex-snyc is the Codex/Mac write hub. Codex writes here by default.
Minis-snyc is the Minis/iPhone write hub. Minis writes there; Codex treats it as read-only reference.
- The two agents can read each other's memories for context, but each writes only to its own hub to avoid stomping conflicts.
- F50/SOVINS remains an optional fallback, archive, or Android-side transfer target.
- Local private sync is trusted by default. Do not skip tokens, private keys, certificates, subscriptions, or other sensitive-looking filenames during local private
scan, preview, or merge-copy.
- GitHub/GitLab may be used for public skills, but publishing to a public repo is a separate workflow from local private sync.
- Default to
preview and merge; do not mirror or delete unless the user explicitly requests it after seeing a diff.
Known Paths
- Codex skills:
/Users/zhuyuhua/.codex/skills/
- CC Switch skills:
/Users/zhuyuhua/.cc-switch/skills/
- Codex memories:
/Users/zhuyuhua/.codex/memories/
- Local Minis mirror:
/Users/zhuyuhua/Library/Group Containers/group.com.openminis.app/MinisFileProvider/
- iCloud Drive:
/Users/zhuyuhua/Library/Mobile Documents/com~apple~CloudDocs/
- Codex-snyc root:
/Users/zhuyuhua/Library/Mobile Documents/com~apple~CloudDocs/Codex-snyc/
- Minis-snyc root:
/Users/zhuyuhua/Library/Mobile Documents/com~apple~CloudDocs/Minis-snyc/
- F50 SMB hint:
smb://192.168.0.1/F50/Minis/
- F50 ADB endpoint:
192.168.0.1:5555
- F50 ADB sync root:
/data/SAMBA_SHARE/机内存储/Minis同步盘/
- Stale F50 ADB path to avoid:
/data/SAMBA_SHARE/机内存储/Minis/
Workflow
- Identify the task domain:
skills, memory, projects, or a narrow subfolder. Narrow domains are safer than whole-disk operations.
- Check availability with
scripts/codex_snyc.py status. Prefer the local iCloud Drive path first, mounted volumes second, and ADB only when needed for F50 fallback.
- Build a source and target manifest. Use
scripts/codex_snyc.py scan --root <path> for inventory, or preview --source <src> --target <dst> for comparisons.
- Show the user a concise diff before writes: added, modified, unchanged, and target-only.
- For writes, use merge semantics. Only copy new/changed files from source to target. Do not delete target-only files by default.
- Codex writes to
Codex-snyc only. Do not write, merge, mirror, or delete inside Minis-snyc unless the user explicitly asks to repair the Minis hub.
- Write history after successful sync when possible:
sync/history.jsonl under the writer's hub root with absolute date, source, target, file counts, and summary.
- If memory content changed, run
neat-freak after transport to reconcile indexes and remove stale facts.
Safety Rules
- Never print or copy private key contents. It is okay to record public key fingerprints and file paths.
- Local private sync should include all files by default; the user accepts and controls the local risk.
- Public GitHub skill repos may include reusable skill source only. Use public-audit/review for public publishing, but do not apply those exclusions to local Codex-snyc/F50 sync.
- Treat
Minis-snyc as read-only from Codex by default. It exists so Codex can reference Minis memory, not so Codex overwrites it.
- Treat
Codex-snyc as read-only from Minis by default. It exists so Minis can reference Codex memory, not so Minis overwrites it.
- Prefer
merge over mirror. Treat deletion, overwrite-all, and bidirectional conflict resolution as high-risk operations.
- Use absolute dates such as
2026-05-12; avoid "today" or "recently" in durable notes.
Helper Script
Use scripts/codex_snyc.py for deterministic checks:
python3 /Users/zhuyuhua/.codex/skills/codex-snyc/scripts/codex_snyc.py status
python3 /Users/zhuyuhua/.codex/skills/codex-snyc/scripts/codex_snyc.py init-hub --hub both --apply
python3 /Users/zhuyuhua/.codex/skills/codex-snyc/scripts/codex_snyc.py scan --root /Users/zhuyuhua/.codex/skills
python3 /Users/zhuyuhua/.codex/skills/codex-snyc/scripts/codex_snyc.py preview --source <source-dir> --target <target-dir>
python3 /Users/zhuyuhua/.codex/skills/codex-snyc/scripts/codex_snyc.py merge-copy --source <source-dir> --target <target-dir> --history-root "/Users/zhuyuhua/Library/Mobile Documents/com~apple~CloudDocs/Codex-snyc" --apply
python3 /Users/zhuyuhua/.codex/skills/codex-snyc/scripts/codex_snyc.py public-audit --root <public-repo-dir>
Without --apply, merge-copy is a dry run.
Read references/workflow.md when planning a multi-machine sync, publishing skills to GitHub, or handling conflicts.
1---2name: codex-snyc3description: Codex-snyc Sync4---56# Codex-snyc Sync78## Purpose910Use this skill for transport safety: split iCloud hubs move skills and memories; `neat-freak` cleans and deduplicates content. Keep those roles separate.1112The user's preferred architecture is private-first:1314- `Codex-snyc` is the Codex/Mac write hub. Codex writes here by default.15- `Minis-snyc` is the Minis/iPhone write hub. Minis writes there; Codex treats it as read-only reference.16- The two agents can read each other's memories for context, but each writes only to its own hub to avoid stomping conflicts.17- F50/SOVINS remains an optional fallback, archive, or Android-side transfer target.18- Local private sync is trusted by default. Do not skip tokens, private keys, certificates, subscriptions, or other sensitive-looking filenames during local private `scan`, `preview`, or `merge-copy`.19- GitHub/GitLab may be used for public skills, but publishing to a public repo is a separate workflow from local private sync.20- Default to `preview` and `merge`; do not mirror or delete unless the user explicitly requests it after seeing a diff.2122## Known Paths2324- Codex skills: `/Users/zhuyuhua/.codex/skills/`25- CC Switch skills: `/Users/zhuyuhua/.cc-switch/skills/`26- Codex memories: `/Users/zhuyuhua/.codex/memories/`27- Local Minis mirror: `/Users/zhuyuhua/Library/Group Containers/group.com.openminis.app/MinisFileProvider/`28- iCloud Drive: `/Users/zhuyuhua/Library/Mobile Documents/com~apple~CloudDocs/`29- Codex-snyc root: `/Users/zhuyuhua/Library/Mobile Documents/com~apple~CloudDocs/Codex-snyc/`30- Minis-snyc root: `/Users/zhuyuhua/Library/Mobile Documents/com~apple~CloudDocs/Minis-snyc/`31- F50 SMB hint: `smb://192.168.0.1/F50/Minis/`32- F50 ADB endpoint: `192.168.0.1:5555`33- F50 ADB sync root: `/data/SAMBA_SHARE/机内存储/Minis同步盘/`34- Stale F50 ADB path to avoid: `/data/SAMBA_SHARE/机内存储/Minis/`3536## Workflow37381. Identify the task domain: `skills`, `memory`, `projects`, or a narrow subfolder. Narrow domains are safer than whole-disk operations.392. Check availability with `scripts/codex_snyc.py status`. Prefer the local iCloud Drive path first, mounted volumes second, and ADB only when needed for F50 fallback.403. Build a source and target manifest. Use `scripts/codex_snyc.py scan --root <path>` for inventory, or `preview --source <src> --target <dst>` for comparisons.414. Show the user a concise diff before writes: added, modified, unchanged, and target-only.425. For writes, use merge semantics. Only copy new/changed files from source to target. Do not delete target-only files by default.436. Codex writes to `Codex-snyc` only. Do not write, merge, mirror, or delete inside `Minis-snyc` unless the user explicitly asks to repair the Minis hub.447. Write history after successful sync when possible: `sync/history.jsonl` under the writer's hub root with absolute date, source, target, file counts, and summary.458. If memory content changed, run `neat-freak` after transport to reconcile indexes and remove stale facts.4647## Safety Rules4849- Never print or copy private key contents. It is okay to record public key fingerprints and file paths.50- Local private sync should include all files by default; the user accepts and controls the local risk.51- Public GitHub skill repos may include reusable skill source only. Use public-audit/review for public publishing, but do not apply those exclusions to local Codex-snyc/F50 sync.52- Treat `Minis-snyc` as read-only from Codex by default. It exists so Codex can reference Minis memory, not so Codex overwrites it.53- Treat `Codex-snyc` as read-only from Minis by default. It exists so Minis can reference Codex memory, not so Minis overwrites it.54- Prefer `merge` over `mirror`. Treat deletion, overwrite-all, and bidirectional conflict resolution as high-risk operations.55- Use absolute dates such as `2026-05-12`; avoid "today" or "recently" in durable notes.5657## Helper Script5859Use `scripts/codex_snyc.py` for deterministic checks:6061```bash62python3 /Users/zhuyuhua/.codex/skills/codex-snyc/scripts/codex_snyc.py status63python3 /Users/zhuyuhua/.codex/skills/codex-snyc/scripts/codex_snyc.py init-hub --hub both --apply64python3 /Users/zhuyuhua/.codex/skills/codex-snyc/scripts/codex_snyc.py scan --root /Users/zhuyuhua/.codex/skills65python3 /Users/zhuyuhua/.codex/skills/codex-snyc/scripts/codex_snyc.py preview --source <source-dir> --target <target-dir>66python3 /Users/zhuyuhua/.codex/skills/codex-snyc/scripts/codex_snyc.py merge-copy --source <source-dir> --target <target-dir> --history-root "/Users/zhuyuhua/Library/Mobile Documents/com~apple~CloudDocs/Codex-snyc" --apply67python3 /Users/zhuyuhua/.codex/skills/codex-snyc/scripts/codex_snyc.py public-audit --root <public-repo-dir>68```6970Without `--apply`, `merge-copy` is a dry run.7172Read `references/workflow.md` when planning a multi-machine sync, publishing skills to GitHub, or handling conflicts.