agentleFS
rolandtolnayrolandtolnay/llm-toolkit/skills/gmail/SKILL.md

gmail

Skill1 starsChanged 3 months agoMITView on GitHub

Read-only Gmail source-material retrieval for agents. Use when you need to find relevant newsletters, reports, receipts, or topic-related emails without dumping the mailbox into context.

28 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use google_sheets, google-chat and 7 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Shugar86Skill

    google_sheets

    Google Sheets read/write integration

    Also in 3 projects that use this

  • antoniolgSkill

    google-chat

    Read Google Chat spaces/threads via the Chat API, create/refresh OAuth tokens, parse Gmail Chat URLs, and list spaces. Use when asked to look up or verify messages in Google Chat or when you need API access to Chat from the CLI.

    Also in 3 projects that use this

  • ansvisorSkill

    shopping

    Checks product pages and feed for ChatGPT Shopping (US) and Google Shopping (EU).

    Also in 3 projects that use this

  • ourinesSkill

    forget

    Delete saved knowledge from ~/.claude/learnings/ and optionally clean up knowledge graph.

    Also in 3 projects that use this

  • G-HunterAiSkill

    tiktok

    TikTok platform integration. Manage videos, view analytics, and track engagement.

    Also in 3 projects that use this

  • toolittlecakesSkill

    telegram

    Read Telegram messages and chats. Use when the user wants to search Telegram chats, list dialogs, or get messages from a chat. Requires authentication on first use.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 7 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 24 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read-only Gmail source-material retrieval through the Gmail Read CLI.

    line 10
  2. Distinctive:

    Use this skill to find and read a narrow set of relevant Gmail messages as source material for research, summarization, or evidence …

    line 12
  3. Very specific:

    Run config to see which credential sources loaded and whether required variables are present.

    line 40
  4. Very specific:

    Run doctor to verify read-only IMAP connectivity without returning email content.

    line 42
  5. Distinctive:

    Before running broad mailbox searches, narrow the request by at least one of:

    line 46
  6. Very specific:

    Do not use this as a mailbox dump tool.

    line 54
  7. Distinctive:

    Read-only v1: no sending, replying, deleting, archiving, labeling, or mark-read/unread operations.

    line 58
  8. Distinctive:

    Search returns metadata and snippets by default, not full bodies.

    line 59
  9. Very specific:

    Do not run live Gmail tests in normal development workflows.

    line 63
  10. Distinctive:

    Read one selected message from search results:

    line 79
  11. Distinctive:

    Read a selected conversation with sent replies included and direction markers:

    line 85

“Common” is measured: kept by at least 6 in 10 of the 24 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<objective> Read-only Gmail source-material retrieval through the **Gmail Read CLI**.

Use this skill to find and read a narrow set of relevant Gmail messages as source material for research, summarization, or evidence gathering. Do not use it as a mailbox dump tool. </objective>

<cli_cheatsheet> Script path: ~/.claude/skills/gmail/scripts/gmail.py

Run with: uv run <script> <command> [options]

uv run <script> search [--from X] [--after YYYY-MM-DD] [--before YYYY-MM-DD] [--subject TEXT] [--text TEXT] [--query RAW] [--label LABEL] [--mailbox all|inbox] [--limit N] [--snippet-chars N] [--include-sent] [--include-spam-trash] [--load-shell-env]
uv run <script> get <message-id> [--max-chars N] [--load-shell-env]
uv run <script> thread <thread-id> [--max-messages N] [--max-chars-per-message N] [--load-shell-env]
uv run <script> labels [--load-shell-env]
uv run <script> config [--load-shell-env]
uv run <script> doctor [--load-shell-env]

Defaults: search uses All Mail, received mail only, excludes spam/trash, returns bounded snippets rather than full bodies, and applies conservative result limits. </cli_cheatsheet>

<configuration> Required credentials:
  • GMAIL_USER
  • GMAIL_APP_PASSWORD

Provide these variables through the agent environment, process environment, or the CLI's supported credential files.

Run config to see which credential sources loaded and whether required variables are present. Secret values are never printed. If credentials are exported only from shell startup files, use --load-shell-env.

Run doctor to verify read-only IMAP connectivity without returning email content. </configuration>

<guardrails> Before running broad mailbox searches, narrow the request by at least one of:
  • Sender or domain (--from)
  • Topic/body text (--text) or subject (--subject)
  • Label (--label)
  • Timeframe (--after, --before)
  • Raw Gmail query (--query)

Do not use this as a mailbox dump tool. Search first, inspect metadata/snippets, then fetch only selected messages or threads with get or thread. </guardrails>

<privacy_rules>

  • Read-only v1: no sending, replying, deleting, archiving, labeling, or mark-read/unread operations.
  • Search returns metadata and snippets by default, not full bodies.
  • get and thread return normalized plain text with explicit truncation metadata.
  • Attachment handling is metadata-only: filename, content type, and approximate size when available. Attachment contents are not downloaded, written, or parsed.
  • The CLI does not cache or log email bodies, snippets, subjects, senders, or results.
  • Do not run live Gmail tests in normal development workflows; use doctor manually when credentials are available. </privacy_rules>
<examples> Newsletter research from a domain:
uv run ~/.claude/skills/gmail/scripts/gmail.py search --from example.com --after 2026-01-01 --text "pricing" --limit 5

Find recent finance reports without reading bodies yet:

uv run ~/.claude/skills/gmail/scripts/gmail.py search --label Finance --subject "monthly report" --after 2026-01-01

Read one selected message from search results:

uv run ~/.claude/skills/gmail/scripts/gmail.py get <message-id> --max-chars 8000

Read a selected conversation with sent replies included and direction markers:

uv run ~/.claude/skills/gmail/scripts/gmail.py thread <thread-id> --max-messages 10 --max-chars-per-message 6000
</examples>

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.