sync-debug

Diagnose failing Notion worker syncs by inspecting run logs and cross-referencing sync code.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a Notion worker sync fails, stalls, or produces wrong results, finding the root cause requires digging through run logs, state, and code. This Skill walks through that debugging process systematically so issues get identified and fixed faster. ## Core Features & Use Cases - Run and Log Inspection: Fetches sync status, recent runs, and full logs using the ntn CLI to pinpoint failing runs and error messages. - Failure Pattern Diagnosis: Maps common errors (401/403 auth, 429 rate limits, timeouts, cursor state issues, schema mismatches, infinite loops, empty results) to concrete fixes. - Fix and Verify Workflow: Applies code fixes, runs type checks, resets sync state when needed, and verifies via deploy and preview triggers. - Use Case: A sync that pulls issues into a Notion database stops updating. The Skill checks run logs, finds a 401 error, confirms the OAuth token expired, and guides re-authentication and redeployment. ## Quick Start Ask the assistant to debug why my Notion worker sync is failing and suggest a fix.

Frequently Asked Questions about sync-debug

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

FAQPage Schema
How do I debug a failing Notion worker sync?▼

Start by running ntn workers sync status and ntn workers runs list to find failed runs, then fetch logs with ntn workers runs logs <runId>. Cross-reference the error messages with your sync code in src/index.ts to identify the root cause.

How to fix 401 or 403 authentication errors in a Notion worker sync?▼

Check OAuth configuration with ntn workers oauth token <oauthKey> and verify environment variables with ntn workers env list. Push missing variables with ntn workers env push, or re-authenticate an expired token using ntn workers oauth start <key>.

Why does my sync run forever without completing?▼

An infinite loop happens when hasMore stays true because the cursor is not advancing. Check that nextState changes between iterations and that the termination condition in your execute function is actually reachable.

What causes cursor or state errors in Notion worker syncs?▼

State errors usually come from first runs where state is undefined, or from persisted state having an old shape after a code update. Fix it by running ntn workers sync state reset <key> to clear state and re-backfill from scratch.

Why is my sync returning empty results from the API?▼

Empty results typically mean the API returned no data due to a wrong endpoint, incorrect query parameters, or insufficient permissions despite working auth. Test the API call directly with curl or local execution to isolate the cause.