← 返回 Skills 市场
netanel-abergel

Calendar Setup

作者 Netanel Abergel · GitHub ↗ · v1.1.1 · MIT-0
cross-platform ⚠ suspicious
132
总下载
1
收藏
1
当前安装
3
版本数
在 OpenClaw 中安装
/install calendar-setup
功能描述
Step-by-step wizard for connecting an owner's Google Calendar to their OpenClaw PA agent, including granting write permissions. Use when: setting up calendar...
使用说明 (SKILL.md)

Calendar Setup Skill

Minimum Model

Any model that can follow numbered steps.


Key Concept

Two accounts are involved:

The agent needs access to the owner's calendar. These are separate Google accounts. The OpenClaw dashboard "calendar connected" status reflects the agent's own calendar — not the owner's. Verify write access explicitly.


Step 1 — Owner Shares Calendar

The owner does this in Google Calendar (not the agent):

  1. Open calendar.google.com as the owner
  2. Find the primary calendar in the left sidebar (usually their name)
  3. Click the three-dot menu → Settings and sharing
  4. Under Share with specific people → click + Add people
  5. Enter the agent email
  6. Set permission to "Make changes to events" — not "See all event details" (that is read-only)
  7. Click Send

✅ Done. The agent receives an email confirmation — no action needed from the agent side yet.

If owner can't find the calendar: Scroll down in the sidebar to "Other calendars".

If sharing is blocked: The owner's organization may restrict external sharing. They need to ask their IT admin to allow it.


Step 2 — Agent Authenticates

The agent runs:

# Add the owner's account to gog
gog auth add [email protected] --services gmail,calendar,drive,contacts

# Verify it was added
gog auth list

Expected output of gog auth list:

[email protected]  [gmail, calendar, drive, contacts]

If re-authenticating after a permission change or expired token:

gog auth remove [email protected]
gog auth add [email protected] --services gmail,calendar,drive,contacts

If gog is not found: Check PATH or reinstall via your OpenClaw distribution.

If OAuth fails with "access blocked": Owner must allow access in Google Account → Security → Third-party apps.


Step 3 — Test Write Access

# Generate timestamps (works on Linux and macOS)
START=$(date -u -d '+1 hour' +%Y-%m-%dT%H:%M:%SZ 2>/dev/null \
  || date -u -v+1H +%Y-%m-%dT%H:%M:%SZ)
END=$(date -u -d '+2 hours' +%Y-%m-%dT%H:%M:%SZ 2>/dev/null \
  || date -u -v+2H +%Y-%m-%dT%H:%M:%SZ)

# Create a test event in the owner's calendar
[email protected] gog calendar create primary \
  --summary "PA Setup Test — delete me" \
  --start "$START" \
  --end "$END"

Check the owner's Google Calendar. The test event should appear within 30 seconds.

Delete it after verifying:

# Use EVENT_ID from the output of the create command above
[email protected] gog calendar delete primary EVENT_ID

Common Issues and Fixes

Dashboard shows "connected" but agent can't write

Cause: Dashboard reflects the agent's own calendar, not the owner's.

Fix:

  1. Confirm owner shared their calendar with the agent email (Step 1)
  2. Confirm agent ran gog auth add for the owner's account (Step 2)
  3. Always use [email protected] in all commands

"Insufficient permissions" error

Cause: Calendar was shared with read-only permission.

Fix: Owner goes back to Step 1 and changes the permission to "Make changes to events".


"Token expired" or authentication failure

gog auth remove [email protected]
gog auth add [email protected] --services gmail,calendar,drive,contacts

Multiple calendars (work + personal)

# Add both accounts
gog auth add [email protected] --services calendar
gog auth add [email protected] --services calendar

# See what calendars each account has
[email protected] gog calendar list
[email protected] gog calendar list

# Use the specific calendar ID (from list output) instead of "primary"
[email protected] gog calendar create CALENDAR_ID \
  --summary "Meeting" \
  --start "2026-04-02T10:00:00+00:00" \
  --end "2026-04-02T11:00:00+00:00"

macOS date command

# Linux: use -d
date -u -d '+1 hour' +%Y-%m-%dT%H:%M:%SZ

# macOS: use -v
date -u -v+1H +%Y-%m-%dT%H:%M:%SZ

Useful Commands

# List all authenticated accounts
gog auth list

# List owner's calendars
[email protected] gog calendar list

# List events (next 7 days)
[email protected] gog calendar events primary \
  --from $(date -u +%Y-%m-%dT%H:%M:%SZ) \
  --to $(date -u -d '+7 days' +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -u -v+7d +%Y-%m-%dT%H:%M:%SZ)

# Create event with attendee
[email protected] gog calendar create primary \
  --summary "Meeting title" \
  --start "2026-04-02T10:00:00+00:00" \
  --end "2026-04-02T11:00:00+00:00" \
  --attendees "[email protected]"

# Delete event
[email protected] gog calendar delete primary EVENT_ID

# Remove authenticated account
gog auth remove [email protected]

Heleni-specific: Direct API Workaround (when gog CLI auth fails)

gog auth login requires a browser — doesn't work on a server. Use the pre-existing credentials in /opt/ocana/openclaw/.gog/credentials.json instead.

# 1. Read client_id, client_secret, refresh_token from the file (owner account)
# Accounts: "agent" ([email protected]), "owner" ([email protected])

# 2. Refresh access token
curl -s -X POST https://oauth2.googleapis.com/token \
  -d "client_id=\x3Cclient_id>" \
  -d "client_secret=\x3Cclient_secret>" \
  -d "refresh_token=\x3Crefresh_token>" \
  -d "grant_type=refresh_token"
# → get access_token from response

# 3. Call Calendar API directly
curl -s "https://www.googleapis.com/calendar/v3/calendars/netanelab%40monday.com/events?timeMin=\x3CISO>&timeMax=\x3CISO>&singleEvents=true&orderBy=startTime&maxResults=10" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

# 4. List all calendars
curl -s "https://www.googleapis.com/calendar/v3/users/me/calendarList" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Note: ~/.config/gws/credentials.json (gog default path) has a stale/broken token. Always use /opt/ocana/openclaw/.gog/credentials.json.


Verification Checklist

  • Owner shared calendar with agent email
  • Permission is "Make changes to events" (not read-only)
  • Agent ran gog auth add for owner's account
  • gog auth list shows owner's account with calendar service
  • Test event created successfully in owner's calendar
  • Test event deleted after verification
  • All calendar commands use [email protected]

Cost Tips

  • Cheap: This is a one-time setup — very low ongoing cost
  • Small model OK: All steps are procedural — any model can follow them
  • Avoid: Don't re-authenticate repeatedly — tokens last a long time if not revoked
  • Batch: Add all needed services in one gog auth add call (gmail,calendar,drive,contacts) instead of separate calls

Email & Workspace Orientation (Merged from openclaw-email-orientation skill)

The Core Concept: Two Separate Accounts

Account
Owner The human's Google account (e.g. [email protected])
Agent The PA's own Google account (e.g. [email protected])

These are separate. Having an agent email does NOT automatically give access to the owner's email or calendar. Owner must explicitly share, and agent must explicitly authenticate.

Key Files

File Purpose
~/.openclaw/.gog/credentials.json gog OAuth client credentials
~/.openclaw/agents/main/agent/auth-profiles.json OpenClaw auth profiles
skills/gog/SKILL.md gog usage reference

Security: Never print the contents of these files in chat. Path is fine; content is not.

Using gog

# One-time: load OAuth credentials
gog auth credentials /path/to/client_secret.json

# Add an owner account (opens browser for OAuth)
gog auth add [email protected] --services gmail,calendar,drive,contacts,sheets,docs

# Verify
gog auth list

# Always use GOG_ACCOUNT= in all commands
[email protected] gog gmail search 'is:unread' --max 10
[email protected] gog calendar events primary \
  --from "2026-04-01T09:00:00Z" --to "2026-04-01T18:00:00Z"
[email protected] gog gmail send \
  --to "[email protected]" --subject "Hello" --body "Message text"

Troubleshooting Email/Calendar Access

Work through in order:

  1. Two accounts? — Is the question about agent email or owner email?
  2. gog installed?which gog — if missing, check PATH
  3. Account added?gog auth list — does owner's account appear?
  4. Write scope? — OAuth must include calendar write scope, not read-only
  5. GOG_ACCOUNT set? — All commands must include [email protected]
  6. Permission level? — Must be "Make changes to events", not "See all event details"

"Insufficient permissions" error → Owner re-shares calendar with write permission (Step 1 above).

"Token expired" error:

gog auth remove [email protected]
gog auth add [email protected] --services gmail,calendar,drive,contacts
安全使用建议
This skill largely looks like a normal step-by-step calendar connector, but there are two things to worry about before installing or using it: (1) it tells you to request gmail/drive/contacts scopes in addition to calendar — ask the author why those extra scopes are needed and avoid granting them unless necessary; (2) the 'Heleni-specific' workaround instructs reading /opt/ocana/openclaw/.gog/credentials.json and using client_id/client_secret/refresh_token to mint tokens. That file contains secrets; the skill did not declare access to it. Only allow that if you trust the skill source, understand exactly which account's tokens are being used, and have explicit admin consent. If you can't verify the origin or purpose, prefer the standard OAuth browser flow (gog auth add) and do not expose credentials.json. Ask the publisher to (a) justify and minimize requested scopes (calendar-only if possible), (b) declare any config paths or admin-only instructions, and (c) remove instructions that require reading sensitive credential files or explain why an administrator must run those steps. If this will run on a shared/server environment, consult your security/IT team before following the credentials-file steps.
能力标签
requires-oauth-token
能力评估
Purpose & Capability
The skill claims to help connect an owner's Google Calendar, but repeatedly instructs adding OAuth scopes beyond calendar (gmail, drive, contacts). Those extra scopes are not justified in the doc and expand access to unrelated services.
Instruction Scope
Most steps are appropriate CLI instructions using the 'gog' tool, but the 'Heleni-specific' workaround explicitly tells operators to read /opt/ocana/openclaw/.gog/credentials.json and extract client_id/client_secret/refresh_token to refresh tokens via curl. That directs reading a sensitive system path and using secrets that were not declared or justified.
Install Mechanism
No install script or external downloads — instruction-only skill with no code, which minimizes install-time risk.
Credentials
The skill declares no required env vars or config paths, yet instructs use of GOG_ACCOUNT and to access a specific system credentials file. It also instructs requesting broad credentials (gmail, drive, contacts) in addition to calendar; this is disproportionate for calendar-only functionality.
Persistence & Privilege
The skill is not forced-always and does not request system-wide persistence. Autonomous invocation is allowed (platform default) but is not combined here with other high privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install calendar-setup
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /calendar-setup 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.1
calendar-setup v1.1.1 - Added Heleni-specific section for direct Google Calendar API access when gog CLI authentication fails (browserless or server environments). - Provided step-by-step curl commands and notes for using pre-existing credentials on specific hosts. - No other procedural changes; rest of the documentation remains as before.
v1.1.0
Skill consolidation 2026-04-02: merged redundant skills, improved descriptions, added production lessons
v1.0.0
calendar-setup 1.0.0 - Initial release: step-by-step wizard for connecting an owner's Google Calendar to their OpenClaw PA agent. - Covers common setup flows: first-time connection, troubleshooting, fixing read-only access, re-authenticating, and multiple calendar handling. - Explains difference between owner and agent accounts, and how dashboard status relates. - Includes detailed command-line instructions for authorization, testing write access, and verifying permissions. - Provides common errors and fixes, multi-calendar support, and a verification checklist. - Compatible with any LLM model; requires only basic procedural following.
元数据
Slug calendar-setup
版本 1.1.1
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 3
常见问题

Calendar Setup 是什么?

Step-by-step wizard for connecting an owner's Google Calendar to their OpenClaw PA agent, including granting write permissions. Use when: setting up calendar... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 132 次。

如何安装 Calendar Setup?

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

Calendar Setup 是免费的吗?

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

Calendar Setup 支持哪些平台?

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

谁开发了 Calendar Setup?

由 Netanel Abergel(@netanel-abergel)开发并维护,当前版本 v1.1.1。

💬 留言讨论