Agent skill

Gmail

by glebis in glebis/claude-skills

This skill should be used when searching, fetching, or downloading emails from Gmail.

MITAuto-check passedProductivity & Automation

Install Gmail

skills CLI
$ npx skills add glebis/claude-skills --skill gmail -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install glebis/claude-skills gmail --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/glebis/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/gmail .claude/skills/gmail && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gmail
GitHub stars
389
Used in
1 other repo
Token cost
~2.1k tokens
SKILL.md length
564 words
Files
4 (incl. scripts)
Skills in repo
91
Repo updated
First seen
Licence
MIT

At a glance

This skill should be used when searching, fetching, or downloading emails from Gmail.

  • Works in 8 steps: Create Google Cloud Project → Enable Gmail API → Configure OAuth Consent Screen → …
  • Queries like search Gmail for...
  • SKILL.md covers Prerequisites, Quick Start, Commands and Output Formats, plus 4 more sections
  • Runs Python scripts from its folder; calls python3 and pip; reaches accounts.google.com and oauth2.googleapis.com

What it does

Gmail is an agent skill from glebis/claude-skills. 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".

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts (for example `.claude-plugin/plugin.json`, `README.md` and `scripts/gmail_search.py`).

It sits in Productivity & Automation, covering Email management. It works with Gmail. The repository describes itself as: Collection of Claude Code skills for enhanced AI workflows. The licence is MIT.

When your agent uses it

  • Queries like search Gmail for...
  • Find emails from John
  • Show unread emails
  • Emails about project X

Example prompts

  • “search Gmail for...”
  • “find emails from John”
  • “show unread emails”
  • “/gmail”

Requirements

  • Python 3
  • A credential in YOUR_CLIENT_SECRET

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Create Google Cloud Project
  2. Enable Gmail API
  3. Configure OAuth Consent Screen
  4. Publish the Test App
  5. Create OAuth Credentials
  6. Get Your Credentials
  7. Save Credentials
  8. Authenticate

What it can do on your machine

Read from SKILL.md and the folder at commit 7524dff. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • accounts.google.com
    • oauth2.googleapis.com

    Also links to:

    • console.cloud.google.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gmail loads about 2.1k tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 564 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from glebis/claude-skills at commit 7524dff, republished under its MIT licence (© glebis). 564 words, ~2,112 tokens.

Download SKILL.mdSave it as .claude/skills/gmail/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
gmail
description
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".

Gmail Search Skill

Search and fetch emails via Gmail API with flexible query options and output formats.

Prerequisites

Credentials must be configured in ~/.gmail_credentials/. Run setup to check status:

bash
python3 scripts/gmail_search.py setup
Obtaining Gmail API Credentials
1. Create Google Cloud Project
  1. Go to console.cloud.google.com
  2. Click project dropdown -> "New Project"
  3. Name it (e.g., "Gmail Agent Skill") -> Create
2. Enable Gmail API
  1. Navigate to "APIs & Services" -> "Library"
  2. Search for "Gmail API"
  3. Click it and press "Enable"
  1. Go to "OAuth consent screen" (left sidebar)
  2. Choose "External" user type
  3. Fill in required fields:
    • App name: Gmail Agent Skill
    • User support email: your email
    • Developer email: your email
  4. Click "Save and Continue", skip Scopes
  5. On "Test users" page, add your Gmail address
  6. Complete all steps
4. Publish the Test App

Important: Without this step, you'll get "Error 403: access_denied".

  1. Go back to "OAuth consent screen"
  2. Under "Publishing status", click "Publish App"
  3. Confirm the dialog

This keeps the app in test mode (not production) but allows your test users to authenticate. You'll see an "unverified app" warning during login - click "Advanced" -> "Go to Gmail Agent Skill (unsafe)" to proceed.

Note: Test tokens expire after 7 days. Production requires Google verification.

5. Create OAuth Credentials
  1. Go to "Credentials" (left sidebar)
  2. Click "Create Credentials" -> "OAuth client ID"
  3. Select "Desktop app" as application type
  4. Name it (e.g., "Gmail Agent Client")
  5. Click "Create"
6. Get Your Credentials
  1. Client ID will be displayed - copy it
  2. Client Secret: Click the download icon or view details to get the secret
7. Save Credentials

Create ~/.gmail_credentials/credentials.json:

json
{
  "installed": {
    "client_id": "YOUR_CLIENT_ID",
    "client_secret": "YOUR_CLIENT_SECRET",
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://oauth2.googleapis.com/token",
    "redirect_uris": ["http://localhost"]
  }
}
8. Authenticate
bash
python3 scripts/gmail_search.py auth

This opens a browser. Click through the "unverified app" warning ("Advanced" -> "Go to Gmail Agent Skill"), approve access, and you're ready.

Quick Start

bash
# Check setup status
python3 scripts/gmail_search.py setup

# Authenticate (opens browser)
python3 scripts/gmail_search.py auth

# Search emails
python3 scripts/gmail_search.py search "meeting notes"

# Search with filters
python3 scripts/gmail_search.py search --from "boss@company.com" --unread

Commands

Setup

Check configuration status:

bash
python3 scripts/gmail_search.py setup
python3 scripts/gmail_search.py setup --json
Authenticate

Authenticate with Gmail (opens browser for OAuth):

bash
python3 scripts/gmail_search.py auth
Scope

View or change API permission scope:

bash
# View current scope
python3 scripts/gmail_search.py scope

# Change scope (requires re-auth)
python3 scripts/gmail_search.py scope --set readonly
python3 scripts/gmail_search.py scope --set modify
python3 scripts/gmail_search.py scope --set full

Available scopes:

  • readonly - Read emails only (default, recommended)
  • modify - Read + modify labels, mark read/unread
  • full - Full access including delete
Show full SKILL.md (224 more words)Show less

Search emails with free-text query or filters:

bash
# Free-text search (uses Gmail search syntax)
python3 scripts/gmail_search.py search "project deadline"
python3 scripts/gmail_search.py search "from:john@example.com subject:invoice"

# Using helper flags
python3 scripts/gmail_search.py search --from "john@example.com"
python3 scripts/gmail_search.py search --to "me@example.com"
python3 scripts/gmail_search.py search --subject "Weekly Report"
python3 scripts/gmail_search.py search --label "INBOX"
python3 scripts/gmail_search.py search --label "work"

# Date filters (YYYY/MM/DD format)
python3 scripts/gmail_search.py search --after 2024/01/01
python3 scripts/gmail_search.py search --before 2024/12/31
python3 scripts/gmail_search.py search --after 2024/01/01 --before 2024/06/30

# Status filters
python3 scripts/gmail_search.py search --unread
python3 scripts/gmail_search.py search --starred
python3 scripts/gmail_search.py search --has-attachment

# Combined filters
python3 scripts/gmail_search.py search "invoice" --from "billing@" --has-attachment --after 2024/01/01

# Limit results
python3 scripts/gmail_search.py search "meeting" --limit 50

# Include full body (default shows snippet only)
python3 scripts/gmail_search.py search "contract" --full

# Include attachment info
python3 scripts/gmail_search.py search --has-attachment --attachments

# JSON output
python3 scripts/gmail_search.py search "project" --json
Download Attachments

Download attachments from a specific message:

bash
# Download to default location (~/Downloads/gmail_attachments/)
python3 scripts/gmail_search.py download MESSAGE_ID

# Download to custom directory
python3 scripts/gmail_search.py download MESSAGE_ID --output /path/to/folder

# JSON output
python3 scripts/gmail_search.py download MESSAGE_ID --json

Get message ID from search results (shown in output).

Labels

List all available Gmail labels:

bash
python3 scripts/gmail_search.py labels
python3 scripts/gmail_search.py labels --json

Output Formats

Markdown (default)
markdown
# Gmail Search Results (3 messages)

## Weekly Report
**From:** boss@company.com
**To:** me@example.com
**Date:** Mon, 25 Nov 2024 10:00:00 +0000
**ID:** `18abc123def`

> Here's the weekly report summary...

---
JSON

Add --json flag for structured output:

json
[
  {
    "id": "18abc123def",
    "thread_id": "18abc123def",
    "from": "boss@company.com",
    "to": "me@example.com",
    "subject": "Weekly Report",
    "date": "Mon, 25 Nov 2024 10:00:00 +0000",
    "snippet": "Here's the weekly report summary...",
    "labels": ["INBOX", "UNREAD"]
  }
]

Gmail Search Syntax

The skill supports Gmail's native search syntax in free-text queries:

OperatorExampleDescription
from:from:john@example.comFrom specific sender
to:to:team@company.comTo specific recipient
subject:subject:meetingIn subject line
label:label:workHas specific label
has:attachmenthas:attachmentHas attachments
filename:filename:pdfAttachment filename
is:unreadis:unreadUnread messages
is:starredis:starredStarred messages
after:after:2024/01/01After date
before:before:2024/12/31Before date
newer_than:newer_than:7dWithin last N days
older_than:older_than:1mOlder than N months
in:in:inboxIn specific folder
ORfrom:john OR from:janeEither condition
--label:spamExclude
"""exact phrase"Exact match

Example User Requests

User saysCommand
"Search Gmail for meeting notes"search "meeting notes"
"Find emails from John"search --from "john"
"Show unread emails"search --unread
"Emails about the project from last month"search "project" --after 2024/10/01
"Invoices with attachments"search "invoice" --has-attachment
"Read the full email about contract"search "contract" --full --limit 1
"Download attachments from that email"download MESSAGE_ID
"What labels do I have?"labels
"Starred emails from boss"search --from "boss" --starred
"Is Gmail configured?"setup

Dependencies

bash
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib

Files

  • ~/.gmail_credentials/credentials.json - OAuth client credentials
  • ~/.gmail_credentials/token.pickle - Cached auth token
  • ~/.gmail_credentials/scope.txt - Current scope setting

© glebis, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts) in gmail of glebis/claude-skills.

  • SKILL.md
  • .claude-plugin/plugin.json
  • README.md
  • scripts/gmail_search.py

Open the folder on GitHubat commit 7524dff

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in glebis/claude-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Gmail next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gmail compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gmail this skillglebis/claude-skills3891 repos~2.1kAutomated safety check: PassMIT
Career-Ops Gmail Lead Plugincareer-ops-hq/career-ops74k—~233Automated safety check: NotesMIT
Gmailteam-attention/plugins-for-claude-natives827—~967Automated safety check: PassMIT
Connect Apps with ComposioComposioHQ/awesome-claude-skills77k3 repos~557Automated safety check: PassNone
Gmail Emailopen-gitagent/gitagent710—~235Automated safety check: NotesMIT
Gmclibadlogic/pi-skills2.6k1 repos~470Automated safety check: PassMIT

Similar skills

  • Career-Ops Gmail Lead Plugin

    career-ops-hq/career-ops

    Pulls job leads from a Gmail label into the career-ops pipeline, extracting job URLs from DMARC-passing emails and de-duplicating against existing leads.

    74k GitHub stars~233 tokensUpdated today
    Productivity & AutomationAuto-check: notes
  • Gmail

    team-attention/plugins-for-claude-natives

    This skill should be used when the user asks to "check email", "read emails", "send email", "reply to email", "search inbox", or manages Gmail.

    827 GitHub stars~967 tokensUpdated 5 mo ago
    Productivity & AutomationAuto-check passed
  • Connect Apps with Composio

    ComposioHQ/awesome-claude-skills

    Connects an agent to 1000+ external apps through the Composio Tool Router plugin, so it can actually send emails, create issues and post messages instead of only drafting them.

    77k GitHub starsUsed in 3 repos~557 tokens
    Productivity & AutomationAuto-check passed
  • Gmail Email

    open-gitagent/gitagent

    Send emails via Gmail SMTP using App Password authentication.

    710 GitHub stars~235 tokensUpdated 1 mo ago
    Productivity & AutomationAuto-check: notes
  • Gmcli

    badlogic/pi-skills

    Gmail CLI for searching emails, reading threads, sending messages, managing drafts, and handling labels/attachments.

    2.6k GitHub starsUsed in 1 repo~470 tokens
    Productivity & AutomationAuto-check passed
  • Zele

    remorses/zele

    zele is a multi-account email and calendar CLI for Gmail, IMAP/SMTP (Fastmail, Outlook, any provider), and Google Calendar.

    299 GitHub stars~1.5k tokensUpdated today
    Productivity & AutomationAuto-check passed

More from glebis/claude-skills

All 91 skills in this repo
  • Runs a human-first workflow for labeling PII spans in a transcript, then scores inter-annotator agreement and drafts an adjudicated gold set.

    389 GitHub stars~1.3k tokensUpdated 11 days ago
    Auto-check passed
  • Automates a dedicated, logged-in Chrome instance per profile without ever closing the user's own open tabs or browser windows.

    389 GitHub stars~973 tokensUpdated 11 days ago
    Auto-check passed
  • Deep Research

    glebis/claude-skills

    This skill should be used when conducting comprehensive research on any topic using the OpenAI Deep Research API.

    389 GitHub stars~2.6k tokensUpdated 11 days ago
    Auto-check: notes
  • Elimination Research

    glebis/claude-skills

    This skill should be used for elimination-style research where the user wants to choose from a shortlist of products, tools, services, vendors, or other options using explicit criteria, numeric…

    389 GitHub stars~1.6k tokensUpdated 11 days ago
    Auto-check passed
  • Narrated HTML Presentations

    glebis/claude-skills

    Generates a self-contained HTML presentation with article and slides modes, ElevenLabs voiceover narration and optional GPT Image 2 illustrations.

    389 GitHub stars~2.3k tokensUpdated 11 days ago
    Auto-check: notes
  • Writes fictional but realistic coaching or therapy session transcripts for evals, demos and few-shot examples, in several modalities and export formats.

    389 GitHub stars~2.9k tokensUpdated 11 days ago
    Auto-check passed

Works with

Questions about Gmail

What does Gmail do?

This skill should be used when searching, fetching, or downloading emails from Gmail. Gmail is an agent skill from glebis/claude-skills. This skill should be used when searching, fetching, or downloading emails from Gmail.

When should I use Gmail?

Gmail fits situations like: queries like search Gmail for..; find emails from John; show unread emails; emails about project X.

How do I install Gmail in Claude Code?

Run `npx skills add glebis/claude-skills --skill gmail -a claude-code`. Or copy the skill folder (gmail in glebis/claude-skills) into .claude/skills/gmail in your project. Claude Code loads it when a task matches its description.

How do I install Gmail in Codex?

Run `npx skills add glebis/claude-skills --skill gmail -a codex`. Or copy the skill folder (gmail in glebis/claude-skills) into .agents/skills/gmail in your project. Codex loads it when a task matches its description.

Can I use Gmail in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add glebis/claude-skills --skill gmail -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gmail, .gemini/skills/gmail, .github/skills/gmail and .opencode/skills/gmail in your project.

What does Gmail need to run?

Going by SKILL.md and its folder, Gmail needs Python for the scripts in its folder and the command-line tools its instructions call (python3 and pip). Our summary lists: Python 3; A credential in YOUR_CLIENT_SECRET.

Does Gmail access the network?

SKILL.md names 3 domains. In commands or code: accounts.google.com and oauth2.googleapis.com; the agent is likely to contact these when it follows the instructions. As links in the text: console.cloud.google.com. This is read from the text; nothing was executed.

Is Gmail safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Gmail use?

Gmail is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gmail use?

About 2.1k tokens (SKILL.md is roughly 8.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Gmail?

Skills that share tags, products or a category with Gmail: Career-Ops Gmail Lead Plugin (career-ops-hq/career-ops, 74k stars), Gmail (team-attention/plugins-for-claude-natives, 827 stars), Connect Apps with Composio (ComposioHQ/awesome-claude-skills, 77k stars) and Gmail Email (open-gitagent/gitagent, 710 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gmail?

glebis (a GitHub user) maintains it in glebis/claude-skills, which has 389 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on September 26, 2026.

Source: glebis/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.