gmail

gmail is a skill for Claude Code, Codex from tallclub/matimo. It costs 21 tokens per session (1,134 once invoked), scanned A, original, MIT.

A guide for working with Gmail, Google's email service, through tools for reading, searching, sending, drafting, and handling attachments.

In plain words
What is it for?
Use it to search inboxes, read messages, download attachment data, send emails, create drafts, and delete messages.
Why use it?
It avoids manually piecing together the steps and permissions needed for common email tasks. It also clarifies which operations can read, send, draft, or delete messages.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/tallclub/matimo/gmail
Any agent
npx skills add tallclub/matimo --skill gmail
Clone the repo
git clone --depth 1 https://github.com/tallclub/matimo

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/tallclub/matimo/gmail.svg)](https://agentmods.dev/skills/tallclub/matimo/gmail)
Your own site
<a href="https://agentmods.dev/skills/tallclub/matimo/gmail"><img src="https://agentmods.dev/badge/skills/tallclub/matimo/gmail.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,134 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00021 $0.01134
Opus 5 $0.00010 $0.00567
Sonnet 5 $0.00004 $0.00227
Haiku 4.5 $0.00002 $0.00113

Measured 3d ago against content hash 77ab9d3bc983, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gmail 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 3d 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.

typescript/packages/gmail/skills/gmail/SKILL.md · 116 lines

How it starts

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

Gmail

Complete guide to using Matimo's Gmail tools for sending emails, inbox management, search, drafts, and attachments.

All Available Tools

Tool Purpose
gmail-send-email Send a new email
gmail-list-messages List/search messages with Gmail query syntax and label filters
gmail-get-message Get full details of a message (headers, body, attachment metadata)
gmail-get-attachment Fetch a message attachment's raw data by ID
gmail-create-draft Create a draft email without sending it
gmail-delete-message Permanently delete a message

Authentication

Gmail tools use OAuth2. Required scopes:

  • https://www.googleapis.com/auth/gmail.readonly — for listing/reading messages and attachments
  • https://www.googleapis.com/auth/gmail.send — for sending
  • https://www.googleapis.com/auth/gmail.compose — for drafts
  • https://www.googleapis.com/auth/gmail.modify — for deleting messages

Environment variable: GMAIL_ACCESS_TOKEN (or GMAIL_CLIENT_ID / GMAIL_CLIENT_SECRET / GMAIL_REFRESH_TOKEN when using the OAuth2 provider flow).


Sending Emails

Use gmail-send-email with:

  • to (required) — recipient email or comma-separated list
  • subject (required) — email subject
  • body (required) — email body (supports HTML via isHtml)
  • cc, bcc — optional recipients

Best practices:

  • Always include a meaningful subject
  • Keep body concise; use HTML for formatting
  • Handle bounces — validate addresses before sending

Drafts

Use gmail-create-draft with the same parameters as gmail-send-email (to, subject, body, cc, bcc, isHtml) to stage an email for manual review before sending.


Inbox Management

Listing and Searching Messages

gmail-list-messages handles both listing and search — pass Gmail's advanced query syntax via query, plus labelIds, maxResults, pageToken, and includeSpamTrash.

Operator Example Purpose
from: from:[email protected] From specific sender
to: to:[email protected] Sent to
subject: subject:invoice In subject line
has:attachment Has attachments
is:unread Unread messages
is:starred Starred messages
after: after:2024/01/01 Date filter
before: before:2024/06/01 Date filter
label: label:work By label
filename: filename:pdf Attachment type
- -from:noreply Exclude results

Read the full file on GitHub · 116 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. 3d ago First seen · 116 lines · 21 tokens per session scan A 77ab9d3bc983

Subscribe to this mod's changes

gmail is a skill published in the GitHub repository tallclub/matimo (11 stars, last pushed 4d ago), licensed MIT. It adds 21 tokens to every session and 1,134 once invoked, about $0.0001 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.