notion-workers: Skill for Claude Code

.agents/skills/sync-guide/SKILL.md

sync-guide is a skill for Claude Code from colebemis/notion-workers. It costs 53 tokens per session (2,844 once invoked), scanned A, a copy of sync-guide, MIT.

A guide to building Notion Workers syncs, which are recurring programs that copy records and changes into a Notion database. It explains full backfills, ongoing updates, pagination, rate limits, consistency delays, and deletion handling.

In plain words
What is it for?
Use it when designing a sync architecture, choosing between replacing all data and applying changes, handling large APIs, or planning cursors and deletion strategies.
Why use it?
It helps avoid common data-sync problems such as missing records, duplicate records, API limits, and deleted items remaining in Notion.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: installed under .agents/ (shared by several agents).

This is colebemis/notion-workers's own configuration. It tells Claude Code how to work on notion-workers itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything notion-workers configures →

Reuse

Borrowing it

Nothing to install: this file belongs to colebemis/notion-workers. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/colebemis/notion-workers/main/.agents/skills/sync-guide/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/colebemis/notion-workers

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sync-guide

README.md
[![agentmods](https://agentmods.dev/badge/skills/colebemis/notion-workers/sync-guide/github.svg)](https://agentmods.dev/skills/colebemis/notion-workers/sync-guide)
Your own site
<a href="https://agentmods.dev/skills/colebemis/notion-workers/sync-guide"><img src="https://agentmods.dev/badge/skills/colebemis/notion-workers/sync-guide/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sync-guide

Your own site · 80×15
<a href="https://agentmods.dev/skills/colebemis/notion-workers/sync-guide"><img src="https://agentmods.dev/badge/skills/colebemis/notion-workers/sync-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,844 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 95% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.02844
Opus 5.5 $0.00021 $0.01138
Sonnet 5.5 $0.00011 $0.00569
Haiku 4.5 $0.00005 $0.00284

Measured 1mo ago against content hash 100051ec8bb3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sync-guide scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 5 executable files (examples/incremental-basic.ts, examples/incremental-bimodal.ts, examples/incremental-events.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

95% identical to sync-guide — 149 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/sync-guide/SKILL.md · 254 lines

How it starts

The opening of the file, as written. The whole thing — 254 lines — stays where its author put it; the contents beside it link to each section on GitHub.

What is a Sync?

A sync is a recurring execute function that returns data changes to populate a Notion database. The runtime calls execute in a loop:

const db = worker.database("myDb", {
  type: "managed",
  initialTitle: "My Data",
  primaryKeyProperty: "ID",
  schema: {
    properties: {
      Name: Schema.title(),
      ID: Schema.richText(),
    },
  },
});

worker.sync("mySync", {
  database: db,
  execute: async (state, { notion }) => ({
    changes: [
      { type: "upsert", key: "1", properties: { Name: Builder.title("Item 1"), ID: Builder.richText("1") } },
    ],
    hasMore: false,
    nextState: undefined,
  }),
});

Each call returns { changes, hasMore, nextState }. If hasMore is true, the runtime calls execute again with nextState. This continues until hasMore is false, completing a cycle. The next cycle begins at the scheduled interval with the state from the end of the previous cycle.

Imports:

import { Worker } from "@notionhq/workers";
import * as Builder from "@notionhq/workers/builder";
import * as Schema from "@notionhq/workers/schema";

Decision Framework

Step 1: Choose an Architecture

The deciding factor is API capability and dataset size. Two tiers:

Condition Architecture
Small source (<1k records) or API with no change tracking Simple replace sync — one sync, mode: "replace"
Everything else (API supports updated_at, change feeds, events) Backfill + delta pair — two syncs writing to the same database

Simple replace sync: One sync returns the full dataset each cycle. After the final hasMore: false, any records not seen are deleted automatically. Use when the dataset is small enough to re-fetch entirely.

Backfill + delta pair: Two syncs share a single database. The backfill sync (mode: "replace", schedule: "manual") re-fetches everything when triggered. The delta sync (mode: "incremental", frequent schedule) fetches only changes since the last run. This separates concerns cleanly — no bi-modal state machine, no backfill-to-delta transition bugs.

Read the full file on GitHub · 254 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 254 lines · 53 tokens per session scan A 100051ec8bb3

Subscribe to this mod's changes

sync-guide is a skill published in the GitHub repository colebemis/notion-workers (127 stars, last pushed 11d ago), licensed MIT. It adds 53 tokens to every session and 2,844 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 95% identical to sync-guide, differing in 149 lines, and is treated as a copy.

Related

Other skills, from other repositories

event-store-design

Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.

wshobson/agents · 33 tokens

platform-custom-field-generate

Use when users create, generate, or validate Salesforce Custom Field metadata. Trigger on custom fields, field types, Roll-Up Summary, Master-Detail/Lookup relationships, formula fields, picklists, dependent (controlling) picklists, referencing a value set from a field, or scoping picklist values per record type; also…

forcedotcom/sf-skills · 139 tokens

field-service-sobject-create-configure

Headless 360 REST API deployment step for creating sObject records. Handles describe-based field discovery, required-field derivation, entity-relationship ordering, and composite graph transactions. Use this skill when a designer skill (or a user directly) needs to create sObject records after design confirmation…

forcedotcom/sf-skills · 74 tokens

durable-objects

Build, debug, or review Cloudflare Durable Objects code for persistent state and coordination.

fcakyon/claude-codex-settings · 22 tokens

nornicdb-grpc

Drive NornicDB over gRPC — the Qdrant-compatible surface (Collections, Points, Snapshots) plus the additive NornicSearch service. Use when ingesting via Qdrant SDKs, migrating from Qdrant, or running hybrid text+vector search from a non-Bolt client. Covers connection, RPC catalog, collection→database mapping…

orneryd/NornicDB · 98 tokens

azure-resource-manager-sql-dotnet

Management plane SDK for provisioning and managing Azure SQL resources via Azure Resource Manager.

benjaminasterA/antigravity-awesome-skills · 0 tokens