sync-validate

Review Notion worker sync code for pagination, cursor, and state bugs.

Updated Jun 13, 2026
One-click install
npx skills add https://github.com/MoneyPlug/money-plug-hub-mobile --skill sync-validate-moneyplug
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sync-validate
Source: https://github.com/MoneyPlug/money-plug-hub-mobile/tree/main/.agents/skills/sync-validate
Command: npx skills add https://github.com/MoneyPlug/money-plug-hub-mobile --skill sync-validate-moneyplug

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Sync capabilities in Notion workers can silently lose data or loop forever due to subtle bugs in cursor advancement, pagination termination, and backfill-to-delta transitions. This Skill audits sync code against a structured checklist to catch these defects before deployment. ## Core Features & Use Cases - Critical Bug Detection: Identifies infinite pagination loops, non-advancing cursors, missing first-run state handling, and oversized batches that will break a sync in production. - Bi-Modal Correctness Review: Validates backfill-to-delta transitions, overlap windows, and discriminated state unions for incremental syncs. - Data Quality Warnings: Flags missing consistency buffers, timestamp tie-breaking issues, unhandled deletions, hardcoded secrets, and missing fetch error handling. - Use Case: After scaffolding a new sync with the /sync command, run this review to verify the generated code handles cursor state, pagination termination, and deletion markers correctly before deploying with ntn workers deploy. ## Quick Start Review the sync capabilities in src/index.ts for common bugs and report findings grouped by severity.

Frequently Asked Questions about sync-validate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review a Notion worker sync for bugs?▼

Run this review against src/index.ts to check each sync against a fourteen-point checklist. It reports findings grouped by severity: critical issues that break the sync, structural bi-modal problems, and warnings that cause subtle data quality bugs.

Why does my incremental sync loop forever or skip records?▼

Infinite loops happen when nextState never advances or hasMore never becomes false. Skipped records usually come from missing overlap windows during backfill-to-delta transitions or a cursor that advances past records not yet indexed by an eventually consistent API.

When should a sync use incremental mode instead of replace mode?▼

Use incremental mode when the source API supports change tracking such as updated_at filters or event feeds, since replace mode re-fetches everything each cycle. Replace mode is appropriate when the API has no delete signal or change tracking capability.

How should deletions be handled in an incremental sync?▼

Check whether the source API exposes a delete signal such as an audit log, archived filter, or event stream. If it does, emit delete markers with the record key; if the signal lives on a separate endpoint, alternate streams at cycle boundaries using the flip-flop pattern.

What are the limitations of timestamp-based cursors?▼

Timestamp cursors fail when multiple records share the same updated_at value, which is common with batch imports or low-resolution timestamps. The fix is the keyset pattern using a compound cursor of timestamp plus id with a tie-breaking query.