gmail

gmail is a skill for Claude Code, Codex from idea2realClaw/myAgent. It costs 78 tokens per session (671 once invoked), scanned A, original, MIT.

A command-line tool for working with Gmail through the email protocols used by mail applications. It can send, receive, search and reply to messages, including messages with attachments.

In plain words
What is it for?
Use it to configure Gmail, send messages, inspect the inbox, read specific emails, search by keywords and reply to messages.
Why use it?
It lets a coding agent handle common mailbox tasks from the terminal without opening a web browser.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to configure Gmail, send messages, inspect the inbox, read specific emails, search by keywords and reply to messages.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/idea2realclaw/myagent/gmail
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 idea2realClaw/myAgent --skill gmail
Clone the repo
git clone --depth 1 https://github.com/idea2realClaw/myAgent

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/idea2realclaw/myagent/gmail/github.svg)](https://agentmods.dev/skills/idea2realclaw/myagent/gmail)
Your own site
<a href="https://agentmods.dev/skills/idea2realclaw/myagent/gmail"><img src="https://agentmods.dev/badge/skills/idea2realclaw/myagent/gmail/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gmail

Your own site · 80×15
<a href="https://agentmods.dev/skills/idea2realclaw/myagent/gmail"><img src="https://agentmods.dev/badge/skills/idea2realclaw/myagent/gmail.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 671 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.00078 $0.00671
Opus 5.5 $0.00031 $0.00268
Sonnet 5.5 $0.00016 $0.00134
Haiku 4.5 $0.00008 $0.00067

Measured 1mo ago against content hash cf9fc1d90870, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/gmail_tool.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/gmail/SKILL.md · 103 lines

What it actually says

Gmail 邮件工具

概述

通过 Gmail SMTP 和 IMAP 协议,在命令行中收发邮件。无需浏览器,支持附件。

前置要求

生成 Gmail 应用专用密码

  1. 访问 https://myaccount.google.com/apppasswords
  2. 登录 Google 账号
  3. 应用选择「邮件」,设备选择「其他」,输入名称(如 WorkBuddy)
  4. 点击「生成」,复制 16 位密码(去掉空格)

首次配置

GMAIL="python3 ~/.workbuddy/skills/gmail/scripts/gmail_tool.py"

$GMAIL config set email [email protected]
$GMAIL config set app_password xxxx xxxx xxxx xxxx

配置文件保存在 ~/.workbuddy/gmail.conf,权限设为 600(仅用户可读)。


命令参考

脚本路径:~/.workbuddy/skills/gmail/scripts/gmail_tool.py

发送邮件

# 基本发送
python3 gmail_tool.py send <收件人> <主题> <正文>

# 正文来自文件
python3 gmail_tool.py send [email protected] "汇报" /path/to/content.txt

# 带附件
python3 gmail_tool.py send [email protected] "资料" "请查收附件" /path/to/file.pdf /path/to/image.png

查看收件箱

# 查看最新 10 封(默认)
python3 gmail_tool.py inbox

# 查看最新 20 封
python3 gmail_tool.py inbox 20

阅读邮件

# 先从 inbox 命令获取邮件 ID,然后:
python3 gmail_tool.py read <邮件ID>

搜索邮件

# 按关键词搜索(搜索主题和发件人)
python3 gmail_tool.py search <关键词>

python3 gmail_tool.py search "龙族" 20

回复邮件

# 回复指定邮件
python3 gmail_tool.py reply <邮件ID> <回复内容>

# 回复内容来自文件
python3 gmail_tool.py reply <邮件ID> /path/to/reply.txt

查看配置

python3 gmail_tool.py config

注意事项

  • 仅支持 Gmail 邮箱
  • 必须使用应用专用密码,不支持普通登录密码
  • Google 账号需开启两步验证才能生成应用专用密码
  • 附件支持任意文件类型
  • 邮件正文超过 3000 字符时会自动截断显示
  • 配置文件 ~/.workbuddy/gmail.conf 权限为 600,保护密码安全
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 103 lines · 78 tokens per session scan A cf9fc1d90870

Subscribe to this mod's changes

gmail is a skill published in the GitHub repository idea2realClaw/myAgent (2 stars, last pushed 2mo ago), licensed MIT. It adds 78 tokens to every session and 671 once invoked, about $0.0003 per session on Opus 5.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-31.