gmail-query-syntax

gmail-query-syntax is a skill for Claude Code, Codex from provos/ironcurtain. It costs 71 tokens per session (921 once invoked), scanned A, original, Apache-2.0.

A reference for the search language used by Gmail. It explains operators such as sender, sent status, unread status, dates, attachments, and labels, and how to combine them.

In plain words
What is it for?
Use it to construct Gmail searches for messages from particular senders, time periods, labels, attachments, or sent and unread status. Then use the matching message IDs to retrieve full email details.
Why use it?
It removes the need to remember Gmail's search syntax when building a query for automated email searches. It also clarifies that finding messages and reading their full contents are separate steps.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit Use it to construct Gmail searches for messages from particular senders, time periods, labels, attachments, or sent and unread status. Then use the matching message IDs to retrieve full email details.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/provos/ironcurtain/gmail-query-syntax
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add provos/ironcurtain --skill gmail-query-syntax
Clone the repo
git clone --depth 1 https://github.com/provos/ironcurtain

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gmail-query-syntax

README.md
[![agentmods](https://agentmods.dev/badge/skills/provos/ironcurtain/gmail-query-syntax.svg)](https://agentmods.dev/skills/provos/ironcurtain/gmail-query-syntax)
Your own site
<a href="https://agentmods.dev/skills/provos/ironcurtain/gmail-query-syntax"><img src="https://agentmods.dev/badge/skills/provos/ironcurtain/gmail-query-syntax.svg" alt="Measured on agentmods" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 921 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00071 $0.00921
Opus 5 $0.00036 $0.00461
Sonnet 5 $0.00014 $0.00184
Haiku 4.5 $0.00007 $0.00092

Measured 7d ago against content hash c75581baa28d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

gmail-query-syntax scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/workflow/workflows/test-email-summary/skills/gmail-query-syntax/SKILL.md · 64 lines

How it starts

The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Gmail query syntax primer

These tools live on the google-workspace MCP server, sanitized to google_workspace in Code Mode. In Docker Agent Mode the only MCP tool exposed to Claude Code is execute_code; write TypeScript inside it and call the Gmail tools as dotted callables, e.g. google_workspace.gmail_search_messages({ query: "is:sent", pageSize: 3 }).

gmail_search_messages accepts a query parameter that uses Gmail's standard search operator language — the same syntax the Gmail web UI search box accepts. Operators combine with implicit AND; use OR (uppercase) for disjunction and parentheses for grouping.

Note: gmail_search_messages returns message IDs, thread IDs, and URLs only — not full message contents. To read sender, recipient, subject, date, and body for a matched message, follow up with google_workspace.gmail_get_message (single id) or google_workspace.gmail_get_messages_batch (array of ids).

Common operators

Operator Meaning Example
is:sent Messages the user sent (not received) is:sent
is:unread Unread messages is:unread
is:starred Starred messages is:starred
from:<addr> Sender address (substring or full) from:[email protected]
to:<addr> Recipient address to:[email protected]
subject:<text> Subject contains text subject:"weekly update"
newer_than:<n>d Messages newer than N days (also h, m, y) newer_than:7d
older_than:<n>d Messages older than N (same units) older_than:30d
after:<date> After a date (YYYY/MM/DD) after:2025/01/01
before:<date> Before a date before:2025/02/01
has:attachment Messages with at least one attachment has:attachment
label:<name> Messages with the given Gmail label label:invoices
in:inbox In the inbox (excludes archived) in:inbox
in:anywhere Includes Spam and Trash (rarely needed) in:anywhere

Read the full file on GitHub · 64 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 64 lines · 71 tokens per session scan A c75581baa28d

Subscribe to this mod's changes

gmail-query-syntax is a skill published in the GitHub repository provos/ironcurtain (601 stars, last pushed yesterday), licensed Apache-2.0. It adds 71 tokens to every session and 921 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.