Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计异常

agent-notionAgent Notion 搜索

Agent Skill

用于处理 Notion 页面、数据库、工作区内容和结构化记录。它适合让 Agent 查询知识库、整理页面内容、创建记录或把外部信息同步到 Notion。使用时需要确认集成是否已被授权到目标页面或数据库,并区分读取、追加和覆盖更新;涉及批量写入或修改数据库属性时,应先核对字段名称、属性类型和目标页面。

总安装

576

周安装

24

GitHub Stars

1

下载量

192
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:agent-notion(Agent Notion 搜索)
来源仓库:https://github.com/shhac/agent-notion
仓库路径:skills/agent-notion
安装命令:
npx skills add https://github.com/shhac/agent-notion --skill agent-notion
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/shhac/agent-notion --skill agent-notion

简介

agent-notion 用于处理 Notion 页面、数据库和工作区内容,支持查询、创建和同步结构化记录。

  • 适用于 Codex、Claude、Cursor、Gemini CLI 中需要将外部信息整合到 Notion 或从知识库提取内容的场景。
  • 通过 GitHub 安装,支持 OAuth 和内部 token 认证,输出为 JSON 格式。
  • 安装前需确认权限范围、维护状态,以及是否会触发网络请求或 API 调用。
  • 建议在使用时核对字段名称、属性类型和目标页面,避免写入失败或数据错位。

SKILL.md

Notion automation with agent-notion

agent-notion is a CLI binary installed on $PATH. Invoke it directly (e.g. agent-notion search "Project Plan").

All output is JSON to stdout. Errors go to stderr as {"error": "..."} with non-zero exit.

Quick start (auth)

Option A: OAuth (recommended for full access)

agent-notion auth setup-oauth --client-id <id> --client-secret <secret>
agent-notion auth login                        # opens browser for OAuth flow
agent-notion auth status

Option B: Internal integration token

agent-notion auth login --token ntn_...
agent-notion auth status

Option C: Desktop session (for v3 features)

agent-notion auth import-desktop                   # macOS only — reads token from Notion Desktop app

Required for v3 commands: export, page backlinks, page history, activity log, inline comments, AI chat/models.

Multiple workspaces are supported:

agent-notion auth login --alias work
agent-notion auth workspace list
agent-notion auth workspace switch <alias>
agent-notion auth logout [--all]
agent-notion auth workspace remove <alias>

Searching

Important: Notion search is title-only. It does not search page content, comments, or property values.

agent-notion search query "meeting notes"
agent-notion search query "Q1 Plan" --filter database
agent-notion search query "design doc" --filter page --limit 5

Databases

agent-notion database list                                          # uses search API
agent-notion database get <database-id>                             # full metadata + property definitions
agent-notion database schema <database-id>                          # compact schema for LLMs (types, options)
agent-notion database query <database-id>                           # all rows
agent-notion database query <id> --filter '{"property":"Status","select":{"equals":"Done"}}'
agent-notion database query <id> --sort '[{"property":"Name","direction":"ascending"}]'

Use database schema to discover property names, types, and valid select/status options before building filters.

Pages

agent-notion page get <page-id>                                     # properties only
agent-notion page get <page-id> --content                           # properties + markdown content
agent-notion page get <page-id> --raw-content                       # properties + structured block objects
agent-notion page create --parent <id> --title "New Page"           # auto-detects database vs page parent
agent-notion page create --parent <db-id> --title "Task" --properties '{"Status":"In Progress","Priority":"High"}'
agent-notion page create --parent <id> --title "Notes" --icon "📝"
agent-notion page update <page-id> --title "Updated Title"
agent-notion page update <page-id> --properties '{"Status":"Done"}' --icon "✅"
agent-notion page archive <page-id>

Property values in --properties are auto-converted: strings become select values, numbers become number properties, booleans become checkboxes, arrays become multi-select. Pass Notion API format for complex types.

Blocks (page content)

agent-notion block list <page-id>                                   # markdown (default)
agent-notion block list <page-id> --raw                             # structured block objects with IDs
agent-notion block append <page-id> --content "## New Section\n\nParagraph text"
agent-notion block append <page-id> --blocks '[{"type":"paragraph","paragraph":{"rich_text":[{"text":{"content":"Hello"}}]}}]'
agent-notion block update <block-id> --content "New text"           # edit a single block's content
agent-notion block delete <block-id>                                # remove a block
agent-notion block move <block-id> --after <other-block-id>               # reorder (v3)
agent-notion block move <block-id> --parent <callout-id>                 # move into container (v3)
agent-notion block replace <page-id> --content "# Fresh\n\nAll new content"  # replace all page content

Markdown conversion supports: headings, lists, todos, code fences, blockquotes, dividers, and paragraphs.

Use block list --raw to get block IDs for update and delete. Use block replace to swap all content at once.

Comments

agent-notion comment list <page-id>
agent-notion comment page <page-id> "This looks good!"
agent-notion comment inline <block-id> "Great point!" --text "target phrase"           # v3
agent-notion comment inline <block-id> "Second one" --text "the" --occurrence 2        # v3

Inline comments are anchored to specific text within a block and require a v3 desktop session.

v3 Features (requires auth import-desktop)

These commands use Notion's internal API and require a desktop session token.

Export

agent-notion export page <page-id>                             # export as markdown zip
agent-notion export page <page-id> --format html --recursive   # export page tree as HTML
agent-notion export workspace                                  # export entire workspace
agent-notion export workspace --output my-backup.zip           # custom output path

Options: --format markdown|html, --recursive (page only), --output <path>, --timeout <seconds>

Backlinks

agent-notion page backlinks <page-id>                          # pages linking to this page

Returns {backlinks: [{blockId, pageId, pageTitle}], total}. Deduplicated by page.

History

agent-notion page history <page-id>                            # recent version snapshots
agent-notion page history <page-id> --limit 50                 # fetch more

Returns {snapshots: [{id, version, lastVersion, timestamp, authors}], total}.

Activity

agent-notion activity log                                      # workspace-wide activity
agent-notion activity log --page <page-id>                     # scoped to a page
agent-notion activity log --limit 50                           # fetch more entries

Returns {activities: [{id, type, pageId, pageTitle, authors, editTypes, startTime, endTime}], total}.

Notion AI (requires auth import-desktop)

agent-notion ai model list                                         # available models (name, family, tier)
agent-notion ai model list --raw                                   # full model objects with codenames
agent-notion ai chat list [--limit 10]                             # recent chat threads
agent-notion ai chat send "Summarize my recent projects"           # new conversation
agent-notion ai chat send "Tell me more" --thread <id>             # continue thread
agent-notion ai chat send "Explain this page" --page <page-id>    # with page context
agent-notion ai chat send "Quick question" --stream                # stream to stderr
agent-notion ai chat send "Hello" --model "GPT-5.2"               # specific model
agent-notion ai chat mark-read <thread-id>                         # mark thread as read

Model resolution: --model flag > config ai.defaultModel > API default. Accepts codenames or display names.

With --stream, AI response text streams to stderr incrementally. JSON result always goes to stdout.

Users

agent-notion user list
agent-notion user me                                                # current authenticated user/bot

Truncation

Long text fields (description, body, content) are truncated to ~200 characters by default. A companion *Length field (e.g. descriptionLength) always shows the full size.

To see full content, use --expand or --full:

agent-notion --full page get <page-id>                              # expand all fields
agent-notion --expand description database get <id>                 # expand specific field
agent-notion --expand description,content page get <id> --content   # expand multiple

These are global flags — place them before the command or after it.

IDs

All commands accept Notion UUIDs (with or without dashes):

  • aaaaaaaa-1111-2222-3333-444444444444
  • aaaaaaaa111122223333444444444444

Pagination

List commands return {"items": [...], "pagination"?: {"hasMore": true, "nextCursor": "..."}}.

Use --limit <n> (max 100) and --cursor <token> to paginate.

Per-command usage docs

Every command group has a usage subcommand with detailed, LLM-optimized docs:

agent-notion usage                # top-level overview (~1000 tokens)
agent-notion search usage         # search command details
agent-notion database usage       # database commands
agent-notion page usage           # page commands
agent-notion block usage          # block commands
agent-notion comment usage        # comment commands (page + inline)
agent-notion export usage         # export commands (v3)
agent-notion activity usage       # activity log (v3)
agent-notion ai usage             # AI chat and models (v3)
agent-notion user usage           # user commands
agent-notion auth usage           # auth + workspace management
agent-notion config usage         # CLI settings keys, defaults, validation

Use agent-notion <command> usage when you need deep detail on a specific domain before acting.

Configuration

agent-notion config list-keys                                       # all keys with defaults
agent-notion config get [key]                                       # current value(s)
agent-notion config set truncation.maxLength 500                    # increase truncation limit
agent-notion config set pagination.defaultPageSize 20               # change default page size
agent-notion config set ai.defaultModel <codename>                  # default AI model
agent-notion config reset [key]                                     # restore defaults

References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

39.4%
按下载量换算76

Claude

27.24%
按下载量换算52

Cursor

18.59%
按下载量换算36

Gemini CLI

8.93%
按下载量换算17

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills