agentsclimarketplace

Notion to obsidian sync

Skill wearescribes/cms-sync-obsidian/skills/notion-to-obsidian-sync

Mirrors new cards from a configured Notion database into an Obsidian vault as individual notes, updates category index notes and the consolidated archive, marks synced cards in Notion, and sends an optional summary notification. Use when asked to "sync Notion to Obsidian", "mirror my Notion cards into the vault", "run the content sync", "check for new content to sync", "update my Obsidian archive", or when triggered as a scheduled sync task. Requires a config file created by /cms-sync-setup.From its SKILL.md

Install
npx -y skills add wearescribes/cms-sync-obsidian --skill notion-to-obsidian-sync

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

10.9 KB, as published. Nobody here has run it

Notion → Obsidian sync

Mirror new cards from the configured Notion database into the Obsidian vault: create one note per card, file it under the right category, update index notes and the archive, mark the card as synced in Notion, and report the result.

This skill is entirely config-driven. Read the config first; if there is no config, stop and tell the user to run /cms-sync-setup. Never assume database IDs, property names, folder layouts, categories, or notification targets.

Full schema: ${CLAUDE_PLUGIN_ROOT}/references/config-schema.md


Step 0 — Load config and check for pending retries

  1. Load the config. Follow the search order in the schema reference. If none is found, report that setup hasn't been run and stop — this is not an error to retry, it's a missing prerequisite.

  2. Load the classification vocabularies (classification.hook_types, classification.formats) and the category list (organization.pillars). These are the only values you may assign — do not invent new ones.

  3. Check the error log at <vault-root>/<state.error_log>. If it exists and has a non-empty pending_items array, load it as pending_items — these are notes from a previous run that couldn't be written to the vault. Note how many there are and when they were queued; you'll retry them in Step 6.

    If the file doesn't exist or is empty, set pending_items = [].

Step 1 — Find unsynced cards in Notion

Query the configured database (notion.database_url / notion.board_view_url / notion.data_source_id).

A card needs syncing when its notion.properties.sync_flag property is not equal to notion.properties.sync_flag_value. Cards already carrying that value are skipped.

Filter out anything that isn't an individual content card — container or rollup pages that group several items (titles suggesting a batch, a month, or a collection) are not content and must not be synced. When a title is ambiguous, fetch it and look at the body: a real content card has publishable body text.

If nothing needs syncing and pending_items is empty, skip to Step 7 and report a clean no-op.

Step 2 — Validate each unsynced card

A card must not be synced or marked, and instead goes on a flagged list, if any of these hold:

  • Empty body — the card has no text content to publish.
  • Duplicate number — the card's title carries a number that already exists in the vault or the archive for that author.
  • Unresolvable author — the card's title prefix matches no configured author and there is more than one author configured. (With a single configured author, assume that author.)

Collect flagged cards with the specific reason for each. They stay unsynced so a human can look at them.

Step 3 — Extract content verbatim

For each valid card, extract the publishable body text exactly as written. Do not paraphrase, summarize, clean up, or "improve" it. If the card contains notes, briefs, or scaffolding above the final text, take only the final text — it's normally the last substantial block in the body.

Also capture, where available: the card title, its URL, and the published date (from notion.properties.published_date if configured; otherwise leave the date unknown rather than inventing one).

Step 4 — Determine numbering

Find the highest existing note number in the vault for the relevant author:

  • If organization.moc_enabled, read the index notes.
  • Otherwise scan note frontmatter for the highest post_number.
  • Cross-check against the archive file if one is configured.

New notes continue from the highest found + 1, assigned in the order the cards appear. Numbers are per-author when multiple authors are configured.

Step 5 — Classify each item

For each item assign:

  • Category — only when organization.mode is pillars. Read each category's description from the config and pick the single best fit for the item's primary theme. If an item genuinely spans two categories, pick one as primary (that's where the note lives) and note the secondary for a cross-reference. In flat mode, skip this entirely.
  • Hook type — one value from classification.hook_types.
  • Format — one value from classification.formats.
  • Title — a short descriptive title, 5–8 words, that says what the piece argues or announces. Not a truncation of the first line.
  • Summary — one sentence capturing the core argument or purpose.
  • Slug — lowercase, hyphenated, derived from the title, 3–6 words.

Classify from the actual content. If an item doesn't clearly fit any configured category, put it in the closest one and mention the weak fit in the final report rather than silently forcing it.

Step 6 — Write to the vault

Handle new items from this run plus every entry in pending_items.

Note location

  • Pillars mode: <vault.root>/<vault.content_dir>/<Category Name>/YYYY-MM-DD_slug.md
  • Flat mode: <vault.root>/<vault.content_dir>/YYYY-MM-DD_slug.md

Use the published date when known. When it isn't, use the card's creation date if available, and otherwise today's date — and record date_confidence: "estimated" in frontmatter so it's honest about what it knows.

Create any missing folders.

Note format

---
title: "<the descriptive title>"
type: "content-note"
person: "<author key from config>"
category: "<exact category name>"        # omit entirely in flat mode
post_number: <n>
date: YYYY-MM-DD
date_confidence: "exact"                 # or "estimated"
hook_type: "<from configured hook_types>"
format: "<from configured formats>"
tags: [content-note, <category tag>, <author key>]
summary: "<one sentence>"
source_url: "<notion card url>"
---

# <the descriptive title>

<the verbatim body text>

---
## Related
- [[<Category Name>]] — Parent category      # pillars + moc_enabled only

In flat mode omit the category field and the Related section; keep the tags.

Index notes

When organization.mode is pillars and organization.moc_enabled is true, add a row to the category's index note (<Category Name>.md) in its ## Notes table, using the column order from organization.moc_table_columns:

| <post_number> | <date> | [[<filename>|<title>]] | <hook_type> |

Keep the table sorted by date ascending. If the index note doesn't exist, create it with a heading and the table header before adding rows.

For a cross-referenced secondary category, add a row there too using a folder-prefixed link so it resolves from the other folder.

Archive file

When vault.archive_file is configured, append each item to it in the same style the file already uses. Match the existing heading pattern and separator rather than imposing a new one — read the tail of the file first. Update any post count or date range in the file header if it has them.

Validation

After writing each note:

  1. The wiki-link in the index resolves — the filename matches exactly.
  2. post_number is sequential and not duplicated.
  3. The index table is still sorted by date ascending.

On failure

If the vault can't be written, or any note fails to write, do not mark those cards as synced in Notion. Instead write (overwriting) the error log at <vault-root>/<state.error_log>:

{
  "last_updated": "<ISO timestamp>",
  "sync_date": "<YYYY-MM-DD>",
  "error_reason": "<what went wrong, specifically>",
  "pending_items": [
    {
      "post_number": 0,
      "title": "<card title>",
      "source_url": "<card url>",
      "published_date": "<date or null>",
      "author_key": "<author key>",
      "category": "<chosen category>",
      "hook_type": "<chosen hook type>",
      "format": "<chosen format>",
      "summary": "<one sentence>",
      "suggested_filename": "YYYY-MM-DD_slug.md",
      "content": "<verbatim body text>"
    }
  ]
}

Always write the full file — merge new failures with any prior entries that are still unresolved. The classification work is preserved here so the next run doesn't have to redo it.

If every item wrote successfully and the error log exists, delete it.

Step 7 — Mark synced cards in Notion

For each card whose note was written successfully, set notion.properties.sync_flag to notion.properties.sync_flag_value.

Do not mark: flagged cards, or cards whose note failed to write.

If the update fails because the value isn't a valid option, the property may be missing that option. Report it clearly and suggest re-running /cms-sync-setup rather than altering the user's database schema unprompted.

Step 8 — Report

Build a summary covering: how many notes were created and their titles, how many previously-pending items were resolved, how many cards were flagged (with the reason and link for each), and anything queued for retry.

If notifications.enabled is true, send the summary to the configured channel_type / target. Choose the message shape that matches what happened:

  • New notes, vault OK — created N notes, listing titles; cards marked as synced.
  • New notes, vault failed — N notes queued in the error log for retry next run.
  • No new items, pending resolved — N previously-pending items now written; error log cleared.
  • No new items, pending still failing — N items still queued, originally from <sync_date>.
  • No new items, nothing pending — clean no-op. Only send this when notifications.notify_on_no_changes is true.
  • Mid-sync error — what failed and what state things are in.

Always append a flagged section when anything was flagged, listing each card with its link and the reason it needs a human.

If notifications are disabled, or the connector isn't available, report the same summary in chat instead. Never fail the sync because a notification couldn't be sent — the sync's job is the vault and Notion, the message is a courtesy.


Success criteria

  • Every valid unsynced card has a note in the vault and is marked synced in Notion
  • Notes carry accurate frontmatter using only configured vocabularies
  • Index notes and the archive stay consistent and correctly sorted
  • Flagged cards are left unsynced, with a specific reason reported
  • Failures are queued in the error log with classification intact, and retried next run
  • A summary reaches the user one way or another
  • Content is never invented — body text is verbatim from the card, and dates are marked estimated when not known

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.