gmail-tools

Reading and managing Gmail emails - Sending emails with attachments - Replying to emails while maintaining thread continuity

25 stars

Best use case

gmail-tools is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Reading and managing Gmail emails - Sending emails with attachments - Replying to emails while maintaining thread continuity

Teams using gmail-tools should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/gmail-tools/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/aiskillstore/marketplace/clementwalter/gmail-tools/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/gmail-tools/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How gmail-tools Compares

Feature / Agentgmail-toolsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Reading and managing Gmail emails - Sending emails with attachments - Replying to emails while maintaining thread continuity

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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

1. Go to [Google Account Security](https://myaccount.google.com/security)
2. Enable 2-Factor Authentication if not already enabled
3. Go to "App passwords" (under "2-Step Verification")
4. Generate a new app password for "Mail"
5. 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.

```text
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.

```text
account: "Gmail Work Claude"
email_id: "46"                # From list_emails
folder: "INBOX"               # Optional
```

### send_email

Send a new email with optional attachments.

```text
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.

```text
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.

```text
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

```bash
./scripts/gmail_list.py "Gmail Work Claude" --limit 20
./scripts/gmail_list.py "Gmail Work Claude" --json  # JSON output
```

### Read Email

```bash
./scripts/gmail_read.py "Gmail Work Claude" "46"
./scripts/gmail_read.py "Gmail Work Claude" "46" --json
```

### Reply to Email

```bash
# 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:

1. Extracts the original email's `Message-ID` and `References` headers
2. Sets `In-Reply-To` to the original `Message-ID`
3. Builds proper `References` header chain
4. Adds `RE:` prefix to subject if not present
5. 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

Related Skills

recipe-create-gmail-filter

25
from ComeOnOliver/skillshub

Create a Gmail filter to automatically label, star, or categorize incoming messages.

gws-gmail-watch

25
from ComeOnOliver/skillshub

Gmail: Watch for new emails and stream them as NDJSON.

gws-gmail-triage

25
from ComeOnOliver/skillshub

Gmail: Show unread inbox summary (sender, subject, date).

gws-gmail-send

25
from ComeOnOliver/skillshub

Gmail: Send an email.

gws-gmail-reply

25
from ComeOnOliver/skillshub

Gmail: Reply to a message (handles threading automatically).

gws-gmail-reply-all

25
from ComeOnOliver/skillshub

Gmail: Reply-all to a message (handles threading automatically).

gws-gmail-read

25
from ComeOnOliver/skillshub

Gmail: Read a message and extract its body or headers.

gws-gmail-forward

25
from ComeOnOliver/skillshub

Gmail: Forward a message to new recipients.

mermaid-tools

25
from ComeOnOliver/skillshub

Extracts Mermaid diagrams from markdown files and generates high-quality PNG images using bundled scripts. Activates when working with Mermaid diagrams, converting diagrams to PNG, extracting diagrams from markdown, or processing markdown files with embedded Mermaid code.

markdown-tools

25
from ComeOnOliver/skillshub

Converts documents to markdown with multi-tool orchestration for best quality. Supports Quick Mode (fast, single tool) and Heavy Mode (best quality, multi-tool merge). Use when converting PDF/DOCX/PPTX files to markdown, extracting images from documents, validating conversion quality, or needing LLM-optimized document output.

no-tools

25
from ComeOnOliver/skillshub

Instructions only skill

security-scanning-tools

25
from ComeOnOliver/skillshub

This skill should be used when the user asks to "perform vulnerability scanning", "scan networks for open ports", "assess web application security", "scan wireless networks", "detect malware", "check cloud security", or "evaluate system compliance". It provides comprehensive guidance on security scanning tools and methodologies.