← 返回 Skills 市场
534422530

Notion助手

作者 534422530 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
47
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install laosi-notion
功能描述
Notion API助手 - 创建和管理Notion页面、数据库,支持笔记和知识管理。
使用说明 (SKILL.md)

Notion Helper - Notion助手

激活词: Notion / 笔记管理 / 知识库

安装

pip install notion-client

获取API密钥

  1. 访问 https://www.notion.so/my-integrations
  2. 创建新集成
  3. 复制API密钥
  4. 分享数据库给集成

Python实现

from notion_client import AsyncClient
import asyncio

class NotionHelper:
    def __init__(self, token: str):
        self.client = AsyncClient(auth=token)
    
    async def create_page(self, parent_id: str, title: str, content: str = ""):
        await self.client.pages.create(
            parent={"database_id": parent_id},
            properties={
                "title": {
                    "title": [{"text": {"content": title}}]
                }
            },
            children=[{
                "object": "block",
                "type": "paragraph",
                "paragraph": {
                    "rich_text": [{"type": "text", "text": {"content": content}}]
                }
            }]
        )
    
    async def query_database(self, db_id: str, filter_props: dict = None):
        params = {"database_id": db_id}
        if filter_props:
            params["filter"] = filter_props
        return await self.client.databases.query(**params)
    
    async def update_page(self, page_id: str, properties: dict):
        await self.client.pages.update(page_id, properties=properties)
    
    async def get_page(self, page_id: str):
        return await self.client.pages.retrieve(page_id)
    
    async def search(self, query: str):
        return await self.client.search(query)

使用示例

async def main():
    helper = NotionHelper("secret_xxx")
    
    # 创建页面
    await helper.create_page(
        parent_id="database_id",
        title="AI学习笔记",
        content="今天学习了机器学习..."
    )
    
    # 搜索页面
    results = await helper.search("AI")
    for page in results['results']:
        print(page['title'])
    
    # 查询数据库
    pages = await helper.query_database("database_id")
    for page in pages['results']:
        print(page['properties']['title']['title'][0]['text']['content'])

asyncio.run(main())

数据类型

类型 说明
title 标题
rich_text 文本
number 数字
checkbox 复选框
select 单选
multi_select 多选
date 日期
url 链接
email 邮箱
phone_number 电话

使用场景

  1. 知识库管理
  2. 任务跟踪
  3. 笔记整理
  4. 项目管理
安全使用建议
This skill appears to be what it says: instructions and examples only interact with the Notion API. Before installing or using it: 1) Install 'notion-client' in a virtualenv and verify the package/version on PyPI. 2) Create a Notion integration with the minimum scopes needed and share only the relevant database(s). 3) Do not paste your integration token into public chat; prefer setting NOTION_TOKEN (or another env var) and passing it to the code at runtime. 4) If you plan to let an automated agent use this skill, restrict the token's permissions and monitor activity in your Notion workspace.
功能分析
Type: OpenClaw Skill Name: laosi-notion Version: 1.0.0 The skill bundle provides a standard and transparent implementation for interacting with the Notion API using the official 'notion-client' library. The Python code in SKILL.md contains basic CRUD operations (create, query, update, search) that align perfectly with the stated purpose of a Notion helper, with no evidence of data exfiltration, malicious execution, or prompt injection.
能力评估
Purpose & Capability
Name and description describe Notion API operations (create/query/update/search). The SKILL.md provides pip install instructions and Python examples using notion-client and a Notion integration token — these are coherent with the stated purpose.
Instruction Scope
Runtime instructions and example code are limited to interacting with the Notion API and do not instruct reading unrelated files, system config, or sending data to external endpoints other than Notion. The examples do show passing an integration token directly to the helper (inline 'secret_xxx'), which is a documentation choice rather than scope creep.
Install Mechanism
This is an instruction-only skill with no install spec; SKILL.md recommends 'pip install notion-client' (a public PyPI package). This is a common, low-risk installation route, but users should install Python packages in a virtual environment and verify the package source/version before installing.
Credentials
The skill reasonably requires a Notion integration token, and does not request unrelated credentials. However, the registry metadata lists no required env vars while the examples expect a token value; the author should declare a primary credential (e.g., NOTION_TOKEN). Users should avoid pasting tokens into chat and prefer environment variables or secure secrets storage with least privilege.
Persistence & Privilege
The skill does not request persistent privileges (always:false), does not modify other skills or system-wide settings, and is user-invocable. Autonomous invocation is permitted by platform default but is not combined with any broad or unexplained privileges here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install laosi-notion
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /laosi-notion 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of Notion Helper: - Provides async Python class for interacting with the Notion API - Supports creating, querying, updating, and retrieving Notion pages and databases - Includes examples for note-taking, database querying, and knowledge management - Simple setup instructions for API key and `notion-client` dependency
元数据
Slug laosi-notion
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Notion助手 是什么?

Notion API助手 - 创建和管理Notion页面、数据库,支持笔记和知识管理。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 47 次。

如何安装 Notion助手?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install laosi-notion」即可一键安装,无需额外配置。

Notion助手 是免费的吗?

是的,Notion助手 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Notion助手 支持哪些平台?

Notion助手 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Notion助手?

由 534422530(@534422530)开发并维护,当前版本 v1.0.0。

💬 留言讨论