360 Secure SkillHub
360 安全技能中心

Notion Skill

该 Skill 以声明式文档说明如何使用本地 notion-cli 和 Notion API 读取、创建、追加页面,查看、查询、更新数据库行,并在确认后比较和应用数据库结构变更。需要配置 NOTION_API_KEY,并手动将集成共享给目标页面或数据库。

xiiang0529
xiiang0529
热度 59.95
最近更新 2026-07-09 14:13:05
分类:知识依赖:代码执行 / 第三方 API应用场景:笔记整理 / API 集成 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add notion-skill
Metadata
name
notion
description
Work with Notion pages and databases via the official Notion API.
homepage
https://developers.notion.com
metadata
{"clawdbot":{"emoji":"🧠","requires":{"env":["NOTION_API_KEY"]},"install":[{"id":"node","kind":"note","label":"Requires notion-cli (Node.js) or notion-cli-py (Python). See docs below."}]}}

Notion

This skill lets the agent work with Notion pages and databases using the official Notion API.

The skill is declarative: it documents safe, recommended operations and assumes a local CLI (notion-cli) that actually performs API calls.

Authentication

export NOTION_API_KEY=secret_xxx

Share the integration with the pages or databases you want to access. Unshared content is invisible to the API.

Profiles (personal / work)

You may define multiple profiles (e.g. personal, work) via env or config.

Default profile: personal

Override via:

export NOTION_PROFILE=work

Pages

Read page:

notion-cli page get <page_id>

Append blocks:

notion-cli block append <page_id> --markdown "..."

Prefer appending over rewriting content.

Create page:

notion-cli page create --parent <page_id> --title "..."

Databases

Inspect schema:

notion-cli db get <database_id>

Query database:

notion-cli db query <database_id> --filter <json> --sort <json>

Create row:

notion-cli page create --database <database_id> --props <json>

Update row:

notion-cli page update <page_id> --props <json>

Schema changes (advanced)

Always inspect diffs before applying schema changes.

Never modify database schema without explicit confirmation.

Recommended flow:

notion-cli db schema diff <database_id> --desired <json>
notion-cli db schema apply <database_id> --desired <json>

Safety notes

  • Notion API is rate-limited; batch carefully.
  • Prefer append and updates over destructive operations.
  • IDs are opaque; store them explicitly, do not infer from URLs.