sync-debug
Diagnose a failing or misbehaving sync — fetch run logs, identify errors, cross-reference with code, and suggest fixes
Skill by makenotionOfficial
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/makenotion-sync-debug
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/sync-debug
What's inside
- Skill name
sync-debug- Description
- Diagnose a failing or misbehaving sync — fetch run logs, identify errors, cross-reference with code, and suggest fixes
- License
- MIT
- Instructions
- 106 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Agent Skills spec issues
- allowed-tools: must be a space-separated string
Files (1)
- SKILL.md
SKILL.md (first lines)
## Instructions
Help the user figure out why their sync is failing or producing wrong results. Work through the steps below systematically.
### Step 1: Get Current State
Run these commands to understand the situation:
```shell
ntn workers sync status
```
Note which syncs are listed, their status, last run time, and next scheduled run. Look for syncs that are stuck, failing, or haven't run recently.
### Step 2: Fetch Recent Runs
```shell
ntn workers runs list
```
Look for runs with non-zero exit codes (shown in red in table output). Note the run IDs for failed runs.
### Step 3: Get Logs
For the most recent run (any capability):
```shell
ntn workers runs list --plain | head -n1 | cut -f1 | xargs -I{} ntn workers runs logs {}
```
For the most recent run of a specific sync:
```shell
ntn workers runs list --plain | grep <syncKey> | head -n1 | cut -f1 | xargs -I{} ntn workers runs logs {}
```
Read the full log output. Look for error messages, stack traces, and any `console.log` output from the sync code.
### Step 4: Read the Sync Code
Read `src/index.ts` (and any imported modules) to understand the sync's logic. Cross-reference the error from the logs with the code.
### Step 5: Diagnose
Common failure patterns and their fixes:
**API Authentication Errors (401/403)**
- Check if OAuth is configured: `ntn workers oauth token <oauthKey>`
- Check environment variables: `ntn workers env list`
- If env vars are missing remotely: `ntn workers env push`
- If OAuth token expired: `ntn workers oauth start <key>` to re-authenticate
**Rate Limiting (429)**
- Reduce batch size in the sync code
- Add delays between API calls if needed
- Check if the API has documented rate limits
**Timeout / Long Execution**
- The execute function is taking too long per call
- Reduce batch size (fewer records per page)
- Simplify per-record processing (defer heavy transforms)
**Cursor / State Errors**
- TypeError on state access: probably a first-run issue (state is undefined)
- State shape changed after a code update: the persisted state from the previous run has the old shape
- Fix: `ntn workers sync state reset <key>` to clear state and re-backfill from scratch
**Schema Mismatch**
- Properties in `changes` don't match the `schema.properties` definition
- Check that every key in the `properties` object of each change matches a key in the schema
- Check that `Builder.title()` is used for `Schema.title()` properties, `Builder.richText()` for `Schema.richText()`, etc.
**Infinite Loop (sync never completes)**
- `hasMore` is always `true` — the cursor isn't advancing
- Check that `nextState` changes between iterations
- Check the termination condition: is it reachable?
**Empty Results**
- API returning no data: test the API call directly (curl or local exec)
- Wrong endpoint or query parameters
- Auth working but insufficient permissions/scopes
**Network / Transient Errors**
- Single occurrence: may be transient — check if subsequent runs succeeded
- Repeated: check the API endpoint URL, DNS, connectivity
- Force a retry: `ntn workers sync trigger <key>`
### Step 6: Fix and Verify
After identifying the issue:
1. Apply the fix to the code
2. Run `npm run check` to verify types
3. If the state shape changed, warn the user they may need `ntn workers sync state reset <key>` (this triggers a full re-backfill)
4. Deploy and preview to verify: suggest `/sync-preview` or run `ntn workers deploy && ntn workers sync trigger <key> --preview`
5. When the fix is verified, `ntn workers sync trigger <key>` to resumeFrom makenotion/notion-cookbook, MIT.
More from makenotion/notion-cookbook
- 0.787score
notion-research-documentation
makenotionOfficial
Researches questions across Notion sources and synthesizes cited briefs, comparisons, or reports.
SkillAFreshness: A★ 220Claude Code +9 - 0.787score
notion-knowledge-capture
makenotionOfficial
Captures conversations and supplied notes as Notion wiki pages, how-to guides, FAQs, decision records, or retrospectives.
SkillAFreshness: A★ 220Claude Code +9 - 0.783score
notion-spec-to-implementation
makenotionOfficial
Converts Notion product or technical specs into implementation plans, linked tasks, and evidence-based progress updates.
SkillAFreshness: A★ 220Claude Code +9 - 0.783score
notion-database-designer
makenotionOfficial
Turns scattered notes and recurring work into useful Notion trackers for requests, content plans, or team work.
SkillAFreshness: A★ 220Claude Code +9 - 0.783score
notion-meeting-intelligence
makenotionOfficial
Prepares meeting agendas, internal pre-reads, and decision briefs using Notion context and relevant research.
SkillAFreshness: A★ 220Claude Code +9 - 0.783score
notion-weekly-project-digest
makenotionOfficial
Produces evidence-based weekly project or team updates by comparing reporting periods, tasks, decisions, and blockers in Notion.
SkillAFreshness: A★ 220Claude Code +9 - 0.779score
sketch
makenotionOfficial
Sketch an App workflow as a reviewable flow diagram when planning or iterating on its design with the user.
SkillAFreshness: A★ 220Claude Code +9 - 0.746score
custom-blocks
makenotionOfficial
Create, modify, and troubleshoot custom blocks in Notion Workers.
SkillBFreshness: B★ 220Claude Code +9 - 0.746score
auth-guide
makenotionOfficial
Guide to setting up third-party authentication for a Notion Worker.
SkillBFreshness: B★ 220Claude Code +9 - 0.742score
sync-guide
makenotionOfficial
Comprehensive guide to building Notion Workers syncs — covers the two-sync architecture (backfill+delta), replace mode, pagination, consistency buffers…
SkillBFreshness: B★ 220Claude Code +9 - 0.739score
workflow
makenotionOfficial
Scaffold a Notion Worker Workflow with typed triggers and replay-safe durable steps.
SkillBFreshness: B★ 220Claude Code +9 - 0.739score
workflow-guide
makenotionOfficial
Reference for typed triggers, durable steps, replay-safe data flow, and idempotent Workflow effects.
SkillBFreshness: B★ 220Claude Code +9
Signals
- Stars
- 220
- Forks
- 59
- Open issues
- 2
- Last commit (this folder)
- Aug 18, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/makenotion/notion-cookbook
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from makenotion
- 0.787score
notion-knowledge-capture
makenotionOfficial
Captures conversations and supplied notes as Notion wiki pages, how-to guides, FAQs, decision records, or retrospectives.
SkillAFreshness: A★ 220Claude Code +9 - 0.787score
notion-research-documentation
makenotionOfficial
Researches questions across Notion sources and synthesizes cited briefs, comparisons, or reports.
SkillAFreshness: A★ 220Claude Code +9 - 0.783score
notion-spec-to-implementation
makenotionOfficial
Converts Notion product or technical specs into implementation plans, linked tasks, and evidence-based progress updates.
SkillAFreshness: A★ 220Claude Code +9 - 0.783score
notion-database-designer
makenotionOfficial
Turns scattered notes and recurring work into useful Notion trackers for requests, content plans, or team work.
SkillAFreshness: A★ 220Claude Code +9 - 0.783score
notion-meeting-intelligence
makenotionOfficial
Prepares meeting agendas, internal pre-reads, and decision briefs using Notion context and relevant research.
SkillAFreshness: A★ 220Claude Code +9 - 0.783score
notion-weekly-project-digest
makenotionOfficial
Produces evidence-based weekly project or team updates by comparing reporting periods, tasks, decisions, and blockers in Notion.
SkillAFreshness: A★ 220Claude Code +9
Cite this page
sync-debug skill. Agent Mart. https://agentmart.dev/skills/makenotion-sync-debug (last updated 2026-10-24)