# Send Notion Sync to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "openclaw-notion-sync",
    "name": "Notion Sync",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/kitakitsune0x/openclaw-notion-sync",
    "canonicalUrl": "https://clawhub.ai/kitakitsune0x/openclaw-notion-sync",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/openclaw-notion-sync",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=openclaw-notion-sync",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "bin/notion-sync.js",
      "package-lock.json",
      "package.json",
      "src/cli.ts"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "openclaw-notion-sync",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T14:01:21.102Z",
      "expiresAt": "2026-05-07T14:01:21.102Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=openclaw-notion-sync",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=openclaw-notion-sync",
        "contentDisposition": "attachment; filename=\"openclaw-notion-sync-0.1.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "openclaw-notion-sync"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/openclaw-notion-sync"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/openclaw-notion-sync",
    "downloadUrl": "https://openagent3.xyz/downloads/openclaw-notion-sync",
    "agentUrl": "https://openagent3.xyz/skills/openclaw-notion-sync/agent",
    "manifestUrl": "https://openagent3.xyz/skills/openclaw-notion-sync/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/openclaw-notion-sync/agent.md"
  }
}
```
## Documentation

### notion-sync

CLI and library for syncing a local directory tree into Notion. Folders become Notion pages, files become sub-pages with content.

### Installation

npm install -g @kitakitsune/notion-sync

Requires Node.js >= 18.

### Initialization

notion-sync init --token ntn_xxx --page <notion-page-id> [--dir <path>]

Creates .notion-sync.json in the target directory
The Notion integration must be shared with the target root page first

### Sync Commands

notion-sync sync                   # sync everything
notion-sync sync --dry-run         # preview changes
notion-sync sync --diff            # only sync changed files
notion-sync sync --dir /some/path  # sync a specific directory
notion-sync status                 # show sync state
notion-sync ignore list            # list ignore patterns
notion-sync ignore add "*.env"     # add ignore pattern

### Default Ignore Patterns

node_modules, .git, dist, .notion-sync.json, *.lock, *.log

### Programmatic Usage

import { syncWorkspace, initConfig, loadConfig, saveConfig } from '@kitakitsune/notion-sync';
import type { NotionSyncConfig } from '@kitakitsune/notion-sync';

const config = loadConfig(process.cwd());
const result = await syncWorkspace(config, { dryRun: false, diffOnly: true });
// result.pushed   - files that were synced
// result.skipped  - files unchanged (when diffOnly)
// result.errors   - files that failed

### Architecture

src/
  cli.ts     - Commander.js CLI (init, sync, ignore, status)
  sync.ts    - Core sync logic, Notion API calls, checksum diffing
  config.ts  - Load/save/init .notion-sync.json
  types.ts   - NotionSyncConfig interface
  index.ts   - Public API exports
bin/
  notion-sync.js - CLI entry point

### Key Implementation Details

Checksums: MD5 hashes stored in .notion-sync.json under checksums field. Used by --diff to skip unchanged files.
Content chunking: File content is split into 1800-character blocks for the Notion API.
Page upsert: Existing pages are updated by deleting all blocks then re-appending. New pages are created with content inline.
Folder hierarchy: Directories are created as Notion pages with folder icon. A folderCache avoids redundant API calls.

### Config File Structure

.notion-sync.json:

{
  "path": "/absolute/path",
  "notion": {
    "token": "ntn_...",
    "rootPageId": "page-id"
  },
  "ignore": ["node_modules", ".git", "dist", ".notion-sync.json", "*.lock", "*.log"],
  "checksums": { "src/index.ts": "md5hash" }
}

### Development

npm run dev    # watch mode (tsup)
npm run build  # production build

Build uses tsup to bundle TypeScript to ESM format. Output goes to dist/.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: kitakitsune0x
- Version: 0.1.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-04-30T14:01:21.102Z
- Expires at: 2026-05-07T14:01:21.102Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/openclaw-notion-sync)
- [Send to Agent page](https://openagent3.xyz/skills/openclaw-notion-sync/agent)
- [JSON manifest](https://openagent3.xyz/skills/openclaw-notion-sync/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/openclaw-notion-sync/agent.md)
- [Download page](https://openagent3.xyz/downloads/openclaw-notion-sync)