jpskill.com
🛠️ 開発・MCP コミュニティ

Notionの非公式APIを活用し、ページ、データベース、ブロック、検索、ユーザー、コメントといったNotionの様々な要素を操作し、ビジネスに必要な情報を効率的に活用するSkill。

vibe-notion

Notionの非公式プライベートAPIを利用して、ページ、データベース、ブロック、検索、ユーザー、コメントなどの操作を可能にするSkill。

📜 元の英語説明(参考)

Interact with Notion using the unofficial private API - pages, databases, blocks, search, users, comments

🇯🇵 日本人クリエイター向け解説

一言でいうと

Notionの非公式プライベートAPIを利用して、ページ、データベース、ブロック、検索、ユーザー、コメントなどの操作を可能にするSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o vibe-notion.zip https://jpskill.com/download/5538.zip && unzip -o vibe-notion.zip && rm vibe-notion.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/5538.zip -OutFile "$d\vibe-notion.zip"; Expand-Archive "$d\vibe-notion.zip" -DestinationPath $d -Force; ri "$d\vibe-notion.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して vibe-notion.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → vibe-notion フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-18
同梱ファイル
5

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[Skill 名] vibe-notion

Vibe Notion

AIエージェントと人間が、非公式のプライベートAPIを通じてNotionワークスペースと対話できるようにするTypeScript CLIツールです。ページ、データベース、ブロック、検索、ユーザー管理に対する完全なCRUD操作をサポートしています。

: このスキルは、公式のパブリックAPIとは異なるNotionの内部/プライベートAPI (/api/v3/) を使用しています。公式APIへのアクセスには vibe-notionbot を使用してください。

どちらのCLIを使用するか

このパッケージには2つのCLIが含まれています。状況に応じて適切な方を選択してください。

vibe-notion (このCLI) vibe-notionbot
API 非公式プライベートAPI 公式Notion API
認証 Notionデスクトップアプリから自動抽出される token_v2 NOTION_TOKEN 環境変数 (インテグレーショントークン)
ID ユーザーとして動作 ボットとして動作
セットアップ 不要 — 認証情報は自動的に抽出されます 手動 — notion.so/my-integrations でインテグレーションを作成
データベース行 add-row, update-row page create --database を介して作成
ビュー管理 view-get, view-update, view-list, view-add, view-delete サポートされていません
ワークスペース一覧表示 サポートされています サポートされていません
安定性 プライベートAPI — Notionの変更により破損する可能性があります 公式バージョン管理されたAPI — 安定しています

決定フロー:

  1. Notionデスクトップアプリがインストールされている場合 → vibe-notion (このCLI) を使用します
  2. NOTION_TOKEN が設定されているがデスクトップアプリがない場合 → vibe-notionbot を使用します
  3. 両方利用可能な場合 → vibe-notion を優先します (より広範な機能、セットアップ不要)
  4. どちらも利用できない場合 → ユーザーにどちらか一方をセットアップするよう依頼します

重要: CLIのみ

Notionの内部APIを直接呼び出さないでください。 このスキルで説明されている vibe-notion CLIコマンドを常に使用してください。notion.so/api/v3/ への生のHTTPリクエストを行ったり、Notionクライアントライブラリを使用したりしないでください。直接APIを呼び出すと、認証情報が漏洩するリスクがあり、Notionの不正検出がトリガーされ、ユーザーのアカウントがブロックされる可能性があります。

vibe-notion で必要な機能がサポートされていない場合は、ユーザーにその旨を伝え、ユーザーに代わって devxoul/vibe-notion で機能リクエストを提出することを提案してください。提出する前に、実際のユーザーデータ(ID、名前、メールアドレス、トークン、ページコンテンツ、その他ユーザーやワークスペースを特定できるもの)をすべて削除してください。代わりに一般的なプレースホルダーを使用し、問題は不足している機能の説明に焦点を当ててください。

重要: スクリプトは絶対に書かないでください

Notion操作を自動化するためにスクリプト (Python、TypeScript、Bashなど) を絶対に書かないでください。 batch コマンドは、あらゆるサイズのバルク操作をすでに処理します。API呼び出しをループするスクリプトを書くことは常に間違っています。代わりに --file を指定して batch を使用してください。

これは、次のような場合にも当てはまります。

  • 100行以上作成する必要がある場合
  • 新しく作成された行間に相互参照が必要な場合 (マルチパスバッチを使用してください — references/batch-operations.md を参照)
  • 操作が単一のコマンドには「大きすぎる」と感じる場合

「これにはスクリプトを書くべきだ」と考え始めたら、立ち止まって batch を使用してください。

クイックスタート

# 1. ワークスペースIDを見つける
vibe-notion workspace list --pretty

# 2. ページを検索する
vibe-notion search "Roadmap" --workspace-id <workspace-id> --pretty

# 3. ページコンテンツを取得する
vibe-notion page get <page-id> --workspace-id <workspace-id> --pretty

# 4. データベースをクエリする
vibe-notion database query <collection-id> --workspace-id <workspace-id> --pretty

認証情報は、初回使用時にNotionデスクトップアプリから自動抽出されます。手動でのセットアップは不要です。

重要: 特定のワークスペース内で動作するすべてのコマンドには --workspace-id が必要です。ワークスペースIDを見つけるには vibe-notion workspace list を使用してください。

認証

認証情報 (token_v2) は、コマンドを実行するとNotionデスクトップアプリから自動抽出されます。APIキー、OAuth、手動での抽出は不要です。

macOSでは、初回使用時にシステムがキーチェーンアクセスを求める場合があります。これは正常な動作であり、Cookieを復号化するために必要です。

抽出された token_v2 は、~/.config/vibe-notion/credentials.json0600 権限で保存されます。

メモリ

エージェントは、セッション間で永続的なメモリとして ~/.config/vibe-notion/MEMORY.md ファイルを維持します。これはエージェントによって管理され、CLIはこのファイルを読み書きしません。メモリファイルを管理するには Read および Write ツールを使用してください。

メモリの読み取り

すべてのタスクの開始時に、Read ツールを使用して ~/.config/vibe-notion/MEMORY.md を読み込み、以前に発見されたワークスペースID、ページID、データベースID、およびユーザー設定をロードしてください。

  • ファイルがまだ存在しない場合でも問題ありません。ファイルなしで続行し、有用な情報を初めて保存するときに作成してください。
  • ファイルが読み取れない場合 (権限、ディレクトリの欠落) は、メモリなしで続行してください。エラーを発生させないでください。

メモリの書き込み

有用な情報を発見した後、Write ツールを使用して ~/.config/vibe-notion/MEMORY.md を更新してください。書き込みのトリガーには以下が含まれます。

  • ワークスペースIDを発見した後 (workspace list から)
  • 有用なページID、データベースID、コレクションIDを発見した後 (searchpage listpage getdatabase list などから)
  • ユーザーがエイリアスや設定を与えた後 (「これをタスクDBと呼ぶ」、「私のメインワークスペースはX」)
  • ページ/データベース構造 (親子関係、どのデータベースがどのページの下にあるか) を発見した後

書き込み時には、完全なファイルコンテンツを含めてください。Write ツールはファイル全体を上書きします。

何を保存するか

  • 名前付きワークスペースID
  • タイトルと親コンテキスト付きページID
  • タイトルと親コンテキスト付きデータベース/コレクションID
  • ユーザーが与えたエイリアス (「タスクDB」、「メインワークスペース」)
  • よく使用されるビューID
  • 親子関係 (どのデータベースがどのページの下にあるか)
  • 対話中に表明されたユーザー設定

何を保存しないか

token_v2、認証情報、APIキー、または機密データを絶対に保存しないでください。完全なページコンテンツ (IDとタイトルのみ) を保存しないでください。永続的な参照 (データベースブロックなど) でない限り、ブロックレベルのIDを保存しないでください。

古いデータの処理

記憶されたIDがエラーを返す場合 (ページが見つからない場合

(原文がここで切り詰められています)

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Vibe Notion

A TypeScript CLI tool that enables AI agents and humans to interact with Notion workspaces through the unofficial private API. Supports full CRUD operations on pages, databases, blocks, search, and user management.

Note: This skill uses Notion's internal/private API (/api/v3/), which is separate from the official public API. For official API access, use vibe-notionbot.

Which CLI to Use

This package ships two CLIs. Pick the right one based on your situation:

vibe-notion (this CLI) vibe-notionbot
API Unofficial private API Official Notion API
Auth token_v2 auto-extracted from Notion desktop app NOTION_TOKEN env var (Integration token)
Identity Acts as the user Acts as a bot
Setup Zero — credentials extracted automatically Manual — create Integration at notion.so/my-integrations
Database rows add-row, update-row Create via page create --database
View management view-get, view-update, view-list, view-add, view-delete Not supported
Workspace listing Supported Not supported
Stability Private API — may break on Notion changes Official versioned API — stable

Decision flow:

  1. If the Notion desktop app is installed → use vibe-notion (this CLI)
  2. If NOTION_TOKEN is set but no desktop app → use vibe-notionbot
  3. If both are available → prefer vibe-notion (broader capabilities, zero setup)
  4. If neither → ask the user to set up one of the two

Important: CLI Only

Never call Notion's internal API directly. Always use the vibe-notion CLI commands described in this skill. Do not make raw HTTP requests to notion.so/api/v3/ or use any Notion client library. Direct API calls risk exposing credentials and may trigger Notion's abuse detection, getting the user's account blocked.

If a feature you need is not supported by vibe-notion, let the user know and offer to file a feature request at devxoul/vibe-notion on their behalf. Before submitting, strip out any real user data — IDs, names, emails, tokens, page content, or anything else that could identify the user or their workspace. Use generic placeholders instead and keep the issue focused on describing the missing capability.

Important: Never Write Scripts

Never write scripts (Python, TypeScript, Bash, etc.) to automate Notion operations. The batch command already handles bulk operations of any size. Writing a script to loop through API calls is always wrong — use batch with --file instead.

This applies even when:

  • You need to create 100+ rows
  • You need cross-references between newly created rows (use multi-pass batch — see references/batch-operations.md)
  • The operation feels "too big" for a single command

If you catch yourself thinking "I should write a script for this," stop and use batch.

Quick Start

# 1. Find your workspace ID
vibe-notion workspace list --pretty

# 2. Search for a page
vibe-notion search "Roadmap" --workspace-id <workspace-id> --pretty

# 3. Get page content
vibe-notion page get <page-id> --workspace-id <workspace-id> --pretty

# 4. Query a database
vibe-notion database query <collection-id> --workspace-id <workspace-id> --pretty

Credentials are auto-extracted from the Notion desktop app on first use. No manual setup needed.

Important: --workspace-id is required for ALL commands that operate within a specific workspace. Use vibe-notion workspace list to find your workspace ID.

Authentication

Credentials (token_v2) are auto-extracted from the Notion desktop app when you run any command. No API keys, OAuth, or manual extraction needed.

On macOS, your system may prompt for Keychain access on first use — this is normal and required to decrypt the cookie.

The extracted token_v2 is stored at ~/.config/vibe-notion/credentials.json with 0600 permissions.

Memory

The agent maintains a ~/.config/vibe-notion/MEMORY.md file as persistent memory across sessions. This is agent-managed — the CLI does not read or write this file. Use the Read and Write tools to manage your memory file.

Reading Memory

At the start of every task, read ~/.config/vibe-notion/MEMORY.md using the Read tool to load any previously discovered workspace IDs, page IDs, database IDs, and user preferences.

  • If the file doesn't exist yet, that's fine — proceed without it and create it when you first have useful information to store.
  • If the file can't be read (permissions, missing directory), proceed without memory — don't error out.

Writing Memory

After discovering useful information, update ~/.config/vibe-notion/MEMORY.md using the Write tool. Write triggers include:

  • After discovering workspace IDs (from workspace list)
  • After discovering useful page IDs, database IDs, collection IDs (from search, page list, page get, database list, etc.)
  • After the user gives you an alias or preference ("call this the Tasks DB", "my main workspace is X")
  • After discovering page/database structure (parent-child relationships, what databases live under which pages)

When writing, include the complete file content — the Write tool overwrites the entire file.

What to Store

  • Workspace IDs with names
  • Page IDs with titles and parent context
  • Database/collection IDs with titles and parent context
  • User-given aliases ("Tasks DB", "Main workspace")
  • Commonly used view IDs
  • Parent-child relationships (which databases are under which pages)
  • Any user preference expressed during interaction

What NOT to Store

Never store token_v2, credentials, API keys, or any sensitive data. Never store full page content (just IDs and titles). Never store block-level IDs unless they're persistent references (like database blocks).

Handling Stale Data

If a memorized ID returns an error (page not found, access denied), remove it from MEMORY.md. Don't blindly trust memorized data — verify when something seems off. Prefer re-searching over using a memorized ID that might be stale.

Format / Example

Here's a concrete example of how to structure your MEMORY.md:

# Vibe Notion Memory

## Workspaces

- `abc123-...` — Acme Corp (default)

## Pages (Acme Corp)

- `page-id-1` — Product Roadmap (top-level)
- `page-id-2` — Q1 Planning (under Product Roadmap)

## Databases (Acme Corp)

- `coll-id-1` — Tasks (under Product Roadmap, views: `view-1`)
- `coll-id-2` — Contacts (top-level)

## Aliases

- "roadmap" → `page-id-1` (Product Roadmap)
- "tasks" → `coll-id-1` (Tasks database)

## Notes

- User prefers --pretty output for search results
- Main workspace is "Acme Corp"

Memory lets you skip repeated search and workspace list calls. When you already know an ID from a previous session, use it directly.

Commands

Auth Commands

vibe-notion auth status     # Check authentication status
vibe-notion auth logout     # Remove stored token_v2
vibe-notion auth extract    # Manually re-extract token_v2 (for troubleshooting)

Page Commands

# List pages in a space (top-level only)
vibe-notion page list --workspace-id <workspace_id> --pretty
vibe-notion page list --workspace-id <workspace_id> --depth 2 --pretty

# Get a page and all its content blocks
vibe-notion page get <page_id> --workspace-id <workspace_id> --pretty
vibe-notion page get <page_id> --workspace-id <workspace_id> --limit 50
vibe-notion page get <page_id> --workspace-id <workspace_id> --backlinks --pretty

# Create a new page (--parent is optional; omit to create at workspace root)
vibe-notion page create --workspace-id <workspace_id> --parent <parent_id> --title "My Page" --pretty
vibe-notion page create --workspace-id <workspace_id> --title "New Root Page" --pretty


# Create a page with markdown content
vibe-notion page create --workspace-id <workspace_id> --parent <parent_id> --title "My Doc" --markdown '# Hello\n\nThis is **bold** text.'

# Create a page with markdown from a file
vibe-notion page create --workspace-id <workspace_id> --parent <parent_id> --title "My Doc" --markdown-file ./content.md

# Create a page with markdown containing local images (auto-uploaded to Notion)
vibe-notion page create --workspace-id <workspace_id> --parent <parent_id> --title "My Doc" --markdown-file ./doc-with-images.md

# Replace all content on a page with new markdown
vibe-notion page update <page_id> --workspace-id <workspace_id> --replace-content --markdown '# New Content'
vibe-notion page update <page_id> --workspace-id <workspace_id> --replace-content --markdown-file ./updated.md

# Update page title or icon
vibe-notion page update <page_id> --workspace-id <workspace_id> --title "New Title" --pretty
vibe-notion page update <page_id> --workspace-id <workspace_id> --icon "🚀" --pretty

# Archive a page
vibe-notion page archive <page_id> --workspace-id <workspace_id> --pretty

# Get page or database row properties (without content blocks — lightweight alternative to page get)
vibe-notion page properties <page_id> --workspace-id <workspace_id> --pretty

Database Commands

# Get database schema
vibe-notion database get <database_id> --workspace-id <workspace_id> --pretty

# Query a database (auto-resolves default view)
vibe-notion database query <database_id> --workspace-id <workspace_id> --pretty
vibe-notion database query <database_id> --workspace-id <workspace_id> --limit 10 --pretty
vibe-notion database query <database_id> --workspace-id <workspace_id> --view-id <view_id> --pretty
vibe-notion database query <database_id> --workspace-id <workspace_id> --search-query "keyword" --pretty
vibe-notion database query <database_id> --workspace-id <workspace_id> --timezone "America/New_York" --pretty

# Query with filter and sort (uses property IDs from database get schema)
vibe-notion database query <database_id> --workspace-id <workspace_id> --filter '<filter_json>' --pretty
vibe-notion database query <database_id> --workspace-id <workspace_id> --sort '<sort_json>' --pretty

# List all databases in workspace
vibe-notion database list --workspace-id <workspace_id> --pretty

# Create a database
vibe-notion database create --workspace-id <workspace_id> --parent <page_id> --title "Tasks" --pretty
vibe-notion database create --workspace-id <workspace_id> --parent <page_id> --title "Tasks" --properties '{"status":{"name":"Status","type":"select"}}' --pretty

# Update database title or schema
vibe-notion database update <database_id> --workspace-id <workspace_id> --title "New Name" --pretty
vibe-notion database update <database_id> --workspace-id <workspace_id> --properties '{"status":{"name":"Status","type":"select"}}' --pretty
vibe-notion database update <database_id> --workspace-id <workspace_id> --title "New Name" --properties '{"status":{"name":"Status","type":"select"}}' --pretty

# Add a row to a database
vibe-notion database add-row <database_id> --workspace-id <workspace_id> --title "Row title" --pretty
vibe-notion database add-row <database_id> --workspace-id <workspace_id> --title "Row title" --properties '{"Status":"In Progress","Due":{"start":"2025-03-01"}}' --pretty

# Add row with date range
vibe-notion database add-row <database_id> --workspace-id <workspace_id> --title "Event" --properties '{"Due":{"start":"2026-01-01","end":"2026-01-15"}}' --pretty

# Update properties on an existing database row (row_id from database query)
vibe-notion database update-row <row_id> --workspace-id <workspace_id> --properties '{"Status":"Done"}' --pretty
vibe-notion database update-row <row_id> --workspace-id <workspace_id> --properties '{"Priority":"High","Tags":["backend","infra"]}' --pretty
vibe-notion database update-row <row_id> --workspace-id <workspace_id> --properties '{"Due":{"start":"2026-06-01"},"Status":"In Progress"}' --pretty
vibe-notion database update-row <row_id> --workspace-id <workspace_id> --properties '{"Due":{"start":"2026-01-01","end":"2026-01-15"}}' --pretty
vibe-notion database update-row <row_id> --workspace-id <workspace_id> --properties '{"Related":["<target_row_id>"]}' --pretty

# Delete a property from a database (cannot delete the title property)
vibe-notion database delete-property <database_id> --workspace-id <workspace_id> --property "Status" --pretty

# Get view configuration and property visibility
vibe-notion database view-get <view_id> --workspace-id <workspace_id> --pretty

# Show or hide properties on a view (comma-separated names)
vibe-notion database view-update <view_id> --workspace-id <workspace_id> --show "ID,Due" --pretty
vibe-notion database view-update <view_id> --workspace-id <workspace_id> --hide "Assignee" --pretty
vibe-notion database view-update <view_id> --workspace-id <workspace_id> --show "Status" --hide "Due" --pretty

# Reorder columns (comma-separated names in desired order; unmentioned columns appended)
vibe-notion database view-update <view_id> --workspace-id <workspace_id> --reorder "Name,Status,Priority,Date" --pretty
vibe-notion database view-update <view_id> --workspace-id <workspace_id> --reorder "Name,Status" --show "Status" --pretty

# Resize columns (JSON mapping property names to pixel widths)
vibe-notion database view-update <view_id> --workspace-id <workspace_id> --resize '{"Name":200,"Status":150}' --pretty

# List all views for a database
vibe-notion database view-list <database_id> --workspace-id <workspace_id> --pretty

# Add a new view to a database (default type: table)
vibe-notion database view-add <database_id> --workspace-id <workspace_id> --pretty
vibe-notion database view-add <database_id> --workspace-id <workspace_id> --type board --name "Board View" --pretty

# Delete a view from a database (cannot delete the last view)
vibe-notion database view-delete <view_id> --workspace-id <workspace_id> --pretty

Table Commands

Simple tables (non-database) — lightweight tables embedded in pages.

# Create a simple table with headers and optional rows
vibe-notion table create <parent_id> --workspace-id <workspace_id> --headers "Name,Role,Score" --pretty
vibe-notion table create <parent_id> --workspace-id <workspace_id> --headers "Name,Role,Score" --rows '[["Alice","Dev","95"],["Bob","PM","88"]]' --pretty
vibe-notion table create <parent_id> --workspace-id <workspace_id> --headers "A,B" --after <block_id> --pretty
vibe-notion table create <parent_id> --workspace-id <workspace_id> --headers "A,B" --before <block_id> --pretty

# Add a row to a simple table
vibe-notion table add-row <table_id> --workspace-id <workspace_id> --cells "Charlie,QA,92" --pretty

# Update a single cell (row and col are 0-indexed, excluding header row)
vibe-notion table update-cell <table_id> --workspace-id <workspace_id> --row 0 --col 1 --value "Lead" --pretty

# Delete a row (0-indexed, excluding header row)
vibe-notion table delete-row <table_id> --workspace-id <workspace_id> --row 0 --pretty

Simple tables vs databases: Simple tables are inline, lightweight grids with no schema, filters, or views. Use database commands for structured data with typed properties, filtering, and sorting.

Block Commands

# Get a specific block
vibe-notion block get <block_id> --workspace-id <workspace_id> --pretty
vibe-notion block get <block_id> --workspace-id <workspace_id> --backlinks --pretty

# List child blocks
vibe-notion block children <block_id> --workspace-id <workspace_id> --pretty
vibe-notion block children <block_id> --workspace-id <workspace_id> --limit 50 --pretty
vibe-notion block children <block_id> --workspace-id <workspace_id> --start-cursor '<next_cursor_json>' --pretty

# Append child blocks
vibe-notion block append <parent_id> --workspace-id <workspace_id> --content '[{"type":"text","properties":{"title":[["Hello world"]]}}]' --pretty

# Append markdown content as blocks
vibe-notion block append <parent_id> --workspace-id <workspace_id> --markdown '# Hello\n\nThis is **bold** text.'

# Append markdown from a file
vibe-notion block append <parent_id> --workspace-id <workspace_id> --markdown-file ./content.md

# Append markdown with local images (auto-uploaded to Notion)
vibe-notion block append <parent_id> --workspace-id <workspace_id> --markdown-file ./doc-with-images.md

# Append nested markdown (indented lists become nested children blocks)
vibe-notion block append <parent_id> --workspace-id <workspace_id> --markdown '- Parent item\n  - Child item\n    - Grandchild item'

# Append blocks after a specific block (positional insertion)
vibe-notion block append <parent_id> --workspace-id <workspace_id> --after <block_id> --markdown '# Inserted after specific block'
vibe-notion block append <parent_id> --workspace-id <workspace_id> --after <block_id> --content '[{"type":"text","properties":{"title":[["Inserted after"]]}}]'

# Append blocks before a specific block
vibe-notion block append <parent_id> --workspace-id <workspace_id> --before <block_id> --markdown '# Inserted before specific block'

# Update a block
vibe-notion block update <block_id> --workspace-id <workspace_id> --content '{"properties":{"title":[["Updated text"]]}}' --pretty

# Delete a block
vibe-notion block delete <block_id> --workspace-id <workspace_id> --pretty

# Upload a file as a block (image or file block)
vibe-notion block upload <parent_id> --workspace-id <workspace_id> --file ./image.png --pretty
vibe-notion block upload <parent_id> --workspace-id <workspace_id> --file ./document.pdf --pretty
vibe-notion block upload <parent_id> --workspace-id <workspace_id> --file ./image.png --after <block_id> --pretty
vibe-notion block upload <parent_id> --workspace-id <workspace_id> --file ./image.png --before <block_id> --pretty

# Move a block to a new position
vibe-notion block move <block_id> --workspace-id <workspace_id> --parent <parent_id> --pretty
vibe-notion block move <block_id> --workspace-id <workspace_id> --parent <parent_id> --after <sibling_id> --pretty
vibe-notion block move <block_id> --workspace-id <workspace_id> --parent <parent_id> --before <sibling_id> --pretty

Block Types & Rich Text Reference

For block type JSON format (headings, text, lists, to-do, code, quote, divider) and rich text formatting codes, see references/block-types.md.

Comment Commands

# List comments on a page
vibe-notion comment list --page <page_id> --workspace-id <workspace_id> --pretty

# List inline comments on a specific block
vibe-notion comment list --page <page_id> --block <block_id> --workspace-id <workspace_id> --pretty

# Create a comment on a page (starts a new discussion)
vibe-notion comment create "This is a comment" --page <page_id> --workspace-id <workspace_id> --pretty

# Reply to an existing discussion thread
vibe-notion comment create "Replying to thread" --discussion <discussion_id> --workspace-id <workspace_id> --pretty

# Get a specific comment by ID
vibe-notion comment get <comment_id> --workspace-id <workspace_id> --pretty

Batch Operations

For batch command format, supported actions (14 total), operation JSON structure, output format, fail-fast behavior, bulk operations strategy (multi-pass pattern), and rate limit handling, see references/batch-operations.md.

Quick usage:

# Inline JSON
vibe-notion batch --workspace-id <workspace_id> '<operations_json>'

# From file (for large payloads)
vibe-notion batch --workspace-id <workspace_id> --file ./operations.json '[]'

Search Command

# Search across workspace (--workspace-id is required)
vibe-notion search "query" --workspace-id <workspace_id> --pretty
vibe-notion search "query" --workspace-id <workspace_id> --limit 10 --pretty
vibe-notion search "query" --workspace-id <workspace_id> --start-cursor <offset> --pretty
vibe-notion search "query" --workspace-id <workspace_id> --sort lastEdited --pretty

User Commands

# Get current user info
vibe-notion user me --pretty

# Get a specific user
vibe-notion user get <user_id> --workspace-id <workspace_id> --pretty

# List users in a workspace
vibe-notion user list --workspace-id <workspace_id> --pretty

Output Format

All commands output JSON by default. Use --pretty for human-readable output.

For JSON response shapes (search, database query, page get, block get, backlinks), $hints schema warnings, and detailed examples, see references/output-format.md.

When to Use --backlinks

Backlinks reveal which pages/databases link to a given page. This is critical for efficient navigation.

Use --backlinks when:

  • Tracing relations: A search result looks like a select option, enum value, or relation target (e.g., a plan name or category). Backlinks instantly reveal all rows/pages that reference it via relation properties — no need to hunt for the parent database.
  • Finding references: You found a page and want to know what other pages mention or link to it.
  • Reverse lookups: Instead of querying every database to find rows pointing to a page, use backlinks on the target page to get them directly.

Example — finding who uses a specific plan:

# BAD: 15 API calls — search, open empty pages, trace parents, find database, query
vibe-notion search "Enterprise Plan" ...
vibe-notion page get <plan-page-id> ...  # empty
vibe-notion block get <plan-page-id> ...  # find parent
# ... many more calls to discover the database

# GOOD: 2-3 API calls — search, then backlinks on the target
vibe-notion search "Enterprise Plan" ...
vibe-notion page get <plan-page-id> --backlinks --pretty
# → backlinks immediately show all people/rows linked to this plan

Pagination

Commands that return lists support pagination via has_more, next_cursor fields:

  • block children: Cursor-based. Pass next_cursor value from previous response as --start-cursor.
  • search: Offset-based. Pass next_cursor value (a number) as --start-cursor.
  • database query: Use --limit to control page size. has_more indicates more results exist, but the private API does not support cursor-based pagination — increase --limit to fetch more rows.

Troubleshooting

Authentication failures

If auto-extraction fails (e.g., Notion desktop app is not installed or not logged in), run the extract command manually for debug output:

vibe-notion auth extract --debug

This shows the Notion directory path and extraction steps to help diagnose the issue.

Database locked during extraction

If auth extract fails with:

{"error":"No token_v2 found. Make sure Notion desktop app is installed and logged in."}

And the Notion desktop app is installed and logged in, the cookie database may be locked by the running Notion app. Tell the user to quit the Notion desktop app completely, then retry the command. Once credentials are extracted, the user can reopen Notion.

vibe-notion: command not found

The vibe-notion package is not installed. Run it directly using a package runner. Ask the user which one to use:

npx -y vibe-notion ...
bunx vibe-notion ...
pnpm dlx vibe-notion ...

If you already know the user's preferred package runner, use it directly instead of asking.

Limitations

  • Auto-extraction supports macOS and Linux. Windows DPAPI decryption is not yet supported.
  • token_v2 uses the unofficial internal API and may break if Notion changes it.
  • This is a private/unofficial API and is not supported by Notion.

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。