Imported from xesrevinu/skills (
eventlog-local-first/SKILL.md). Install upstream withnpx skills add xesrevinu/skills --skill eventlog-local-first. Copyright stays with the author.
EventLog / Local-First Skill
Patterns for EventLog local-first sync with progressive disclosure.
Core Rules
- Write locally first, then replicate; never bypass the local journal.
- Define each event with a stable
tagand conflictprimaryKey. - Keep payloads schema-validated and encoded for durable storage.
- Let server assign remote sequence numbers; clients do not own ordering.
- Keep E2E encryption boundaries strict: server never sees plaintext.
- Run sync in daemon/background fibers, not on UI request paths.
Read This Skill Efficiently
Load only what the task needs:
- Architecture, event schema, journal, sync protocol ->
references/engine-patterns.md - Encryption, vault, daemon, and platform adapters ->
references/engine-patterns.md - Failure modes, anti-patterns, and readiness checklist ->
references/engine-patterns.md
Default Delivery Order
- Define events and EventGroup contracts (payload, success, error, primary key).
- Implement journal persistence and remote-sequence aware sync writes.
- Implement sync transport handlers and conflict resolution strategy.
- Wire encryption and key management layers.
- Start daemon lifecycle at app bootstrap and track status in state.
Related Skills
cloudflare-workersfor DO runtime, queue, cron, and worker compositioneffect-best-practicesfor domain/service/transport layeringotel-fullstackfor telemetry across client/worker/server sync paths
