/gws:gmail-read ["<gmail search query>"] [--id <messageId>] [--limit N] [--body] [--account LABEL|EMAIL] [--pretty]from gws
Searches and reads Gmail messages via gws — find emails by query, fetch full plain-text body, supports search operators and account switching.
Ships in gws. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Search Gmail with a query, or fetch a single message by id, and get structured results back — subject, from, date, snippet, and optionally the full plain-text body (HTML stripped).
This skill only reads. It never sends, modifies labels, marks as read, or
deletes. For composing, see the sibling gmail-draft-from-markdown skill.
# Codex: this path resolves under Claude Code; substitute the directory containing this plugin.
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT}"
bash "$PLUGIN_ROOT/scripts/auth-preflight.sh"
Run the entrypoint script, passing all arguments through:
# Codex: this path resolves under Claude Code; substitute the directory containing this SKILL.md.
SKILL_DIR="${CLAUDE_SKILL_DIR}"
bash "$SKILL_DIR/scripts/read.sh" $ARGUMENTS
If no arguments were provided, ask the user what to search for (subject
keywords, sender, date range, etc.). Gmail search operators are supported
verbatim (e.g. from:[email protected] newer_than:7d).
| Arg | Required | Notes |
|---|---|---|
"<query>" | one of query or --id | Any Gmail search string. Use quotes. |
--id <messageId> | one of query or --id | Fetch a single message directly. |
--limit N | no | Max results in search mode (default 10). |
--body | no | In search mode, also fetch each message's body. Slower — one extra API call per hit. |
--account LABEL|EMAIL | no | Override active gws account (accepts an account label or its email). Errors if no account matches. |
--pretty | no | Human-readable output instead of JSON. |
gws gmail users messages list with the query and maxResults=limit.--body).Each JSON object has:
{
"id": "...",
"threadId": "...",
"subject": "...",
"from": "...",
"to": "...",
"date": "...",
"snippet": "...",
"body": "..." // only present with --body
}
With --pretty, prints a readable list instead (id, subject, from, date,
snippet, then body if fetched).
--id)Emits a single JSON object with all fields including body, or a pretty
block with --pretty.
text/plain.text/html is present, strips tags naively (Python re) and
collapses whitespace. Not a full HTML→text renderer — good enough for
quickly reading a marketing email or a plain formatted reply, not for
reproducing complex layouts.# Codex: this path resolves under Claude Code; substitute the directory containing this SKILL.md.
SKILL_DIR="${CLAUDE_SKILL_DIR}"
# Find the Ollama 0.31 announcement
bash "$SKILL_DIR/scripts/read.sh" "Ollama 0.31 Gemma 4 MTP"
# Same, but also pull the body so you can quote it back
bash "$SKILL_DIR/scripts/read.sh" "Ollama 0.31" --body --pretty
# Fetch one specific message
bash "$SKILL_DIR/scripts/read.sh" --id 19f1c3e1f903f72f --pretty
# Standard Gmail operators work
bash "$SKILL_DIR/scripts/read.sh" "from:[email protected] newer_than:60d" --limit 20
# Read from a specific account (not the active one)
bash "$SKILL_DIR/scripts/read.sh" "invoice" --account [email protected]
invalid_grant): Re-authenticate that account. For the
active account, run gws auth login; for a --account override, switch to
it first via the gws:account skill, then re-auth.gws auth status shows the active account. Override
per-call with --account EMAIL, or switch globally via the gws:account
skill.newer_than:1y, drop the sender
filter). Gmail search is exact-match on many operators.--id and inspect specific parts, or fall back to gws gmail users messages get --params '{"format":"raw",...}' and decode
manually.Reading a Gmail message via the raw API is 2–3 tool calls plus base64-
decoding and MIME walking. This skill collapses that to one invocation with
sensible defaults — search + summarize by default, or grab a single message
end-to-end with --id --pretty.
What SKILL.md sets; muted values are Claude Code's defaults
Also 'read the email from <sender>', 'show me the message where …', 'pull that email about X'.
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub jtsternberg/claude-plugins --plugin gws7 skills in this plugin
/gws-accountCheck, add, list, or switch the active Google account. The only way to manage gws accounts — the CLI has no `account` subcommand./gws-calendarGoogle Calendar via the gws CLI — 'what's on my calendar', today's meetings, schedule, find an event, pull its Meet/Zoom link, create events, list calendars./gmail-draft-from-markdownTurn a local markdown file into a Gmail draft via gws — converts to HTML, attaches local files, threads onto an existing message as a reply, never sends, returns the Gmail drafts URL for review.