Skip to content

Gmail search, fetch, and attachment download via the Gmail API with scoped, configurable access.

CCM score
67 of 100
skills.sh installs
258
GitHub stars
416
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers search, message fetch, attachment download, label listing, and OAuth setup through a single scripts/gmail_search.py CLI
  • Supports Gmail query syntax plus helper flags for sender, recipient, subject, label, date range, unread, starred, and attachment filters
  • Enforces permission scopes of readonly by default, with modify and full available only through an explicit scope --set change and re-authentication
  • Designed for agents that need to answer mailbox questions or pull attachments, with Markdown or --json output

Install

$ npx -y skills add glebis/claude-skills --skill gmail -y

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

Files

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:

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"
3. Configure OAuth Consent Screen
  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".

Details

Repository
github.com/glebis/claude-skills
Category
Email & Messaging
First seen
Jun 3, 2026

Questions

What does the gmail skill let Claude Code do?

The gmail skill lets Claude search, fetch and download emails from Gmail through the Gmail API. It handles natural requests such as finding emails from a sender, showing unread emails, or downloading an attachment from a message.

What do I need to set up before using the gmail skill?

You need Gmail API credentials saved in a credentials.json file under your home directory, created in a Google Cloud project with the Gmail API enabled. After saving them, run the auth command once to sign in through the browser, and the setup command can confirm the status.

How do I install the gmail skill?

Run npx -y skills add glebis/claude-skills --skill gmail -y in a project to install it. The skill then lets the agent run Gmail searches with filters such as sender, unread status, date range and attachments.

Which skills lead the Email & Messaging category?

The gmail skill sits in the Email & Messaging category alongside to-questionnaire, lark-im, lark-mail, lark-event and lark-contact. Its distinct focus is reading and downloading Gmail messages with Gmail search syntax and attachment download.

More from glebis/claude-skills

All 22

Similar to Gmail

More Email & Messaging