gmail-tools
Gmailのメールを読んだり管理したり、添付ファイル付きでメールを送ったり、スレッドを維持しながら返信したりするなど、Gmailをビジネスで効率的に活用するSkill。
📜 元の英語説明(参考)
Reading and managing Gmail emails - Sending emails with attachments - Replying to emails while maintaining thread continuity
🇯🇵 日本人クリエイター向け解説
Gmailのメールを読んだり管理したり、添付ファイル付きでメールを送ったり、スレッドを維持しながら返信したりするなど、Gmailをビジネスで効率的に活用するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o gmail-tools.zip https://jpskill.com/download/17930.zip && unzip -o gmail-tools.zip && rm gmail-tools.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17930.zip -OutFile "$d\gmail-tools.zip"; Expand-Archive "$d\gmail-tools.zip" -DestinationPath $d -Force; ri "$d\gmail-tools.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
gmail-tools.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
gmail-toolsフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 4
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Gmail Tools
1Passwordの資格情報ストレージを使用して、IMAP/SMTP経由でGmailに安全にアクセスします。適切なスレッド処理と添付ファイルを使用して、メールのリスト表示、読み取り、検索、送信、および返信をサポートします。
使用する場面
- Gmailメールの読み取りと管理
- 添付ファイル付きのメールの送信
- スレッドの継続性を維持しながらメールに返信
- IMAPクエリを使用したメールの検索
前提条件
1Passwordの設定
次の項目を含む1Passwordアイテムを作成します。
- Item name: 任意のわかりやすい名前(例: "Gmail Work Claude"、"Gmail Personal")
- username フィールド: Gmailアドレス(例:
user@gmail.com) - password フィールド: Gmailアプリパスワード(通常のパスワードではありません)
Gmailアプリパスワードの取得
- Google Account Securityにアクセスします。
- まだ有効になっていない場合は、2要素認証を有効にします。
- 「アプリパスワード」(「2段階認証」の下)に移動します。
- 「メール」の新しいアプリパスワードを生成します。
- 16文字のパスワードを1Passwordアイテムにコピーします。
MCP Server Tools
このプラグインは、次のMCPツールを提供します。
list_emails
アカウントから最近のメールをリスト表示します。
account: "Gmail Work Claude" # 1Passwordアイテム名
folder: "INBOX" # オプション、デフォルト: INBOX
limit: 10 # オプション、デフォルト: 10
read_email
スレッドヘッダーを含む、メールの完全な内容を読み取ります。
account: "Gmail Work Claude"
email_id: "46" # list_emailsから取得
folder: "INBOX" # オプション
send_email
オプションの添付ファイル付きで、新しいメールを送信します。
account: "Gmail Work Claude"
to: "recipient@example.com"
subject: "Hello"
body: "Email content here"
cc: "cc@example.com" # オプション
bcc: "bcc@example.com" # オプション
attachments: ["/path/to/file.pdf"] # オプション
reply_email
スレッドを維持しながら、メールに返信します。
account: "Gmail Work Claude"
email_id: "46" # 返信するメール
body: "Thanks for your message!"
attachments: ["/path/to/doc.pdf"] # オプション
folder: "INBOX" # オプション
search_emails
IMAP構文を使用して検索します。
account: "Gmail Work Claude"
query: "FROM sender@example.com" # または "SUBJECT hello"、"UNSEEN"など
folder: "INBOX" # オプション
limit: 10 # オプション
スタンドアロンスクリプト
MCPなしでCLIで使用する場合は、scripts/のスクリプトを使用します。
メールをリスト表示
./scripts/gmail_list.py "Gmail Work Claude" --limit 20
./scripts/gmail_list.py "Gmail Work Claude" --json # JSON出力
メールを読む
./scripts/gmail_read.py "Gmail Work Claude" "46"
./scripts/gmail_read.py "Gmail Work Claude" "46" --json
メールに返信する
# ドライラン(送信せずにプレビュー)
./scripts/gmail_reply.py "Gmail Work Claude" "46" \
--body "Thanks for your email." \
--attachment ~/document.pdf \
--dry-run
# 返信を送信
./scripts/gmail_reply.py "Gmail Work Claude" "46" \
--body "Thanks for your email." \
--attachment ~/document.pdf
メールスレッド
reply_emailを使用すると、ツールは自動的に次の処理を行います。
- 元のメールの
Message-IDおよびReferencesヘッダーを抽出します In-Reply-Toを元のMessage-IDに設定します- 適切な
Referencesヘッダーチェーンを構築します - 件名に
RE:プレフィックスが存在しない場合は追加します - 送信者のメールアドレスに送信します
これにより、すべてのメールクライアントで返信が同じスレッドに表示されるようになります。
一般的なIMAP検索クエリ
| Query | Description |
|---|---|
ALL |
すべてのメッセージ |
UNSEEN |
未読メッセージ |
FROM "john" |
"john"を含む送信者からのメッセージ |
SUBJECT "meeting" |
"meeting"を含む件名のメッセージ |
SINCE "01-Jan-2024" |
指定日以降のメッセージ |
BEFORE "01-Jan-2024" |
指定日以前のメッセージ |
BODY "keyword" |
"keyword"を含む本文のメッセージ |
括弧で組み合わせる: (FROM "john" SUBJECT "meeting")
トラブルシューティング
"1Password item not found"
1Passwordのアイテム名が、使用している名前と正確に一致していることを確認してください。
"Authentication failed"
- 通常のGmailパスワードではなく、アプリパスワードを使用していることを確認してください
- Googleアカウントで2FAが有効になっていることを確認してください
- アプリパスワードが取り消されていないか確認してください
"IMAP not enabled"
Gmailの設定 → [メール転送と POP/IMAP] → [IMAP を有効にする] でIMAPを有効にしてください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Gmail Tools
Secure Gmail access via IMAP/SMTP with 1Password credential storage. Supports listing, reading, searching, sending, and replying to emails with proper threading and attachments.
When to Use
- Reading and managing Gmail emails
- Sending emails with attachments
- Replying to emails while maintaining thread continuity
- Searching emails using IMAP queries
Prerequisites
1Password Setup
Create a 1Password item with:
- Item name: Any descriptive name (e.g., "Gmail Work Claude", "Gmail Personal")
- username field: Your Gmail address (e.g.,
user@gmail.com) - password field: Gmail App Password (NOT your regular password)
Getting a Gmail App Password
- Go to Google Account Security
- Enable 2-Factor Authentication if not already enabled
- Go to "App passwords" (under "2-Step Verification")
- Generate a new app password for "Mail"
- Copy the 16-character password to your 1Password item
MCP Server Tools
The plugin provides these MCP tools:
list_emails
List recent emails from an account.
account: "Gmail Work Claude" # 1Password item name
folder: "INBOX" # Optional, default: INBOX
limit: 10 # Optional, default: 10
read_email
Read full email content including threading headers.
account: "Gmail Work Claude"
email_id: "46" # From list_emails
folder: "INBOX" # Optional
send_email
Send a new email with optional attachments.
account: "Gmail Work Claude"
to: "recipient@example.com"
subject: "Hello"
body: "Email content here"
cc: "cc@example.com" # Optional
bcc: "bcc@example.com" # Optional
attachments: ["/path/to/file.pdf"] # Optional
reply_email
Reply to an email, maintaining the thread.
account: "Gmail Work Claude"
email_id: "46" # Email to reply to
body: "Thanks for your message!"
attachments: ["/path/to/doc.pdf"] # Optional
folder: "INBOX" # Optional
search_emails
Search using IMAP syntax.
account: "Gmail Work Claude"
query: "FROM sender@example.com" # or "SUBJECT hello", "UNSEEN", etc.
folder: "INBOX" # Optional
limit: 10 # Optional
Standalone Scripts
For CLI usage without MCP, use scripts in scripts/:
List Emails
./scripts/gmail_list.py "Gmail Work Claude" --limit 20
./scripts/gmail_list.py "Gmail Work Claude" --json # JSON output
Read Email
./scripts/gmail_read.py "Gmail Work Claude" "46"
./scripts/gmail_read.py "Gmail Work Claude" "46" --json
Reply to Email
# Dry run (preview without sending)
./scripts/gmail_reply.py "Gmail Work Claude" "46" \
--body "Thanks for your email." \
--attachment ~/document.pdf \
--dry-run
# Send reply
./scripts/gmail_reply.py "Gmail Work Claude" "46" \
--body "Thanks for your email." \
--attachment ~/document.pdf
Email Threading
When using reply_email, the tool automatically:
- Extracts the original email's
Message-IDandReferencesheaders - Sets
In-Reply-Toto the originalMessage-ID - Builds proper
Referencesheader chain - Adds
RE:prefix to subject if not present - Sends to the sender's email address
This ensures replies appear in the same thread in all email clients.
Common IMAP Search Queries
| Query | Description |
|---|---|
ALL |
All messages |
UNSEEN |
Unread messages |
FROM "john" |
From sender containing "john" |
SUBJECT "meeting" |
Subject containing "meeting" |
SINCE "01-Jan-2024" |
Messages since date |
BEFORE "01-Jan-2024" |
Messages before date |
BODY "keyword" |
Body containing "keyword" |
Combine with parentheses: (FROM "john" SUBJECT "meeting")
Troubleshooting
"1Password item not found"
Verify the exact item name in 1Password matches what you're using.
"Authentication failed"
- Ensure you're using an App Password, not your regular Gmail password
- Verify 2FA is enabled on your Google account
- Check the App Password hasn't been revoked
"IMAP not enabled"
Enable IMAP in Gmail Settings → Forwarding and POP/IMAP → Enable IMAP
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (4,584 bytes)
- 📎 scripts/gmail_list.py (3,218 bytes)
- 📎 scripts/gmail_read.py (3,745 bytes)
- 📎 scripts/gmail_reply.py (6,383 bytes)