AgentSkillsCN

gog

通过 gog CLI 访问 Google Workspace(Gmail、日历、云端硬盘)。适用于用户询问电子邮件、日历事件或 Google Workspace 数据时使用。默认情况下仅支持只读与草稿操作——未经用户明确确认,绝不会发送邮件或删除数据。

SKILL.md
--- frontmatter
name: gog
description: Access Google Workspace (Gmail, Calendar, Drive) via the gog CLI. Use when the user asks about emails, calendar events, or Google Workspace data. READ-ONLY and DRAFT-ONLY operations by default — never send emails or delete data without explicit user confirmation.

Gog Skill — Google Workspace Access

Status: Trust-building phase — safe operations only.

Philosophy

With great power comes great responsibility. This skill starts conservative and expands capabilities as trust is established.

Current Phase: Read + Draft only
Next Phase: Send (with confirmation)
Future Phase: Full automation (if desired)

Safe Operations (Always Allowed)

Gmail (Read-Only)

Check unread count:

bash
gog gmail search 'is:unread in:inbox' --max 1 | wc -l
gog gmail search 'is:unread' --max 50

List recent emails:

bash
gog gmail search 'newer_than:1d' --max 10

Search for specific emails:

bash
gog gmail search 'from:sender@example.com subject:invoice newer_than:7d'

Read an email:

bash
gog gmail read <message-id>

Calendar (Read-Only)

List today's events:

bash
gog calendar events "dan@newdaychurch.cc" --today

Check upcoming events:

bash
gog calendar events "dan@newdaychurch.cc" --days 7 --max 20

Check free/busy:

bash
gog calendar freebusy --start "2026-02-05T09:00:00" --end "2026-02-05T17:00:00"

Drive (Read-Only)

List recent files:

bash
gog drive ls --max 10

Search files:

bash
gog drive ls --query "name contains 'budget'"

Draft Operations (Safe - Creates but Doesn't Send)

Create Email Draft

Save as draft in Gmail (safest):

bash
gog gmail draft create --to "recipient@example.com" --subject "Subject" --body "Body text"

Or use the script:

bash
~/.openclaw/workspace/skills/gog/scripts/create_draft.sh "recipient@example.com" "Subject" "Body"

Draft Best Practices

  1. Show me first — Display the draft content to the user
  2. Confirm before any action — Ask if they want me to save it
  3. Log what was drafted — For accountability

⚠️ NEVER Do Without Explicit Permission

  • Send emails — Always ask first
  • Delete emails — Never
  • Delete calendar events — Never
  • Modify events — Never
  • Send calendar invites — Ask first
  • Share Drive files — Ask first
  • Move emails to folders — Ask first

Trust Escalation Path

PhaseCapabilitiesSignal
NowRead + Draft onlyUser reviews all drafts
SoonSend with confirmation"Yes, send it"
LaterSend without confirmation (specific contexts)Explicit permission granted
FullFull automationUser says "you decide"

Example Interactions

User: "Do I have any unread emails?"

code
Safe: gog gmail search 'is:unread' --max 10

User: "What's on my calendar today?"

code
Safe: gog calendar events "dan@newdaychurch.cc" --today

User: "Draft an email to John about the meeting"

code
Safe: Create draft, show it, ask to save

User: "Send that email to John"

code
Confirm: "I'll save it as a draft first. Review it, then tell me to send."

Scripts

The scripts/ directory contains helper scripts:

  • create_draft.sh — Create email draft safely
  • read_email.sh — Read email with formatting
  • summarize_inbox.sh — Quick inbox summary

Environment

Required environment variables (already configured):

bash
export GOG_KEYRING_PASSWORD="68MonadnockST"
export GOG_ACCOUNT="dan@newdaychurch.cc"

Wrapper

Always use the wrapper for consistent environment:

bash
~/.openclaw/workspace/scripts/gog_wrapper.sh <command>

Logging

All gog operations should be logged to:

code
~/.openclaw/workspace/memory/gog-activity.log

Format: [TIMESTAMP] [ACTION] [DETAILS]

When to Ask for Permission

Always ask when:

  • The action modifies data (send, delete, move, edit)
  • The action could be misinterpreted (replying to sensitive emails)
  • The user says "take care of it" — clarify what "it" means

Safe to proceed without asking:

  • Reading emails/calendar
  • Creating drafts (but show the content)
  • Searching
  • Checking counts/status

Error Handling

If gog fails:

  1. Check if the token expired: gog auth list
  2. Re-auth if needed: gog auth add dan@newdaychurch.cc
  3. Log the error
  4. Inform the user what happened

Security Notes

  • Never log the full content of sensitive emails
  • Never expose the keyring password
  • Drafts are private until explicitly sent
  • When in doubt, ask

Weekly Workflows

Church Production Email Processing

Purpose: Automatically process Church Production emails weekly, build knowledge base, and send summaries.

Schedule: Every Monday at 8:00 AM EST

What it does:

  1. Fetches all Church Production emails from the past week
  2. Creates detailed summaries with full content
  3. Extracts links and resources
  4. Archives processed emails
  5. Creates a draft summary email to you
  6. Builds an accumulating knowledge base

Files created:

  • ~/.openclaw/workspace/notes/church-production/weekly-summary-YYYY-MM-DD.md — Detailed weekly notes
  • ~/.openclaw/workspace/notes/church-production/knowledge-base.md — Accumulated wisdom
  • ~/.openclaw/workspace/memory/cp-weekly-notification.txt — Status notification
  • ~/.openclaw/workspace/memory/cp-weekly-cron.log — Execution log

Cron job:

code
0 8 * * 1 /home/dan/.openclaw/workspace/scripts/church_production_weekly.sh

Manual run:

bash
~/.openclaw/workspace/scripts/church_production_weekly.sh

After weekly processing:

  • Review the draft in Gmail
  • Say "send weekly summary" to send it
  • Add your own notes to the weekly summary file
  • Extract actionable items for your team

Knowledge categories tracked:

  • Audio Techniques
  • Video/Lighting
  • Leadership & Team Management
  • Gear & Equipment
  • Worship Environment Design

Trust note: This workflow creates drafts, not sent emails. You always review before sending.