gmail
Skill387 starsChanged 5 months agoMITView on GitHub
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".
- Reads credentials
- Installs packages
16 other projects use a version of this.
Adopted by
Most recently taken up by
- obra/muse-skillstheir own version, first seen Sep 26, 2026
- jacobwell/muse-skillstheir own version, first seen Sep 25, 2026
- tylerprogramming/claude-skillstheir own version, first seen Aug 9, 2026
- vellum-ai/vellum-assistanttheir own version, first seen Jul 8, 2026
- sanjay3290/ai-skillstheir own version, first seen Jul 6, 2026
- hsigstad/research-kittheir own version, first seen Jul 5, 2026
Used with
Projects with it also use google_sheets and whatsapp.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Shugar86Skillgoogle_sheets
Google Sheets read/write integration
Also in 3 projects that use this
aviz85Skillwhatsapp
WhatsApp automation (Green API primary, WAHA fallback). Use for: send/receive messages, send voice/images/files, retrieve incoming messages (text, voice, images), transcribe voice messages. WAME = 'WhatsApp ME' = send me by WhatsApp.
Also in 3 projects that use this
Other versions16 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 16
- vellum-ai/vellum-assistant★ 1.4ksame name
- sanjay3290/ai-skills★ 429same name
- refly-ai/refly-skills★ 203same name
- earlyaidopters/claudeclaw★ 172same name
- hyperfx-ai/marketing-skills★ 94same name
- aviz85/claude-skills-library★ 49same name
- AbdullahMalik17/malikclaw★ 16same name
- obra/muse-skills★ 14same name
- jacobwell/muse-skills★ 8same name
- jakeefr/claude-agentic-os★ 4same name
6 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository104 other files it gives its agents.
- automation-advisor/CLAUDE.mdCLAUDE.md
- agency-docs-updaterSkill
- agency-meetup-publishSkill
- agency-socialsSkill
- agent-cliSkill
- app-releaseSkill
- automation-advisorSkill
- balancedSkill
- brand-agencySkill
- browser-mateSkill
- browsing-historySkill
- chrome-historySkill
- coaching-session-summarizerSkill
- codexSkill
- cognitive-toolkitSkill
- context-builderSkill
- cull-release-checkSkill
- cull-release-prepareSkill
- cull-release-publishSkill
- cull-release-recoverSkill
- cull-releaseSkill
- cull-release-verifySkill
- cullSkill
- daydreamSkill
- decision-toolkitSkill
- deep-researchSkill
- design-tokensSkill
- doctorgSkill
- ecosystemSkill
- elevenlabs-ttsSkill
- elimination-researchSkill
- fathomSkill
- feature-factorySkill
- firecrawl-researchSkill
- font-featuresSkill
- github-gistSkill
- google-image-searchSkill
- gpt-image-2Skill
- granolaSkill
- gwsSkill
- health-dataSkill
- i18n-studioSkill
- init-tauri-appSkill
- init-xcode-appSkill
- insight-extractorSkill
- jtbdSkill
- lab-retroSkill
- learning-vaultSkill
- linearSkill
- llm-cliSkill
- local-modelsSkill
- meeting-prepSkill
- meeting-processorSkill
- metaSkill
- name-auditionSkill
- nano-bananaSkill
- nielsen-heuristicsSkill
- pdf-generationSkill
- peer-agent-collaborationSkill
- presentation-generatorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 15 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Search and fetch emails via Gmail API with flexible query options and output formats.
- Distinctive: line 29
Search for "Gmail API"
- Distinctive: line 54
Note: Test tokens expire after 7 days.
- Distinctive: line 149
Search emails with free-text query or filters:
- Very specific: line 235
Add --json flag for structured output:
“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
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 setupObtaining Gmail API Credentials
1. Create Google Cloud Project
- Go to console.cloud.google.com
- Click project dropdown -> "New Project"
- Name it (e.g., "Gmail Agent Skill") -> Create
2. Enable Gmail API
- Navigate to "APIs & Services" -> "Library"
- Search for "Gmail API"
- Click it and press "Enable"
3. Configure OAuth Consent Screen
- Go to "OAuth consent screen" (left sidebar)
- Choose "External" user type
- Fill in required fields:
- App name: Gmail Agent Skill
- User support email: your email
- Developer email: your email
- Click "Save and Continue", skip Scopes
- On "Test users" page, add your Gmail address
- Complete all steps
4. Publish the Test App
Important: Without this step, you'll get "Error 403: access_denied".
- Go back to "OAuth consent screen"
- Under "Publishing status", click "Publish App"
- 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
- Go to "Credentials" (left sidebar)
- Click "Create Credentials" -> "OAuth client ID"
- Select "Desktop app" as application type
- Name it (e.g., "Gmail Agent Client")
- Click "Create"
6. Get Your Credentials
- Client ID will be displayed - copy it
- Client Secret: Click the download icon or view details to get the secret
7. Save Credentials
Create ~/.gmail_credentials/credentials.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
python3 scripts/gmail_search.py authThis opens a browser. Click through the "unverified app" warning ("Advanced" -> "Go to Gmail Agent Skill"), approve access, and you're ready.
Quick Start
# 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" --unreadCommands
Setup
Check configuration status:
python3 scripts/gmail_search.py setup
python3 scripts/gmail_search.py setup --jsonAuthenticate
Authenticate with Gmail (opens browser for OAuth):
python3 scripts/gmail_search.py authScope
View or change API permission scope:
# 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 fullAvailable scopes:
readonly- Read emails only (default, recommended)modify- Read + modify labels, mark read/unreadfull- Full access including delete
Search
Search emails with free-text query or filters:
# 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" --jsonDownload Attachments
Download attachments from a specific message:
# 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 --jsonGet message ID from search results (shown in output).
Labels
List all available Gmail labels:
python3 scripts/gmail_search.py labels
python3 scripts/gmail_search.py labels --jsonOutput Formats
Markdown (default)
# 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:
[
{
"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:
| Operator | Example | Description |
from: | from:john@example.com | From specific sender |
to: | to:team@company.com | To specific recipient |
subject: | subject:meeting | In subject line |
label: | label:work | Has specific label |
has:attachment | has:attachment | Has attachments |
filename: | filename:pdf | Attachment filename |
is:unread | is:unread | Unread messages |
is:starred | is:starred | Starred messages |
after: | after:2024/01/01 | After date |
before: | before:2024/12/31 | Before date |
newer_than: | newer_than:7d | Within last N days |
older_than: | older_than:1m | Older than N months |
in: | in:inbox | In specific folder |
OR | from:john OR from:jane | Either condition |
- | -label:spam | Exclude |
"" | "exact phrase" | Exact match |
Example User Requests
| User says | Command |
| "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
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlibFiles
~/.gmail_credentials/credentials.json- OAuth client credentials~/.gmail_credentials/token.pickle- Cached auth token~/.gmail_credentials/scope.txt- Current scope setting
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

