Search and read Gmail messages. Use when looking up emails, reading email threads, or checking inbox labels.
by drn★ 23 GitHub starsAbout this skill
Email (Read-Only)
Search and read Gmail messages using the gmail CLI.
Instructions
You are helping read Gmail data. Auth uses OAuth tokens stored at ~/.dots/sys/gmail/tokens/. Additional env vars (if any) are loaded from ~/.dots/sys/env.
Operations
# Search emails
gmail search "from:emily subject:kickoff" # Search by sender and subject
gmail search "is:unread" --limit 10 # Recent unread
gmail search "after:2025/01/01 from:sarah" # Date-filtered search
# Read a specific email
gmail read MESSAGE_ID # Read full email by ID
# List labels with message counts
gmail labels
# List configured accounts
gmail accounts
# Use a specific account
gmail search "budget" --account personal
gmail labels --account work
# Re-authenticate an account (opens browser for OAuth)
gmail auth personal
# JSON output
gmail search "quarterly review" --json
gmail accounts --json
Accounts
Run gmail accounts to see configured accounts with names and emails. The default account is marked with *.
Common Tasks
Find recent emails from someone
gmail search "from:emily" --limit 10
Read an email thread
# First search to find message IDs
gmail search "subject:technical kickoff" --limit 5
# Then read the specific message
gmail read MESSAGE_ID
Check unread count
gmail labels
Account Resolution
The CLI resolves accounts in this order:
--account NAMEflag — uses~/.dots/sys/gmail/tokens/NAME.json- Default account from
~/.dots/sys/gmail/accounts.json - First token file found in
~/.dots/sys/gmail/tokens/
Search Syntax
Gmail search supports standard Gmail query operators:
from:sender— messages from a specific senderto:recipient— messages to a specific recipientsubject:words— subject line searchafter:YYYY/MM/DD/before:YYYY/MM/DD— date rangeis:unread/is:starred— message statehas:attachment— messages with attachmentslabel:NAME— messages with a specific labelin:inbox/in:sent— location filters
Capabilities
- Email search: Full Gmail query syntax with pagination
- Email reading: Full message content including headers, body text, and attachment metadata
- Label listing: All labels with message counts (total and unread)
- Account listing: Show all configured accounts with default marker
Troubleshooting
If a search or read fails with invalid_grant or Token has been expired or revoked, re-authenticate:
gmail auth ACCOUNT_NAME
This opens the browser for OAuth consent and saves the new token.
Limitations
- Read-only — Cannot send, draft, archive, or modify emails. For composing replies, draft the text in the conversation for manual copy/paste.
- Message body is truncated at 5000 characters
Install email in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the email skill do?
Search and read Gmail messages. Use when looking up emails, reading email threads, or checking inbox labels.
How do I install the email skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the email skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
by Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
by Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
by Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
by Anthropic