Agent skill

Gmail Query Syntax

by provos in provos/ironcurtain

Reference for Gmail's search query syntax — operators like is:sent, newerthan:, from:, has:attachment, label:, and how they compose.

Apache-2.0Auto-check passedProductivity & Automation

Install Gmail Query Syntax

skills CLI
$ npx skills add provos/ironcurtain --skill gmail-query-syntax -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install provos/ironcurtain gmail-query-syntax --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/provos/ironcurtain.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/workflow/workflows/test-email-summary/skills/gmail-query-syntax .claude/skills/gmail-query-syntax && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gmail-query-syntax
GitHub stars
613
Token cost
~971 tokens
SKILL.md length
349 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
Apache-2.0

At a glance

Reference for Gmail's search query syntax — operators like is:sent, newerthan:, from:, has:attachment, label:, and how they compose.

  • Tasks that involve Email management
  • SKILL.md covers Common operators, Composing queries and Tips
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Cloud office suites

What it does

Gmail Query Syntax is an agent skill from provos/ironcurtain. Reference for Gmail's search query syntax — operators like is:sent, newerthan:, from:, has:attachment, label:, and how they compose. Read this when constructing a Gmail search query string for the googleworkspace.gmailsearchmessages Code Mode call, especially when filtering by sent vs received, recency, sender, or labels.

Its SKILL.md is about 970 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Productivity & Automation, covering Email management and Cloud office suites. It works with Gmail, Google Workspace and Model Context Protocol. The repository describes itself as: A secure runtime for autonomous AI agents. Policy from plain-English constitutions. (https://ironcurtain.dev). The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Email management
  • Tasks that involve Cloud office suites

Example prompts

  • “/gmail-query-syntax”

Requirements

  • Docker

What it can do on your machine

Read from SKILL.md and the folder at commit d51a346. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gmail Query Syntax loads about 971 tokens when it runs. Until then it costs about 87 tokens; SKILL.md has 349 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~971

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from provos/ironcurtain at commit d51a346, republished under its Apache-2.0 licence (© provos). 349 words, ~971 tokens.

Download SKILL.mdSave it as .claude/skills/gmail-query-syntax/SKILL.md (or your agent's skills folder).
name
gmail-query-syntax
description
Reference for Gmail's search query syntax — operators like is:sent, newer_than:, from:, has:attachment, label:, and how they compose. Read this when constructing a Gmail search query string for the google_workspace.gmail_search_messages Code Mode call, especially when filtering by sent vs received, recency, sender, or labels.

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

OperatorMeaningExample
is:sentMessages the user sent (not received)is:sent
is:unreadUnread messagesis:unread
is:starredStarred messagesis:starred
from:<addr>Sender address (substring or full)from:alice@example.com
to:<addr>Recipient addressto:team@example.com
subject:<text>Subject contains textsubject:"weekly update"
newer_than:<n>dMessages newer than N days (also h, m, y)newer_than:7d
older_than:<n>dMessages older than N (same units)older_than:30d
after:<date>After a date (YYYY/MM/DD)after:2025/01/01
before:<date>Before a datebefore:2025/02/01
has:attachmentMessages with at least one attachmenthas:attachment
label:<name>Messages with the given Gmail labellabel:invoices
in:inboxIn the inbox (excludes archived)in:inbox
in:anywhereIncludes Spam and Trash (rarely needed)in:anywhere

Composing queries

  • Implicit AND: is:sent newer_than:7d -> sent in the last 7 days.
  • Explicit OR with grouping: (from:alice OR from:bob) is:unread.
  • Negation with -: is:sent -label:archived.
  • Quote multi-word values: subject:"quarterly review".

Tips

  • Prefer newer_than:Nd over after: when "the last N days" is what you actually want — after: is calendar-anchored and behaves unexpectedly across timezone boundaries.
  • For "the most recent N sent emails", combine is:sent with the pageSize argument on the dotted call — google_workspace.gmail_search_messages({ query: "is:sent", pageSize: N }) — do not try to express the limit inside the query string. (Pagination tokens come back as pageToken and are passed back in via the same argument name on the next call if you need to walk past the first page.)
  • The query is case-insensitive for operator names but case-sensitive inside quoted values.

© provos, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in src/workflow/workflows/test-email-summary/skills/gmail-query-syntax of provos/ironcurtain.

Open the folder on GitHubat commit d51a346

Compare with similar skills

Gmail Query Syntax next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gmail Query Syntax compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gmail Query Syntax this skillprovos/ironcurtain613—~971Automated safety check: PassApache-2.0
Gmailsanjay3290/ai-skills431—~1.2kAutomated safety check: PassApache-2.0
Apple Mail Setupdavekilleen/Dex493—~2.5kAutomated safety check: PassCustom licence
Bootstrap Google Toolsgoogle/adk-recipes10k—~5kAutomated safety check: WarnApache-2.0
Gwskv0906/pm-kit138—~1.6kAutomated safety check: PassMIT
Google Workspaceswarmclawai/swarmclaw688—~680Automated safety check: PassMIT

Similar skills

  • Gmail

    sanjay3290/ai-skills

    Interact with Gmail - search emails, read messages, send emails, create drafts, and manage labels.

    431 GitHub stars~1.2k tokensUpdated 27 days ago
    Productivity & AutomationAuto-check passed
  • Apple Mail Setup

    davekilleen/Dex

    Set up and verify Apple Mail search on macOS, including the search index that silently returns nothing when it was never built.

    493 GitHub stars~2.5k tokensUpdated 5 days ago
    Documents & OfficeAuto-check passed
  • Bootstrap Google Tools

    google/adk-recipes

    Official

    Install/auth CLIs the sandbox lacks - gws (Drive, Gmail, Sheets, Calendar), gcloud, agents-cli, mcp-cli (MCP servers).

    10k GitHub stars~5k tokensUpdated today
    Agent WorkflowsAuto-check: warnings
  • Gws

    kv0906/pm-kit

    This skill should be used when the user asks to "set up gws", "install Google Workspace CLI", "connect Gmail to Claude", "manage Google Drive from terminal", "send email from CLI", "check my…

    138 GitHub stars~1.6k tokensUpdated 3 mo ago
    Documents & OfficeAuto-check passed
  • Google Workspace

    swarmclawai/swarmclaw

    Use Google Workspace CLI (gws) for Drive, Docs, Sheets, Gmail, Calendar, Chat, and related Workspace API tasks.

    688 GitHub stars~680 tokensUpdated 3 mo ago
    Documents & OfficeAuto-check passed
  • Google Workspace CLI

    hoodini/ai-agents-skills

    Interact with all Google Workspace APIs via the gws CLI. An agent skill from hoodini/ai-agents-skills.

    281 GitHub stars~10k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check: notes

More from provos/ironcurtain

  • Harness Design Fuzzing

    provos/ironcurtain

    Reference vocabulary for designing instrumented harnesses that drive vulnerability discovery — design classes (trigger-driven vs coverage-driven), tiered scope (T1 isolated function / T2…

    613 GitHub stars~5.7k tokensUpdated yesterday
    Auto-check passed
  • Email Formatting

    provos/ironcurtain

    Markdown formatting conventions for email summary documents — heading depth, list style, line length, emoji policy, and a mandatory provenance footer.

    613 GitHub stars~518 tokensUpdated yesterday
    Auto-check passed
  • JSON Schema Emails

    provos/ironcurtain

    Canonical shape of the .workflow/emails/emails.json file passed between the fetch and summarize states — required fields (sender, recipient, subject, date, body), types, and field semantics.

    613 GitHub stars~491 tokensUpdated yesterday
    Auto-check passed
  • Summary Style Guide

    provos/ironcurtain

    Tone and length conventions for email summaries — voice, verb tense, what to include vs omit, and target sentence count.

    613 GitHub stars~509 tokensUpdated yesterday
    Auto-check passed
  • Memory Safety C Cpp

    provos/ironcurtain

    Reference vocabulary for memory-safety vulnerabilities in native C/C++ code — bug-class taxonomy, common arithmetic patterns that lead to corruption, dispatch-family discipline, type-confusion…

    613 GitHub stars~5.6k tokensUpdated yesterday
    Auto-check passed
  • Vulnerability Triage

    provos/ironcurtain

    Reference vocabulary for interpreting vulnerability findings — detector-vs-impact distinction, severity anchoring on demonstrated evidence, the eleven-item interpretation rubric, delegation…

    613 GitHub stars~6.3k tokensUpdated yesterday
    Auto-check passed

Questions about Gmail Query Syntax

What does Gmail Query Syntax do?

Reference for Gmail's search query syntax — operators like is:sent, newerthan:, from:, has:attachment, label:, and how they compose. Gmail Query Syntax is an agent skill from provos/ironcurtain. Reference for Gmail's search query syntax — operators like is:sent, newerthan:, from:, has:attachment, label:, and how they compose.

When should I use Gmail Query Syntax?

Gmail Query Syntax fits situations like: tasks that involve Email management; tasks that involve Cloud office suites.

How do I install Gmail Query Syntax in Claude Code?

Run `npx skills add provos/ironcurtain --skill gmail-query-syntax -a claude-code`. Or copy the skill folder (src/workflow/workflows/test-email-summary/skills/gmail-query-syntax in provos/ironcurtain) into .claude/skills/gmail-query-syntax in your project. Claude Code loads it when a task matches its description.

How do I install Gmail Query Syntax in Codex?

Run `npx skills add provos/ironcurtain --skill gmail-query-syntax -a codex`. Or copy the skill folder (src/workflow/workflows/test-email-summary/skills/gmail-query-syntax in provos/ironcurtain) into .agents/skills/gmail-query-syntax in your project. Codex loads it when a task matches its description.

Can I use Gmail Query Syntax in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add provos/ironcurtain --skill gmail-query-syntax -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gmail-query-syntax, .gemini/skills/gmail-query-syntax, .github/skills/gmail-query-syntax and .opencode/skills/gmail-query-syntax in your project.

What does Gmail Query Syntax need to run?

SKILL.md names no scripts, command-line tools or credentials: Gmail Query Syntax is instructions for the agent only. Our summary lists: Docker.

Does Gmail Query Syntax access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Gmail Query Syntax safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gmail Query Syntax use?

Gmail Query Syntax is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gmail Query Syntax use?

About 971 tokens (SKILL.md is roughly 3.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Gmail Query Syntax?

Skills that share tags, products or a category with Gmail Query Syntax: Gmail (sanjay3290/ai-skills, 431 stars), Apple Mail Setup (davekilleen/Dex, 493 stars), Bootstrap Google Tools (google/adk-recipes, 10k stars) and Gws (kv0906/pm-kit, 138 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gmail Query Syntax?

provos (a GitHub user) maintains it in provos/ironcurtain, which has 613 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 7, 2026.

Source: provos/ironcurtain on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.