Setup
On first use, read setup.md to establish token access, workspace scope, and safe write defaults.
When to Use
User wants to treat a Notion database as a calendar, editorial plan, launch schedule, content calendar, or dated task board.
Agent handles schema discovery, time-window queries, page creation, rescheduling, and status updates for pages that appear in Notion calendar views.
Requirements
- -
NOTION_API_KEY for official API access. - A Notion integration shared with the target database.
- Optional community CLI:
notion from FroeMic/notion-cli for quick search and CRUD shortcuts.
Architecture
Memory lives in ~/notion-calendar/. See memory-template.md for structure.
CODEBLOCK0
Quick Reference
| Topic | File |
|---|
| Setup and first-run behavior | INLINECODE5 |
| Memory structure |
memory-template.md |
| Calendar source mapping |
calendars.md |
| Reusable payload templates |
templates.md |
| Optional CLI patterns |
cli-patterns.md |
| Calendar database schema guidance |
calendar-schema.md |
| Query, create, and reschedule flows |
query-playbook.md |
| Common failures and fixes |
troubleshooting.md |
Core Rules
1. Treat Notion Calendar as Date-Driven Data Sources
- - The operational unit is a Notion database or data source with at least one date property.
- Do not promise direct control of Google Calendar or native Notion Calendar app settings through this skill.
2. Discover Schema Before Writing
- - Retrieve the database container, then resolve the active
data_source_id and property names before create or update operations. - Cache title, date, status, assignee, and timezone-relevant fields in
calendars.md after user approval.
3. Use Explicit Time Windows
- - Convert requests such as "next week" or "this quarter" into bounded ISO dates with a declared timezone.
- Query only the requested window first, then widen if the result set is empty or clearly incomplete.
4. Prefer the CLI for Fast Reads, Fallback to Official HTTP for Modern Gaps
- - If
notion CLI is installed and the task is basic search, read, or simple page CRUD, use it for speed. - For
2025-09-03 data source workflows, schema migration, or any unsupported command, use direct requests to api.notion.com.
5. Read Before Write and Verify After
- - Before create, reschedule, archive, or status changes, fetch matching rows in the exact target window.
- After a write, read back the changed page and report the final title, date, status, and URL.
6. Keep Calendar Semantics Explicit
- - Confirm whether a row is all-day, single timestamp, or start/end range before writing date values.
- Recurrence is not a first-class calendar series here; if the user wants repeating items, create a template or batch future pages intentionally.
7. Escalate Ambiguity Instead of Guessing
- - If multiple pages share the same title, ask for the page URL, page ID, or the exact date window.
- Never archive or move rows on a low-confidence title match.
Common Traps
- - Assuming every database ID is enough on its own -> newer Notion versions may require
data_source_id. - Writing to the first property named "Date" without schema review -> wrong calendar column updated.
- Treating Notion rows as true recurring events -> repeat behavior must be modeled, not assumed.
- Rescheduling by title only -> duplicate launch plans or editorial items get changed accidentally.
- Querying wide open ranges by default -> noisy results and missed verification.
External Endpoints
| Endpoint | Data Sent | Purpose |
|---|
| INLINECODE19 | Search text, filters, pagination cursor | Find candidate databases, data sources, or pages |
| INLINECODE20 |
Database ID | Retrieve container metadata and child data sources |
|
https://api.notion.com/v1/data_sources/* | Data source IDs, filters, sorts, property schema updates | Query rows and inspect or update calendar schema |
|
https://api.notion.com/v1/pages/* | Page properties and content updates | Create pages, reschedule items, update status |
No other data is sent externally.
Security & Privacy
Data that leaves your machine:
- - Search text, page properties, dates, and page content sent to Notion through
api.notion.com.
Data that stays local:
- - Workspace context, property mappings, and safe defaults in
~/notion-calendar/.
This skill does NOT:
- - Store API keys in skill memory files.
- Access undeclared third-party calendar APIs.
- Claim a write succeeded without a read-back check.
- Modify files outside
~/notion-calendar/ for this workflow.
Scope
This skill ONLY:
- - Works with Notion databases, data sources, and pages used as calendar items.
- Uses the optional
notion CLI when available for compatible operations. - Falls back to direct Notion API calls when the CLI lags the current API shape.
This skill NEVER:
- - Configure Notion Calendar app preferences or account settings.
- Synchronize Google Calendar accounts on the user's behalf.
- Hide destructive changes behind implicit matches.
Trust
By using this skill, calendar-related workspace data is sent to Notion.
Only install if you trust Notion with page titles, dates, status fields, and related planning metadata.
Related Skills
Install with
clawhub install <slug> if user confirms:
- -
api - general REST API request patterns and debugging. - INLINECODE29 - precise date math, ranges, and timezone interpretation.
- INLINECODE30 - broader knowledge and workspace organization patterns.
- INLINECODE31 - execution systems around tasks and schedules.
- INLINECODE32 - planning logic when requests become multi-step scheduling work.
Feedback
- - If useful: INLINECODE33
- Stay updated: INLINECODE34
技能名称: Notion Calendar
详细描述:
设置
首次使用时,请阅读 setup.md 以建立令牌访问、工作区范围和安全的写入默认值。
使用时机
用户希望将 Notion 数据库用作日历、编辑计划、发布日程、内容日历或带日期的任务看板。
代理负责处理出现在 Notion 日历视图中的页面的模式发现、时间窗口查询、页面创建、重新排期和状态更新。
要求
- - NOTIONAPIKEY 用于官方 API 访问。
- 与目标数据库共享的 Notion 集成。
- 可选社区 CLI:来自 FroeMic/notion-cli 的 notion,用于快速搜索和 CRUD 快捷操作。
架构
记忆存储在 ~/notion-calendar/ 中。结构请参见 memory-template.md。
text
~/notion-calendar/
|-- memory.md # 状态、时区默认值和工作区上下文
|-- calendars.md # 数据库和数据源 ID 以及属性映射
|-- templates.md # 可复用的页面负载模式
-- safety-log.md # 模糊匹配、破坏性确认和回滚
快速参考
| 主题 | 文件 |
|---|
| 设置和首次运行行为 | setup.md |
| 记忆结构 |
memory-template.md |
| 日历源映射 | calendars.md |
| 可复用的负载模板 | templates.md |
| 可选 CLI 模式 | cli-patterns.md |
| 日历数据库模式指南 | calendar-schema.md |
| 查询、创建和重新排期流程 | query-playbook.md |
| 常见故障与修复 | troubleshooting.md |
核心规则
1. 将 Notion 日历视为日期驱动的数据源
- - 操作单元是至少包含一个日期属性的 Notion 数据库或数据源。
- 不要通过此技能承诺直接控制 Google 日历或原生 Notion 日历应用设置。
2. 在写入前发现模式
- - 检索数据库容器,然后在创建或更新操作前解析活动的 datasourceid 和属性名称。
- 在用户批准后,将标题、日期、状态、负责人和时区相关字段缓存到 calendars.md 中。
3. 使用明确的时间窗口
- - 将“下周”或“本季度”等请求转换为带有声明时区的有界 ISO 日期。
- 首先仅查询请求的窗口,如果结果集为空或明显不完整,则扩大范围。
4. 快速读取优先使用 CLI,现代缺口回退到官方 HTTP
- - 如果安装了 notion CLI 且任务是基本搜索、读取或简单页面 CRUD,则使用它以获得速度。
- 对于 2025-09-03 数据源工作流、模式迁移或任何不支持的命令,使用对 api.notion.com 的直接请求。
5. 先读后写,写后验证
- - 在创建、重新排期、归档或状态更改之前,在确切的目标窗口中获取匹配的行。
- 写入后,重新读取更改后的页面,并报告最终的标题、日期、状态和 URL。
6. 保持日历语义明确
- - 在写入日期值之前,确认一行是全天、单个时间戳还是开始/结束范围。
- 此处重复事件不是一流的日历系列;如果用户想要重复项目,请有意创建模板或批量生成未来页面。
7. 升级模糊性而非猜测
- - 如果多个页面共享相同标题,请询问页面 URL、页面 ID 或确切的日期窗口。
- 切勿在低置信度的标题匹配上归档或移动行。
常见陷阱
- - 假设每个数据库 ID 本身足够 -> 较新的 Notion 版本可能需要 datasourceid。
- 未经模式审查就写入第一个名为“日期”的属性 -> 更新了错误的日历列。
- 将 Notion 行视为真正的重复事件 -> 必须建模重复行为,而非假设。
- 仅按标题重新排期 -> 重复的发布计划或编辑项目被意外更改。
- 默认查询宽泛的开放范围 -> 结果嘈杂且错过验证。
外部端点
| 端点 | 发送的数据 | 用途 |
|---|
| https://api.notion.com/v1/search | 搜索文本、过滤器、分页游标 | 查找候选数据库、数据源或页面 |
| https://api.notion.com/v1/databases/* |
数据库 ID | 检索容器元数据和子数据源 |
| https://api.notion.com/v1/data_sources/* | 数据源 ID、过滤器、排序、属性模式更新 | 查询行并检查或更新日历模式 |
| https://api.notion.com/v1/pages/* | 页面属性和内容更新 | 创建页面、重新排期项目、更新状态 |
没有其他数据被发送到外部。
安全与隐私
离开您机器的数据:
- - 通过 api.notion.com 发送到 Notion 的搜索文本、页面属性、日期和页面内容。
保留在本地的数据:
- - ~/notion-calendar/ 中的工作区上下文、属性映射和安全默认值。
此技能不会:
- - 在技能记忆文件中存储 API 密钥。
- 访问未声明的第三方日历 API。
- 未经回读检查就声称写入成功。
- 为此工作流修改 ~/notion-calendar/ 之外的文件。
范围
此技能仅:
- - 与用作日历项目的 Notion 数据库、数据源和页面配合使用。
- 在可用时使用可选的 notion CLI 进行兼容操作。
- 当 CLI 落后于当前 API 形态时,回退到直接 Notion API 调用。
此技能从不:
- - 配置 Notion 日历应用偏好或账户设置。
- 代表用户同步 Google 日历账户。
- 在隐式匹配背后隐藏破坏性更改。
信任
通过使用此技能,与日历相关的工作区数据将被发送到 Notion。
仅当您信任 Notion 处理页面标题、日期、状态字段和相关规划元数据时才安装。
相关技能
如果用户确认,使用 clawhub install
安装:
- - api - 通用 REST API 请求模式和调试。
- dates - 精确的日期计算、范围和时区解释。
- pkm - 更广泛的知识和工作区组织模式。
- productivity - 围绕任务和日程的执行系统。
- schedule - 当请求变为多步骤排期工作时的规划逻辑。
反馈
- - 如果有用:clawhub star notion-calendar
- 保持更新:clawhub sync