Skip to content
Skills Library
Documents & office · Tool integration

gmail-skill

/gmail-skill

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

Repository
skillsbench ↗
Licence
Apache-2.0
Last repository change
12.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
18
Scripts
13
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 12.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What to check before installing
  • 13 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/action-logger.js, scripts/auth/auth-utils.js, scripts/auth/setup-oauth.js, scripts/gmail-drafts.js, scripts/gmail-every-paywall-cleanup.js, scripts/gmail-filters.js, scripts/gmail-forward.js, scripts/gmail-labels.js

What it does and when to use it

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

Original author description

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

How it works

  1. First-Time Setup
  2. Multi-Account Support
  3. Usage Guidelines
  4. Available Operations
  5. Error Handling
  6. Best Practices
  7. Token Efficiency
Original SKILL.md headings · 165 lines, 565 words
SKILL.md preview
---
name: gmail-skill
description: Manage Gmail - send, read, search emails, manage labels and drafts. Use when user wants to interact with their Gmail account for email operations.
---

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

This provides detailed usage examples for all operations.

### 2. Execute Scripts via Bash

All scripts are in the `scripts/` directory and output JSON for easy parsing:

```bash
cd ~/.claude/skills/gmail-skill/scripts
```

### 3. Parse JSON Output

All scripts return JSON. Parse the output and present relevant information to the user in a friendly format.

### 4. Chain Operations

Save intermediate results to files when chaining operations:

```bash
# Search for emails
node gmail-search.js --query "from:user@example.com" > /tmp/search-results.json

# Read first message from results
MESSAGE_ID=$(cat /tmp/search-results.json | jq -r '.messages[0].id')
node gmail-read.js --id "$MESSAGE_ID"
```

## Available Operations

### Send Email
```bash
node gmail-send.js --to "user@example.com" --subject "Subject" --body "Body text"
```

### Search Emails
```bash
node gmail-search.js --query "is:unread" --limit 10
```

### Read Message
```bash
node gmail-read.js --id "MESSAGE_ID"
```

### Manage Labels
```bash
# List all labels
node gmail-labels.js --action list

# Add label to message
node gmail-labels.js --action add --id "MESSAGE_ID" --label "Important"
```

### Manage Drafts
```bash
# Create draft
node gmail-drafts.js --action create --to "user@example.com" --subject "Subject" --body "Draft body"

# Send draft
node gmail-drafts.js --action send --id "DRAFT_ID"
```

## Error Handling

If scripts fail:
- Check that `token.json` exists in `scripts/auth/`
- If token is expired, run `npm run setup` again
- Verify the user granted all required Gmail API permissions

## Best Practices

1. **Always change to the scripts directory first** to ensure relative paths work
2. **Parse JSON output** and present user-friendly summaries
3. **Validate user input** before passing to scripts
4. **Handle errors gracefully** and provide helpful error messages
5. **Use search operators** for precise email filtering (see README.md)

## Token Efficiency

This skill is designed for minimal token usage:
- Documentation loaded only when needed
- Scripts are small and focused
- JSON output is compact and parseable
- No persistent server overhead
Files in this package (18)
  • .gitignore 1 KB
  • README.md 7 KB
  • SKILL.md 4 KB
  • package.json 1 KB
  • docs/google-cloud-setup.md 6 KB
  • scripts/action-logger.js 4 KB
  • scripts/gmail-drafts.js 5 KB
  • scripts/gmail-every-paywall-cleanup.js 5 KB
  • scripts/gmail-filters.js 5 KB
  • scripts/gmail-forward.js 2 KB
  • scripts/gmail-labels.js 4 KB
  • scripts/gmail-read.js 3 KB
  • scripts/gmail-search.js 2 KB
  • scripts/gmail-send.js 2 KB
  • scripts/manage-accounts.js 3 KB
  • scripts/migrate-tokens.js 2 KB
  • scripts/auth/auth-utils.js 7 KB
  • scripts/auth/setup-oauth.js 5 KB

Versions

The database has no other skills named gmail-skill.

Database snapshot: 13.11.2026 · package version b014aa1af87e (SHA-256 digest of the entire package)

Downloads in the last 30 days: 2 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100gmail
    Interact with Gmail - search emails, read messages, send emails, create drafts, and manage labels. Use when user asks to: search email, read email, send email, create email draft, mark as read, archive email, star email, or manage Gmail labels. Lightweight alternative to full…
  • 90gws-gmail
    Google Gmail CLI operations via gws. Use when users need to list emails, read messages, send email, manage labels, drafts, attachments, batch operations, or trash messages. Triggers: gmail, email, inbox, send email, mail, labels, archive, trash, drafts, attachments.
  • 100gmail
    Gmail API integration with managed OAuth. Read, send, and manage emails, threads, labels, and drafts. Use this skill when users want to interact with Gmail. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
  • 100gmail
    Gmail API integration with managed OAuth. Read, send, and manage emails, threads, labels, and drafts. Use this skill when users want to interact with Gmail. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
  • 100gmail
    This skill should be used when searching, fetching, or downloading emails from Gmail. Use for queries like "search Gmail for...", "find emails from John", "show unread emails", "emails about project X", or "download attachment from email".
  • 100gws-gmail
    Gmail (Google Workspace):通过 gws CLI 发送、阅读、回复、转发、整理 Gmail 邮件,以及监听新邮件推送。Use when user wants to send/read/reply/forward/triage/watch Gmail messages, manage labels/drafts/threads, or operate on Google Workspace Gmail. Do not use for Feishu/Lark mail (use lark-mail instead).

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.