gmail

Search, read, send, and manage Gmail messages, drafts, labels, and filters via the gws CLI.

Updated Mar 18, 2026
One-click install
npx skills add https://github.com/pgoell/pgoell-claude-tools --skill gmail-pgoell
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gmail
Source: https://github.com/pgoell/pgoell-claude-tools/tree/main/plugins/google-workspace/skills/gmail
Command: npx skills add https://github.com/pgoell/pgoell-claude-tools --skill gmail-pgoell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing email manually through a browser is slow when you need to triage an inbox, search large mailboxes, or automate sending and organizing messages. This Skill lets you perform Gmail operations directly from the command line using the gws CLI. ## Core Features & Use Cases - Inbox Triage and Search: Summarize unread mail, read full messages, and run Gmail search queries with operators like from:, has:attachment, and newer_than:. - Send and Reply: Send emails with attachments or HTML bodies, reply, reply-all, forward, and create drafts programmatically. - Mailbox Management: Trash or delete messages, modify labels, create labels, and manage filters. - Use Case: Ask to triage your inbox, find all unread messages from your manager this week, and draft a reply to the latest one — all without opening Gmail. ## Quick Start Ask the assistant to triage your unread inbox and show the five most recent messages from a specific sender.

Frequently Asked Questions about gmail

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search Gmail messages from the command line?

Use gws gmail users messages list with a q parameter containing Gmail search operators like from:, subject:, or has:attachment. For quick inbox summaries, run gws gmail +triage with an optional --query flag.

How do I send an email with an attachment using gws?

Run gws gmail +send with --to, --subject, --body, and the -a flag followed by the file path. The helper command handles MIME encoding automatically, and you can add --cc, --bcc, or --html as needed.

What Gmail search operators can I use to filter emails?

Gmail supports operators like from:, to:, subject:, is:unread, has:attachment, label:, after:, before:, newer_than:, and larger:. Combine them with AND (implicit), OR using braces, or NOT with a minus sign.

Why does my gws gmail command fail with exit code 2?

Exit code 2 indicates an authentication error. Run gws auth status to check whether the gws CLI is installed and authenticated; if not, install and configure it from the googleworkspace/cli repository.

Can I recover a deleted Gmail message?

Messages moved to trash via users messages trash are recoverable, but users messages delete is permanent. The Skill recommends confirming with the user before any permanent delete operation.