← 返回 Skills 市场
ethanyanjiali

GOG Extended

作者 Ethan Yanjia Li · GitHub ↗ · v2.1.0 · MIT-0
cross-platform ⚠ suspicious
165
总下载
0
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install gog-extended
功能描述
Extended Google Workspace CLI reference for Gmail, Calendar, Drive, Contacts, Sheets, and Docs. Includes complete email body retrieval, attachments, and adva...
使用说明 (SKILL.md)

gog-extended

Complete reference for the gog CLI with focus on advanced Gmail operations (full email bodies, attachments, complex searches).

Setup (one-time)

gog auth credentials /path/to/client_secret.json
gog auth add [email protected] --services gmail,calendar,drive,contacts,docs,sheets
gog auth list

Gmail Operations

Search & Browse

  • Search threads (one row per thread):

    gog gmail search 'newer_than:7d' --max 10
    gog gmail search 'from:[email protected]' --max 20
    
  • Search individual messages (ignores threading, returns all matches):

    gog gmail messages search "in:inbox from:ryanair.com" --max 20 --account [email protected]
    gog gmail messages search 'subject:invoice' --max 50
    

Read Full Email Content (Critical for Automation)

This is the key difference from basic search — retrieve the complete email body, headers, and content:

# Full email with HTML body (recommended for parsing and automation)
gog gmail get \x3CmessageId> --format=full --account [email protected]

# Metadata only (faster, no body)
gog gmail get \x3CmessageId> --format=metadata --account [email protected]

# Raw RFC 2822 format (MIME encoded)
gog gmail get \x3CmessageId> --format=raw --account [email protected]

Recommendation: Use --format=full (default) which returns HTML-formatted email bodies. HTML preserves structure, links, and formatting better than raw RFC 2822, making it easier to parse and extract data programmatically.

Example workflow (extracting order details from email):

# 1. Find the message
gog gmail messages search 'from:[email protected] subject:confirmation' --max 1 --account [email protected]

# 2. Extract the message ID from results
# 3. Read full content (returns HTML body for easy parsing)
gog gmail get \x3CmessageId> --format=full --account [email protected]

# 4. Parse HTML for data (grep, sed, or HTML parser)
gog gmail get \x3CmessageId> --format=full --account [email protected] | grep -i "order\|price\|quantity"

The HTML format makes it easier to identify structure (tables, divs, links) and extract data without dealing with raw MIME encoding.

Download Attachments

gog gmail attachment \x3CmessageId> \x3CattachmentId>

Get attachment IDs from gog gmail get \x3CmessageId> --format=full output.

Send Emails

  • Plain text:

    gog gmail send --to [email protected] --subject "Hi" --body "Hello"
    
  • Multi-line (via file):

    gog gmail send --to [email protected] --subject "Hi" --body-file ./message.txt
    
  • Multi-line (via stdin):

    gog gmail send --to [email protected] --subject "Hi" --body-file - \x3C\x3C'EOF'
    Hi there,
    
    This is a test.
    
    Cheers
    EOF
    
  • HTML:

    gog gmail send --to [email protected] --subject "Hi" --body-html "\x3Cp>Hello\x3C/p>"
    

Drafts

gog gmail drafts create --to [email protected] --subject "Hi" --body-file ./message.txt
gog gmail drafts send \x3CdraftId>

Reply to Messages

gog gmail send --to [email protected] --subject "Re: Hi" --body "Reply" --reply-to-message-id \x3CmsgId>

Gmail History (Last Changes)

gog gmail history --max 100

Gmail URL Links

gog gmail url \x3CthreadId> ...

Prints direct Gmail web URLs.

Calendar Operations

List Events

gog calendar events \x3CcalendarId> --from 2026-01-01T00:00:00Z --to 2026-12-31T23:59:59Z

Create Event

gog calendar create \x3CcalendarId> --summary "Meeting" --from 2026-03-30T10:00:00Z --to 2026-03-30T11:00:00Z

With color (IDs 1–11):

gog calendar create \x3CcalendarId> --summary "Important" --from 2026-03-30T10:00:00Z --to 2026-03-30T11:00:00Z --event-color 4

Update Event

gog calendar update \x3CcalendarId> \x3CeventId> --summary "New Title" --event-color 7

View Color Palette

gog calendar colors

Color IDs:

  • 1: #a4bdfc (blue)
  • 2: #7ae7bf (teal)
  • 3: #dbadff (purple)
  • 4: #ff887c (red)
  • 5: #fbd75b (yellow)
  • 6: #ffb878 (orange)
  • 7: #46d6db (cyan)
  • 8: #e1e1e1 (gray)
  • 9: #5484ed (dark blue)
  • 10: #51b749 (green)
  • 11: #dc2127 (dark red)

Drive Operations

gog drive search "filename:report.pdf" --max 10
gog drive search "in:starred" --max 20

Contacts

gog contacts list --max 20
gog contacts list --max 50 --json

Sheets

Read Data

gog sheets get \x3CsheetId> "Tab!A1:D10" --json
gog sheets metadata \x3CsheetId> --json

Update Data

gog sheets update \x3CsheetId> "Tab!A1:B2" --values-json '[["A","B"],["1","2"]]' --input USER_ENTERED

Append Data

gog sheets append \x3CsheetId> "Tab!A:C" --values-json '[["x","y","z"]]' --insert INSERT_ROWS

Clear Data

gog sheets clear \x3CsheetId> "Tab!A2:Z"

Docs

Export

gog docs export \x3CdocId> --format txt --out /tmp/doc.txt
gog docs export \x3CdocId> --format pdf --out /tmp/doc.pdf

Read (cat)

gog docs cat \x3CdocId>

Advanced Flags

Common Flags

  • --account [email protected] — Target specific account (required when multiple accounts configured)
  • --json — Output JSON (best for scripting)
  • --plain — Stable TSV format (no colors)
  • --dry-run — Preview changes without executing
  • --force — Skip confirmations
  • --no-input — Never prompt (useful for CI/automation)
  • --verbose — Enable verbose logging

Environment Variable

Avoid repeating --account by setting:

export [email protected]

Then:

gog gmail search 'newer_than:7d'  # Uses GOG_ACCOUNT automatically

Gmail Query Syntax

Powerful search operators for gog gmail search and gog gmail messages search:

  • newer_than:7d — Last 7 days
  • before:2026-03-30 — Before date
  • after:2026-03-20 — After date
  • from:[email protected] — From specific sender
  • to:[email protected] — To specific recipient
  • subject:keywords — Subject contains
  • in:inbox — In inbox (also: sent, draft, starred, important)
  • is:unread — Unread messages
  • has:attachment — Has attachment
  • filename:document.pdf — Attachment name
  • label:custom_label — Custom labels

Complex queries:

gog gmail search 'from:[email protected] subject:invoice after:2026-03-01'
gog gmail search 'in:inbox is:unread has:attachment'

Notes

  • Search vs Messages: gog gmail search returns one row per thread; use gog gmail messages search when you need every individual email.
  • Multi-account: When multiple accounts are configured, always specify --account [email protected].
  • Token efficiency: For scripting, use --json output and parse programmatically.
  • Email body extraction: Use gog gmail get \x3CmessageId> --format=full to retrieve complete email content (critical for automation like order tracking, invoice extraction, etc.).
  • Docs are read-only in gog: In-place edits require a separate Docs API client; gog supports export and read-only operations.
安全使用建议
This skill appears to be a coherent CLI reference for the 'gog' Google Workspace tool, but consider the following before installing or enabling it: 1) The skill instructs the agent to fetch full email bodies and attachments — only enable it if you trust the agent/context and the gog CLI binary it will call. 2) The SKILL.md expects a local OAuth client_secret.json and an env var (GOG_ACCOUNT) even though metadata lists no required credentials — make sure you know where those files/values come from and never expose shared/production credentials. 3) Examples in the references include real-looking personal email addresses — treat these as potential privacy leaks and remove or replace with placeholders. 4) Verify the origin and integrity of the 'gog' CLI (homepage/repo referenced in package.json) before granting it access to accounts. 5) If you do not want the agent to autonomously run mailbox-reading commands, restrict the skill from autonomous invocation or only use it in tightly controlled sessions. If you want a firmer assessment, provide the actual gog binary/source or more info about the skill publisher so provenance can be validated.
功能分析
Type: OpenClaw Skill Name: gog-extended Version: 2.1.0 The skill bundle is a comprehensive documentation and reference guide for the 'gog' CLI tool, which interacts with Google Workspace (Gmail, Calendar, Drive, etc.). While the tool possesses high-privilege capabilities such as reading full email bodies and managing documents, the instructions in SKILL.md and references/email-extraction-patterns.md are consistent with legitimate automation use cases like order tracking and invoice management. No evidence of malicious intent, data exfiltration to unauthorized endpoints, or prompt injection was found.
能力评估
Purpose & Capability
Name and description align with the SKILL.md: everything is focused on the 'gog' CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs. The actions requested (read full email bodies, attachments, send email, etc.) are consistent with that purpose.
Instruction Scope
The SKILL.md directs the agent to run many gog commands that retrieve full email bodies and attachments (sensitive data). This is expected for a Gmail-focused CLI, but it expands the blast radius: if an agent runs these commands with valid credentials it can access and exfiltrate complete mailbox contents. The docs also reference local files (client_secret.json) and an env var (GOG_ACCOUNT) that are not declared in the metadata; sample files and real email addresses appear in examples, which risks accidental leakage or misuse.
Install Mechanism
Instruction-only skill, no install spec and no code files to execute. This minimizes supply-chain risk, but it relies on the presence and trustworthiness of an external 'gog' binary which the agent/user must already have installed.
Credentials
Registry metadata declares no required env vars or credentials, yet SKILL.md uses GOG_ACCOUNT and instructs use of a client_secret.json OAuth file and gog auth commands. The requested env/config access is proportionate to the described CLI purpose, but the metadata omission is an inconsistency and examples include real-looking personal email addresses (possible privacy leak).
Persistence & Privilege
Skill does not request permanent presence (always:false). There is no install or persistent agent modification described. Autonomous invocation is allowed (platform default) but not combined with other high-risk factors here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gog-extended
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gog-extended 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.1.0
Updated email body retrieval to recommend HTML format for better parsing and automation
v2.0.0
gog-extended 2.0.0 - Major update: Expanded CLI reference covering Gmail (now with full email body retrieval and attachments), Calendar, Drive, Contacts, Sheets, and Docs. - New advanced Gmail search and message retrieval with detailed instructions for extracting full content, attachments, and running complex queries. - Added sections for sending emails, drafting, replying, and working with Gmail history. - Includes detailed usage examples for Calendar events (including color management), Sheets data read/update/append, Drive search, Contacts listing, and Docs export. - Outlines advanced flags for scripting/automation and multi-account setups. - Improved Gmail query syntax section to support power users and automation scripts.
元数据
Slug gog-extended
版本 2.1.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 2
常见问题

GOG Extended 是什么?

Extended Google Workspace CLI reference for Gmail, Calendar, Drive, Contacts, Sheets, and Docs. Includes complete email body retrieval, attachments, and adva... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 165 次。

如何安装 GOG Extended?

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

GOG Extended 是免费的吗?

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

GOG Extended 支持哪些平台?

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

谁开发了 GOG Extended?

由 Ethan Yanjia Li(@ethanyanjiali)开发并维护,当前版本 v2.1.0。

💬 留言讨论