Skip to content

Command-line Gmail skill for searching, reading, sending, drafting, and relabeling messages with standalone OAuth.

CCM score
63 of 100
skills.sh installs
486
GitHub stars
462
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers search, read, send, draft, label modification, and label listing through scripts/gmail.py and scripts/auth.py
  • Supports Gmail query operators such as from:, is:unread, newer_than:7d, and -is:starred, plus HTML bodies and send-from aliases
  • Stores OAuth tokens in the system keyring (Keychain, Windows Credential Locker, or Secret Service) and refreshes them automatically
  • Designed for Google Workspace accounts only, since personal Gmail accounts are not supported

Install

$ npx -y skills add sanjay3290/ai-skills --skill gmail -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Gmail

Lightweight Gmail integration with standalone OAuth authentication. No MCP server required.

⚠️ Requires Google Workspace account. Personal Gmail accounts are not supported.

First-Time Setup

Authenticate with Google (opens browser):

python scripts/auth.py login

Check authentication status:

python scripts/auth.py status

Logout when needed:

python scripts/auth.py logout

Commands

All operations via scripts/gmail.py. Auto-authenticates on first use if not logged in.

Search Emails

# Search with Gmail query syntax
python scripts/gmail.py search "from:someone@example.com is:unread"

# Search recent emails (no query returns all)
python scripts/gmail.py search --limit 20

# Filter by label
python scripts/gmail.py search --label INBOX --limit 10

# Include spam and trash
python scripts/gmail.py search "subject:important" --include-spam-trash

Read Email Content

# Get full message content
python scripts/gmail.py get MESSAGE_ID

# Get just metadata (headers)
python scripts/gmail.py get MESSAGE_ID --format metadata

Details

Repository
github.com/sanjay3290/ai-skills
Categories
Email & Messaging, Workflow Automation
License
Apache-2.0
First seen
Jun 3, 2026

Questions

What does the gmail skill let an agent do?

The gmail skill lets an agent search Gmail, read messages, send emails, create and send drafts, and manage labels. It can also mark messages as read or unread, archive them, and star or flag them as important. It uses standalone OAuth, so it does not need an MCP server.

Does the gmail skill work with a personal Gmail account?

No, the gmail skill requires a Google Workspace account, and personal Gmail accounts are not supported. First-time setup runs python scripts/auth.py login, which opens a browser for Google authentication. Tokens are then stored in the system keyring.

How do I install the gmail skill?

Run npx -y skills add sanjay3290/ai-skills --skill gmail -y in your project to install it. After that, the agent can search, read, send and label your Gmail messages. Authenticate once with the auth script before first use.

How does the gmail skill compare with other Email & Messaging skills?

The gmail skill sits in the Email & Messaging category, alongside to-questionnaire, lark-im and lark-mail. Its distinguishing feature is that it is a lightweight alternative to the full Google Workspace MCP server, using its own OAuth login.

More from sanjay3290/ai-skills

All 20

Similar to Gmail

More Email & Messaging