Skip to content
Back to skills

Gmail

ASecurity

This skill should be used when the user asks to "check email", "read emails", "send email", "reply to email", "search inbox", or manages Gmail. Supports multi-account Gmail integration for reading, searching, sending, and label management.

  • 4 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 10, 2026
businesspythongobashgitapi

Works with

  • claude code
  • cli
  • api

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 10, 2026

npx -y skills add micsapp/micstec-skills --skill gmail --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Gmail?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Gmail
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/micsapp-gmail/badge)](https://www.skillsdirectory.com/skills/micsapp-gmail)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: gmail
description: This skill should be used when the user asks to "check email", "read emails", "send email", "reply to email", "search inbox", or manages Gmail. Supports multi-account Gmail integration for reading, searching, sending, and label management.
---

# Gmail Skill

Manage emails through Gmail API - read, search, send, and organize across multiple Google accounts.

## Account Setup

**Before running any command, read `accounts.yaml` to check registered accounts.**

> If `accounts.yaml` is missing or empty → Read `references/setup-guide.md` for initial setup

```yaml
# accounts.yaml example
accounts:
  personal:
    email: user@gmail.com
    description: Personal Gmail
  work:
    email: user@company.com
    description: Work account
```

## Email Sending Workflow (5 Steps)

When sending emails, **create 5 Tasks with TaskCreate** and execute sequentially:

| Step | Task | Key Action |
|------|------|----------|
| 1 | Gather context | Run Explore SubAgents **in parallel**: recipient info, related projects, background context |
| 2 | Check previous conversations | Search `--query "to:recipient OR from:recipient newer_than:90d"` → AskUserQuestion for thread selection |
| 3 | Draft email | Compose draft → AskUserQuestion for feedback |
| 4 | Test send | Send `[TEST]` email to user's own address → Open in Gmail web → Request confirmation |
| 5 | Actual send | Send to recipient → Report completion |

**Signature**: Append `---\nSent with Claude Code` to all outgoing emails

### Workflow Example: "Send a meeting email to John"

```
1. Create 5 Tasks
2. Step 1: Run parallel Explore SubAgents
   - Search recipient (John) info (partners/, projects/, context.md, etc.)
   - Search meeting context (calendar, recent meeting notes, etc.)
3. Step 2: Search "to:john@company.com OR from:john@company.com"
   → If previous conversation exists, AskUserQuestion (reply/new email)
4. Step 3: Draft email → AskUserQuestion (proceed/revise)
5. Step 4: Test send to my email → Open in Gmail web (`open "https://mail.google.com/mail/u/0/#inbox/{message_id}"`) → Request confirmation
6. Step 5: Actual send → Done
```

## CLI Quick Reference

```bash
# List messages
uv run python scripts/list_messages.py --account work --query "is:unread" --max 10

# Send email
uv run python scripts/send_message.py --account work --to "user@example.com" --subject "Subject" --body "Content"

# Check profile
uv run python scripts/manage_labels.py --account work profile
```

> Detailed CLI usage: `references/cli-usage.md`
> Search query reference: `references/search-queries.md`

## View Email in Web

After sending, use the returned Message ID to view directly in Gmail web:

```bash
# URL format
https://mail.google.com/mail/u/0/#inbox/{message_id}

# Example: Open in browser after test send
open "https://mail.google.com/mail/u/0/#inbox/19c145bbd47ddd01"
```

> **Note**: `u/0` is the first logged-in account, `u/1` is the second account

## File Structure

```
skills/gmail/
├── SKILL.md
├── accounts.yaml           # Account metadata
├── scripts/                # CLI scripts
├── references/
│   ├── setup-guide.md      # Initial setup guide
│   ├── cli-usage.md        # Detailed CLI usage
│   ├── search-queries.md   # Search query reference
│   └── credentials.json    # OAuth Client ID (gitignore)
├── assets/
│   ├── accounts.default.yaml  # Account config template
│   ├── email-templates.md     # Email body templates
│   └── signatures.md          # Signature templates (Plain/HTML)
└── accounts/               # Per-account tokens (gitignore)
```

## Error Handling

| Situation | Resolution |
|-----------|------------|
| accounts.yaml missing | Read `references/setup-guide.md` for initial setup |
| Token missing | Guide user to run `setup_auth.py --account <name>` |
| Token expired | Auto-refresh; if failed, guide re-authentication |

Files in this skill

  • .gitignore171 B
  • SKILL.md3.9 KB
  • accounts.yaml.example324 B
  • assets/accounts.default.yaml757 B
  • assets/email-templates.md2.3 KB
  • assets/signatures.md1.6 KB
  • pyproject.toml421 B
  • references/cli-usage.md3.1 KB
  • references/search-queries.md1.2 KB
  • references/setup-guide.md3.6 KB
  • scripts/core/__init__.py436 B
  • scripts/core/batch_processor.py16.4 KB
  • scripts/core/cache_manager.py15.7 KB
  • scripts/core/quota_manager.py8.6 KB
  • scripts/core/retry_handler.py10.2 KB
  • scripts/gmail_client.py39 KB
  • scripts/list_messages.py4.2 KB
  • scripts/manage_labels.py7.3 KB
  • scripts/read_message.py3.8 KB
  • scripts/send_message.py3.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…