# Gmail Skill

Manage Gmail - send, read, search emails, manage labels and drafts.

- Repository: https://github.com/benchflow-ai/skillsbench (1888 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-10-24
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add benchflow-ai/skillsbench --skill gmail-skill -g -a claude-code -y`
Codex: `npx skills add benchflow-ai/skillsbench --skill gmail-skill -g -a codex -y`
Cursor: `npx skills add benchflow-ai/skillsbench --skill gmail-skill -g -a cursor -y`
Gemini CLI: `npx skills add benchflow-ai/skillsbench --skill gmail-skill -g -a gemini-cli -y`

## Description

Manage Gmail - send, read, search emails, manage labels and drafts. Use when user wants to interact with their Gmail account for email operations.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Gmail Manager Skill

This skill provides comprehensive Gmail integration through lightweight CLI scripts. All operations are token-efficient and composable.

## First-Time Setup

Before using this skill, you must set up OAuth authentication:

1. **Install dependencies:**
   ```bash
   cd ~/.claude/skills/gmail-skill && npm install
   ```

2. **Set up Google Cloud credentials:**
   - Follow the guide in `docs/google-cloud-setup.md`
   - Download `credentials.json` and save to `scripts/auth/credentials.json`

3. **Authenticate:**
   ```bash
   cd ~/.claude/skills/gmail-skill && npm run setup
   ```

This will open a browser for Google OAuth and save your token locally.

## Multi-Account Support

The Gmail skill supports multiple accounts (e.g., personal and work email):

### Add Additional Accounts

```bash
# Add a second account (from skill directory)
npm run setup -- --account work

# Add a third account
npm run setup -- --account personal
```

Each account needs separate OAuth authentication.

### Manage Accounts

```bash
# List all configured accounts
node scripts/manage-accounts.js --list

# Set default account (used when --account is not specified)
node scripts/manage-accounts.js --set-default work

# Remove an account
node scripts/manage-accounts.js --remove old-account
```

### Using Specific Accounts

All Gmail operations support the `--account` parameter:

```bash
# Send email from work account
node gmail-send.js --account work --to "user@example.com" --subject "..." --body "..."

# Send from personal (or omit --account to use default)
node gmail-send.js --account personal --to "friend@example.com" --subject "..." --body "..."

# Search work emails
node gmail-search.js --account work --query "is:unread"
```

If `--account` is not specified, the default account is used.

## Usage Guidelines

### 1. Read Documentation On-Demand

When first using Gmail operations, read the comprehensive README:
```bash
cat ~/.claude/skills/gmail-skill/README.md
```

The rest: https://github.com/benchflow-ai/skillsbench/blob/HEAD/tasks-extra/scheduling-email-assistant/environment/skills/gmail-skill/SKILL.md
