Agent skill
sync-offline
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/design/sync-offline
SKILL.md
Sync Offline
Overview
Provide a predictable offline-first sync pipeline for widgets that must appear immediately and reconcile later.
Core components
- Local cache/read model
- Outbound sync queue
- Conflict detection and resolution policy
- Background refresh worker
Definition of done (DoD)
- App works fully offline with local data
- Sync queue persists across app restarts
- Retry policy with exponential backoff implemented
- Conflicts detected and surfaced (not silently overwritten)
- Sync status visible to user (last sync time, pending count)
- Network calls never block UI thread
Workflow
- Decide the local persistence model (cache vs source of truth).
- Define the sync queue and retry policy.
- Add conflict detection (version, timestamp, or hash).
- Implement background refresh with backoff and connectivity checks.
- Surface sync state to the UI (last sync time, errors).
Guidance
- Prefer idempotent sync operations.
- Keep queue items small and serialize minimal payloads.
- Never block UI on network calls.
References
references/cache-strategy.mdfor cache policies.references/sync-queue.mdfor queue structure and retry rules.references/conflict-resolution.mdfor resolution patterns.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?