gmail
Skill0 starsChanged 8 months agoMITView on GitHub
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).
- Reads credentials
28 other projects use a version of this.
Adopted by
Most recently taken up by
- Floppa2003/skillstheir own version, first seen Nov 16, 2026
- pailinglo/claude-skillstheir own version, first seen Nov 16, 2026
- sidmanale643/pekka-bottheir own version, first seen Nov 8, 2026
- codewhale-hq/codewhale-plugin-marketplacetheir own version, first seen Nov 8, 2026
- chnlich/charlie-bottheir own version, first seen Nov 1, 2026
- obra/muse-skillstheir own version, first seen Oct 13, 2026
Used with
Projects with it also use google_sheets, google-chat and 8 more.
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
antoniolgSkillgoogle-chat
Read Google Chat spaces/threads via the Chat API, create/refresh OAuth tokens, parse Gmail Chat URLs, and list spaces. Use when asked to look up or verify messages in Google Chat or when you need API access to Chat from the CLI.
Also in 3 projects that use this
kennyolofsson23-netizenSkillelevenlabs
ElevenLabs voice AI integration. Text-to-speech, speech-to-text, voice cloning, and audio processing via ElevenLabs API and MCP.
Also in 3 projects that use this
ansvisorSkillshopping
Checks product pages and feed for ChatGPT Shopping (US) and Google Shopping (EU).
Also in 3 projects that use this
0-shivSkilltiktok
TikTok Ads management skill -- audits campaigns, scores creatives, optimizes Spark Ads, Shop campaigns, targeting, bidding, pixel tracking, and generates reports. CPM 50-70% cheaper than Meta.
Also in 3 projects that use this
ourinesSkillforget
Delete saved knowledge from ~/.claude/learnings/ and optionally clean up knowledge graph.
Also in 3 projects that use this
Other versions28 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 28
- vellum-ai/vellum-assistant★ 1.5ksame name
- gemini-cli-extensions/workspace★ 646same name
- sanjay3290/ai-skills★ 452same name
- glebis/claude-skills★ 416same name
- refly-ai/refly-skills★ 204same name
- hyperfx-ai/marketing-skills★ 131same name
- AbdullahMalik17/malikclaw★ 22same name
- obra/muse-skills★ 20same name
- pbc-os/smb-starter-kit★ 10same name
- chnlich/charlie-bot★ 8same name
18 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 repository102 other files it gives its agents.
- skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- skills/file-search/CLAUDE.mdCLAUDE.md
- prompt-engineering-expertCLAUDE.md
- academic-deep-researchSkill
- agent-autonomy-kitSkill
- Agent BrowserSkill
- agent-team-orchestrationSkill
- ai-model-routerSkill
- ai-prompt-engineering-safety-reviewSkill
- analytics-trackingSkill
- api-design-principlesSkill
- architecture-patternsSkill
- audit-websiteSkill
- auto-updaterSkill
- better-auth-best-practicesSkill
- boost-promptSkill
- brainstormingSkill
- brave-searchSkill
- breakdown-feature-implementationSkill
- browser-useSkill
- calendarSkill
- canvas-designSkill
- capability-evolverSkill
- changelog-curatorSkill
- clawsecSkill
- code-reviewSkill
- computer-useSkill
- content-strategySkill
- copywritingSkill
- Data AnalysisSkill
- data-analystSkill
- debug-proSkill
- deep-research-proSkill
- discordSkill
- dispatching-parallel-agentsSkill
- doc-coauthoringSkill
- docker-essentialsSkill
- duckduckgo-searchSkill
- eastmoney_financial_dataSkill
- eastmoney_financial_searchSkill
- edge-ttsSkill
- elite-longterm-memorySkill
- email-sequenceSkill
- exa-web-search-freeSkill
- Excel / XLSXSkill
- executing-plansSkill
- file-searchSkill
- filesystemSkill
- find-skillsSkill
- firecrawlSkill
- geminiSkill
- git-essentialsSkill
- githubSkill
- slide-creatorSkill
- imap-smtp-emailSkill
- jike-publisherSkill
- last30daysSkill
- launch-strategySkill
- linkedinSkill
- markdown-converterSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 3 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 27 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 42
All requests require the Maton API key in the Authorization header:
- Very specific: line 129
If you have multiple Gmail connections, specify which one to use with the Maton-Connection header:
- Distinctive: line 141
If omitted, the gateway uses the default (oldest) active connection.
- Very specific: line 248
Use in the q parameter:
- Very specific: line 288
Use me as userId for the authenticated user
- Very specific: line 305
Check that the MATON_API_KEY environment variable is set:
- Distinctive: line 311
Verify the API key is valid by listing connections:
- Very specific: line 324
Ensure your URL path starts with google-mail.
“Common” is measured: kept by at least 6 in 10 of the 27 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
Access the Gmail API with managed OAuth authentication. Read, send, and manage emails, threads, labels, and drafts.
Quick Start
# List messages
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/google-mail/gmail/v1/users/me/messages?maxResults=10')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOFBase URL
https://gateway.maton.ai/google-mail/{native-api-path}Replace {native-api-path} with the actual Gmail API endpoint path. The gateway proxies requests to gmail.googleapis.com and automatically injects your OAuth token.
Authentication
All requests require the Maton API key in the Authorization header:
Authorization: Bearer $MATON_API_KEYEnvironment Variable: Set your API key as MATON_API_KEY:
export MATON_API_KEY="YOUR_API_KEY"Getting Your API Key
- Sign in or create an account at maton.ai
- Go to maton.ai/settings
- Copy your API key
Connection Management
Manage your Google OAuth connections at https://ctrl.maton.ai.
List Connections
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections?app=google-mail&status=ACTIVE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOFCreate Connection
python <<'EOF'
import urllib.request, os, json
data = json.dumps({'app': 'google-mail'}).encode()
req = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOFGet Connection
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOFResponse:
{
"connection": {
"connection_id": "21fd90f9-5935-43cd-b6c8-bde9d915ca80",
"status": "ACTIVE",
"creation_time": "2025-12-08T07:20:53.488460Z",
"last_updated_time": "2026-01-31T20:03:32.593153Z",
"url": "https://connect.maton.ai/?session_token=...",
"app": "google-mail",
"metadata": {}
}
}Open the returned url in a browser to complete OAuth authorization.
Delete Connection
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOFSpecifying Connection
If you have multiple Gmail connections, specify which one to use with the Maton-Connection header:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/google-mail/gmail/v1/users/me/messages')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Maton-Connection', '21fd90f9-5935-43cd-b6c8-bde9d915ca80')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOFIf omitted, the gateway uses the default (oldest) active connection.
API Reference
List Messages
GET /google-mail/gmail/v1/users/me/messages?maxResults=10With query filter:
GET /google-mail/gmail/v1/users/me/messages?q=is:unread&maxResults=10Get Message
GET /google-mail/gmail/v1/users/me/messages/{messageId}With metadata only:
GET /google-mail/gmail/v1/users/me/messages/{messageId}?format=metadata&metadataHeaders=From&metadataHeaders=Subject&metadataHeaders=DateSend Message
POST /google-mail/gmail/v1/users/me/messages/send
Content-Type: application/json
{
"raw": "BASE64_ENCODED_EMAIL"
}List Labels
GET /google-mail/gmail/v1/users/me/labelsList Threads
GET /google-mail/gmail/v1/users/me/threads?maxResults=10Get Thread
GET /google-mail/gmail/v1/users/me/threads/{threadId}Modify Message Labels
POST /google-mail/gmail/v1/users/me/messages/{messageId}/modify
Content-Type: application/json
{
"addLabelIds": ["STARRED"],
"removeLabelIds": ["UNREAD"]
}Trash Message
POST /google-mail/gmail/v1/users/me/messages/{messageId}/trashCreate Draft
POST /google-mail/gmail/v1/users/me/drafts
Content-Type: application/json
{
"message": {
"raw": "BASE64URL_ENCODED_EMAIL"
}
}Send Draft
POST /google-mail/gmail/v1/users/me/drafts/send
Content-Type: application/json
{
"id": "{draftId}"
}Get Profile
GET /google-mail/gmail/v1/users/me/profileQuery Operators
Use in the q parameter:
is:unread- Unread messagesis:starred- Starred messagesfrom:email@example.com- From specific senderto:email@example.com- To specific recipientsubject:keyword- Subject contains keywordafter:2024/01/01- After datebefore:2024/12/31- Before datehas:attachment- Has attachments
Code Examples
JavaScript
const response = await fetch(
'https://gateway.maton.ai/google-mail/gmail/v1/users/me/messages?maxResults=10',
{
headers: {
'Authorization': `Bearer ${process.env.MATON_API_KEY}`
}
}
);Python
import os
import requests
response = requests.get(
'https://gateway.maton.ai/google-mail/gmail/v1/users/me/messages',
headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'},
params={'maxResults': 10, 'q': 'is:unread'}
)Notes
- Use
meas userId for the authenticated user - Message body is base64url encoded in the
rawfield - Common labels:
INBOX,SENT,DRAFT,STARRED,UNREAD,TRASH - IMPORTANT: When using curl commands, use
curl -gwhen URLs contain brackets (fields[],sort[],records[]) to disable glob parsing - IMPORTANT: When piping curl output to
jqor other commands, environment variables like$MATON_API_KEYmay not expand correctly in some shell environments. You may get "Invalid API key" errors when piping.
Error Handling
| Status | Meaning |
| 400 | Missing Gmail connection |
| 401 | Invalid or missing Maton API key |
| 429 | Rate limited (10 req/sec per account) |
| 4xx/5xx | Passthrough error from Gmail API |
Troubleshooting: API Key Issues
- Check that the
MATON_API_KEYenvironment variable is set:
echo $MATON_API_KEY- Verify the API key is valid by listing connections:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOFTroubleshooting: Invalid App Name
- Ensure your URL path starts with
google-mail. For example:
- Correct:
https://gateway.maton.ai/google-mail/gmail/v1/users/me/messages - Incorrect:
https://gateway.maton.ai/gmail/v1/users/me/messages
Resources
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.

