gmail

gmail is a command for Claude Code from vmarcondes-nilo/personal-os. It costs 0 tokens per session (986 once invoked), scanned A, original, MIT.

An email-inbox workflow that classifies messages, assigns labels, marks them read, and can take other actions through a connected Gmail account.

In plain words
What is it for?
Use it to review inbox messages, group and prioritize them, mark them read, and prepare or carry out email actions. It requires a Gmail connection through MCP.
Why use it?
It reduces the manual work of sorting a crowded inbox and helps stop unread-message notifications from piling up.

Command for Claude Code

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 commands/vmarcondes-nilo/personal-os/gmail
Clone the repo
git clone --depth 1 https://github.com/vmarcondes-nilo/personal-os

Made for: Claude Code.

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/commands/vmarcondes-nilo/personal-os/gmail.svg)](https://agentmods.dev/commands/vmarcondes-nilo/personal-os/gmail)
Your own site
<a href="https://agentmods.dev/commands/vmarcondes-nilo/personal-os/gmail"><img src="https://agentmods.dev/badge/commands/vmarcondes-nilo/personal-os/gmail.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 986 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.00000 $0.00986
Opus 5 $0.00000 $0.00493
Sonnet 5 $0.00000 $0.00197
Haiku 4.5 $0.00000 $0.00099

Measured 4d ago against content hash 967885dd03de, 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 4d 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.

.claude/commands/gmail.md · 120 lines

How it starts

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

Gmail Triage

Triage your email inbox — classify, prioritize, and take action. Requires Gmail connected via MCP.


Setup Required

This command requires a Gmail MCP integration. Options:

Once connected, replace the tool references below with your actual MCP tool names.


1. Fetch Inbox

Fetch all messages currently in the inbox:

  • Query: in:inbox
  • Extract: message ID, thread ID, from, subject, snippet, date
  • If your Gmail tool supports pagination, paginate until all messages are fetched

Deduplication (optional): Read .gmail-triaged-ids to skip emails already triaged in a previous run. If the file doesn't exist, process everything.

If the inbox is empty or all emails were already triaged, say "Inbox is clean — nothing to triage." and skip to Step 7.

2. Mark All as Read

Mark all fetched messages as read (remove UNREAD label) so notifications stop buzzing.

3. Classify & Label

Using sender, subject, and snippet, classify each email into a label category. Customize these to match your work:

Label What goes here
Work Direct work emails — team, manager, clients
Finance Invoices, banking, accounting, expenses
Legal Contracts, compliance, legal correspondence
HR / People Team HR, hiring, recruiting, benefits
Calendar Meeting invites, schedule changes
Product Product updates, feature requests, bug reports
Sales Sales pipeline, deals, customer outreach
Marketing Campaigns, analytics, brand
Newsletters Subscriptions, digests, content
Misc Everything else

To customize: Create these labels in Gmail, then map their label IDs here. You can find label IDs using your MCP tool's list-labels endpoint.

Read the full file on GitHub · 120 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. 4d ago First seen · 120 lines · 0 tokens per session scan A 967885dd03de

Subscribe to this mod's changes

gmail is a command published in the GitHub repository vmarcondes-nilo/personal-os (43 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 986 tokens. 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.