sync-init
Skill0 starsChanged 7 months agoMITView on GitHub
Initialize session-sync tracking with a chosen name, triggered ONLY by the explicit `/sync-init <name>` slash command. Never auto-trigger on natural-language phrases like "start session sync", "init sync", "register this session", or similar — this skill should remain user-initiated. Sets up `.sync/` structure (project root) with per-session status files and shared contract doc for coordinating multiple parallel Claude/Codex sessions on the same project.
In this repository5 other files it gives its agents.
- feierabendSkill
- pm-consultantSkill
- sync-endSkill
- sync-startSkill
- sync-statusSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 0 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
If they typed /sync-init <name> → name is <name>
- Very specific: line 14
If they said "sync init as X" or similar → name is X
- Very specific: line 15
If no name provided → ask once: "Wie soll diese Session heißen?
- Very specific: line 21
Create sync directory: if missing: .sync/ (at project root — NOT under .claude/, since Claude Code's hardcoded .claude/ sensitive-file …
- Very specific: line 23
Create
.sync/_shared.md: if missing, with template: - Very specific: line 38
Create
.sync/_active.json: if missing: {"sessions": {}} - Very specific: line 40
Check for name collision: Read _active.json. If <name> exists as session key → ask user: overwrite or pick different name?
- Very specific: line 42
Detect git branch: Run git rev-parse --abbrev-ref HEAD 2>/dev/null — use result or "none".
- Very specific: line 64
Update
_active.json: add entry under sessions.<name>: - Very specific: line 80
If user picks gitignored: append .sync/ to .gitignore (create if missing).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Sync Init
Initialize session-sync for this session.
Determine session name
Extract the session name from the user's invocation:
- If they typed
/sync-init <name>→ name is<name> - If they said "sync init as X" or similar → name is
X - If no name provided → ask once: "Wie soll diese Session heißen? (z.B.
auth-feature,checkout-redesign)"
In the rest of this document, <name> refers to the determined session name.
Steps
- Create sync directory if missing:
.sync/(at project root — NOT under.claude/, since Claude Code's hardcoded.claude/sensitive-file protection would keep prompting). - Create
.sync/_shared.mdif missing, with template:# Shared Context _Last modified: <iso-timestamp>_ ## Contracts / Shared Types / API Surface <!-- Document anything multiple sessions depend on: endpoints, schemas, shared types, config keys --> ## Breaking Changes Log <!-- Append-only. Format: YYYY-MM-DD HH:MM @session-name — description --> ## Global Assumptions <!-- Architecture decisions, naming conventions, tooling choices --> - Create
.sync/_active.jsonif missing:{"sessions": {}} - Check for name collision: Read
_active.json. If<name>exists as session key → ask user: overwrite or pick different name? - Detect git branch: Run
git rev-parse --abbrev-ref HEAD 2>/dev/null— use result or"none". - Create
.sync/<name>.mdwith template:# <name> _Started: <iso-timestamp> · Last active: <iso-timestamp> · Branch: <branch>_ ## Scope <!-- What is this session building? Fill in when you know. --> ## Touched files <!-- Auto-maintained by /sync-end --> ## Contract-relevant changes <!-- Anything that touches _shared.md territory --> ## Open questions for other sessions <!-- Use @other-session-name to tag --> ## Next steps - Update
_active.json: add entry undersessions.<name>:{ "started": "<iso>", "last_active": "<iso>", "branch": "<branch>", "last_seen_shared": "<iso>", "last_seen_sessions": {} } Gitignore decision — ask user (this is a one-time project-level decision, worth the single question):
"Soll
.sync/in git getrackt werden? — Ja (tracked): Sessions auf verschiedenen Branches sehen sich gegenseitig via git pulls. Empfohlen bei Multi-Branch-Workflow. — Nein (gitignored): Rein lokale Koordination, kein Noise in Commits. Empfohlen wenn alle Sessions am gleichen Branch arbeiten."If user picks gitignored: append
.sync/to.gitignore(create if missing).- Remember the session name
<name>for the rest of this conversation. Use it automatically in subsequent/sync-end,/sync-start,/sync-statuscalls — don't ask again unless the conversation is compacted/resumed and the name is unclear.
Output
Confirm:
- ✓ Session registered as
<name> - ✓ Files:
_shared.md,_active.json,<name>.md - ✓ Branch:
<branch> - ✓ Gitignore: tracked/ignored
- Nächster Schritt:
/sync-startum zu sehen was andere Sessions machen, oder direkt loslegen und am Ende/sync-end.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

