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.
curl -O https://raw.githubusercontent.com/colebemis/notion-workers/main/.agents/skills/sync-guide/SKILL.mdgit clone --depth 1 https://github.com/colebemis/notion-workersWrote 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.
[](https://agentmods.dev/skills/colebemis/notion-workers/sync-guide)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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.
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.
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.
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.
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.
- 1mo ago First seen · 254 lines · 53 tokens per session scan A 100051ec8bb3
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.
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.
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…
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…
durable-objects
Build, debug, or review Cloudflare Durable Objects code for persistent state and coordination.
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…
azure-resource-manager-sql-dotnet
Management plane SDK for provisioning and managing Azure SQL resources via Azure Resource Manager.