gog/skills/gog-gmail/SKILL.md
This skill should be used when the user asks to "check email", "search email", "send email", "read mail", "find emails from", "reply to email", "forward email", "list labels", "create a draft", "send a draft", "download attachment", "manage email labels", "archive email", "delete email", or mentions Gmail, inbox, or email management operations. Provides guidance for using the `gog gmail` CLI to interact with Gmail.
npx skillsauth add musingfox/cc-plugins gog GmailInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Interact with Gmail using the gog CLI tool (gog gmail or aliases gog mail, gog email).
Verify gog is available and authenticated before executing commands:
gog gmail labels list
If authentication fails, inform the user to run gog auth add <email> first.
--json when parsing output programmatically (e.g., extracting message IDs, threading). Use human-readable output when displaying results directly to the user.--dry-run before any send or destructive operation. Run the command with -n first, show the user what will happen, then execute after confirmation.--no-input to prevent interactive prompts from blocking execution.Search threads using Gmail query syntax:
gog gmail search "<query>" --max=10
Common query patterns:
from:[email protected] — from a specific senderto:[email protected] — to a specific recipientsubject:meeting — subject contains "meeting"is:unread — unread messagesis:starred — starred messageshas:attachment — messages with attachmentsafter:2026/01/01 before:2026/03/01 — date rangelabel:important — by label"exact phrase" — exact phrase matchis:unread from:[email protected] has:attachmentTo search individual messages instead of threads:
gog gmail messages search "<query>" --max=10
Key flags:
--max=N — max results (default: 10)--all — fetch all pages--page=<token> — pagination token--fail-empty — exit with code 3 if no results--timezone=<tz> — output timezone (IANA name)Use --json to get structured output with message IDs.
Get a specific message by ID:
gog gmail get <messageId>
gog gmail get <messageId> --format=metadata --headers=From,To,Subject,Date
Formats: full (default), metadata (headers only), raw (RFC 2822).
Get an entire conversation thread:
gog gmail thread get <threadId>
List attachments in a thread:
gog gmail thread attachments <threadId>
Download a specific attachment:
gog gmail attachment <messageId> <attachmentId> --out=/tmp/
Always preview with --dry-run first:
gog gmail send --to="[email protected]" --subject="Subject" --body="Message body" --dry-run
After user confirms, execute without --dry-run:
gog gmail send --to="[email protected]" --subject="Subject" --body="Message body"
Key flags:
--to, --cc, --bcc — recipients (comma-separated)--subject — subject line--body — plain text body--body-html — HTML body (optional, alongside or instead of --body)--body-file — read body from file (- for stdin)--attach=path — file attachment (repeatable)--reply-to-message-id=<id> — reply to a specific message--thread-id=<id> — reply within a thread--reply-all — auto-populate recipients from original (requires --reply-to-message-id or --thread-id)--quote — include quoted original message in replyTo reply to an email, combine --reply-to-message-id (or --thread-id) with send:
# Preview first
gog gmail send --reply-to-message-id=<messageId> --body="Reply text" --reply-all --quote --dry-run
# Then execute
gog gmail send --reply-to-message-id=<messageId> --body="Reply text" --reply-all --quote
gog gmail drafts list # List all drafts
gog gmail drafts get <draftId> # View draft details
gog gmail drafts create --to="..." --subject="..." --body="..." # Create draft
gog gmail drafts update <draftId> --body="..." # Update draft
gog gmail drafts send <draftId> # Send a draft
gog gmail drafts delete <draftId> # Delete a draft
gog gmail labels list # List all labels
gog gmail labels get <labelIdOrName> # Get label details with counts
gog gmail labels create <name> # Create a new label
gog gmail labels delete <labelIdOrName> # Delete a label
Apply or remove labels on threads:
gog gmail labels modify <threadId> --add=INBOX --remove=UNREAD
Modify labels on multiple messages:
gog gmail batch modify <messageId1> <messageId2> --add=STARRED
Permanently delete multiple messages (destructive — use --dry-run):
gog gmail batch delete <messageId1> <messageId2> --dry-run
Get Gmail web URL for a thread:
gog gmail url <threadId>
A typical email workflow:
gog gmail search "from:alice subject:project" --json --no-input --max=5gog gmail thread get <threadId>gog gmail send --reply-to-message-id=<messageId> --body="..." --reply-all --quote --dry-run--dry-rungog gmail labels listgog gmail search "is:unread" --max=20gog gmail labels modify <threadId> --add=<label> --remove=UNREAD--dry-run preview and user confirmation.--dry-run preview and user confirmation.--max=10 to avoid overwhelming output.data-ai
Unified entry point for Obsidian daily-note captures and long-form notes. Triggers on "記一下 / log / 紀錄 / capture this / 寫到 journal" (→ cap mode) and "建立筆記 / new note / 寫一份筆記 / create a note on" (→ note mode). Also via `/obw:cap` and `/obw:note`. Requires `.obsidian.yaml`.
tools
Use the `gog` CLI to operate Google Workspace — Gmail (read/search/send/labels/drafts), Calendar (events/RSVP/freebusy/focus-time/out-of-office), and Drive (list/search/upload/ download/share/move). Triggers on any Gmail, inbox, email, calendar, agenda, meeting, schedule, RSVP, Drive, Google Doc/Sheet/Slides, file share, or upload/download request.
documentation
Interactively create .obsidian.yaml for a project and install starter templates (task / doc / adr) into the vault's Templates folder. Skips templates that already exist; never overwrites.
tools
Manage project hook-guard installation — set up, diagnose, or update Claude Code hooks, git pre-commit, and commit-msg scripts with security checks, code-quality gates, and CLAUDECODE skip logic. Triggers on "set up hooks", "configure pre-commit", "add linting hooks", "initialize hook-guard", "check hooks", "hook doctor", "verify hook setup", "troubleshoot hooks", "update hooks", "regenerate hooks", "sync hooks with current tools", or similar requests.