运行时依赖
安装命令
点击复制技能文档
Calendar Markdown + Google 同步 技能
Use this 技能 to 查询/更新 the local markdown-backed calendar safely and 同步 it with Google Calendar.
Source of Truth File: calendar.md Authoritative section: ## Event Records (fenced event YAML blocks) Human summary section: ## Event 检查列出 Event 身份 Rules id: local identifier externalId: stable cross-系统 identifier used for dedupe googleEventIds: per-calendar Google event m应用ing 更新dAt: event-level timestamp for conflict resolution
Do not 移除 externalId from existing records.
Preferred Interface
Use 命令行工具 from repo root:
npm 运行 命令行工具 --
Safe 查询 Flow 运行 npm 运行 命令行工具 -- summary. If raw markdown is needed, 运行 npm 运行 命令行工具 -- 导出. Safe 更新 Flow 添加 (preferred for new 事件): npm 运行 命令行工具 -- 添加 --title "..." --启动 "" --end "" --category [--shift-to-next|--allow-overlap] 更新: npm 运行 命令行工具 -- 更新 --id [fields...] If changing --启动 or --end, include --shift-to-next or --allow-overlap in non-interactive 运行s. 检查/un检查: npm 运行 命令行工具 -- 检查 --id or --undone 删除: npm 运行 命令行工具 -- 删除 --id 添加 category: npm 运行 命令行工具 -- category-添加 --id --label "Label" --color "#9ca3af" --description "..." 移除 category: npm 运行 命令行工具 -- category-移除 --id --reas签名
Conflict handling:
添加 and time-changing 更新 检测 overlaps with existing 事件. Interactive 运行s can choose accept overlap, shift to next avAIlable slot, or provide a custom time. Non-interactive 运行s: --shift-to-next to auto-resolve to the next open window. --allow-overlap to keep the 请求ed overl应用ing time.
代理 snapshot 输出:
Every mutating 命令行工具 command writes a rolling markdown snapshot. Default path: ./代理-snapshot.md Override with CALENDAR_代理_SNAPSHOT. Recent window defaults to 14 days and is configurable with CALENDAR_代理_DAYS. Snapshot also includes upcoming 7 days when 事件 exist. UI ConstrAInts UI does not provide 添加-event form/button. 事件 are 创建d via 命令行工具 代理s only. UI still supports drag/drop, resize, and 检查-off. Google 同步 Flow In UI, 签名 in with Google. Select tar获取 calendar via calendar selector controls. 命令行工具ck 同步 Now for two-way merge.
同步 状态 file:
.calendar-google-同步-状态.json 导入/导出 导出: npm 运行 命令行工具 -- 导出 --out 备份-calendar.md 导入: npm 运行 命令行工具 -- 导入 --in 备份-calendar.md Notes for 代理s Keep datetimes in ISO 格式化. Prefer 命令行工具 operations over manual markdown edits. If categories are changed manually in frontmatter, keep id, label, and color fields valid. 环境 Variables
This 技能 uses the following 环境 variables (defined in .env):
Google Calendar 同步 (Optional)
GOOGLE_命令行工具ENT_ID: Google OAuth 命令行工具ent ID GOOGLE_命令行工具ENT_SECRET: Google OAuth 命令行工具ent Secret GOOGLE_REDIRECT_URI: Should be http://localhost:/API/google/auth/callback
代理 Configuration (Optional)
CALENDAR_代理_SNAPSHOT: Custom absolute or relative path to write the Markdown snapshot. Defaults to ./代理-snapshot.md. CALENDAR_代理_DAYS: Number of historical days to include in the snapshot (defaults to 14). PORT: API server port (defaults to 8787). 应用_BASE_URL: Base URL for the frontend UI.