google-gmail
Read, search, triage, label, archive and send Gmail mail / threads / labels / attachments via the Gmail v1 REST API.
Skill by acedatacloud
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/acedatacloud-google-gmail
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/google-gmail
What's inside
- Skill name
google-gmail- Description
- Read, search, triage, label, archive and send Gmail mail / threads / labels / attachments via the Gmail v1 REST API. Use when the user mentions Gmail, "my inbox", unread mail, recent emails from someone, summarising a thread, downloading an attachment, finding mail by label / query, archiving or labelling a thread, or drafting and sending a reply / new message.
- License
- Apache-2.0
- Metadata
- author: acedatacloud · version: 1.2
- Instructions
- 445 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (1)
- SKILL.md
SKILL.md (first lines)
Drive Gmail via `curl + jq`. The user's OAuth bearer token is in
`$GOOGLE_GMAIL_TOKEN`; every call needs it as
`Authorization: Bearer $GOOGLE_GMAIL_TOKEN`. At minimum the token
carries `gmail.readonly` plus the identity scopes
(`openid email profile`); if the user opted in to write at install
time it also carries `gmail.modify` (label / archive / trash) and/or
`gmail.send` (compose + send). Always assume the narrowest scope
until a write actually fails — don't ask Google for new scopes from
here.
The Gmail API returns standard JSON; failures surface as
`{"error": {"code": 401|403|..., "message": "..."}}` — show that
error verbatim. `401` means the token expired (re-install). `403
insufficientPermissions` means the user didn't grant the write scope
this call needs — explain which scope is missing and suggest
re-installing the connector with the matching write box checked.
**Before any destructive write** (trashing a thread, sending an email)
show the user the exact target / draft and ask them to confirm. Don't
fan out across many messages without an explicit go-ahead.
**Always start with `users/me/profile`** to confirm the connection works
AND learn which Gmail account you're operating against. Mailbox payloads
can be huge — fetch metadata first, only `format=full` when the user
actually wants the body of a specific message.
## Optional: Google Workspace CLI (`gws`) for outbound mail
[`gws`](https://github.com/googleworkspace/cli) is Google's official CLI
(not officially supported — community-maintained on the `googleworkspace`
org). It dynamically builds its command surface from Google's Discovery
Document, exits non-zero on API errors, and ships hand-crafted helper
commands (prefixed `+`) that handle the message-encoding boilerplate.
**Use `gws` for sending mail.** The Gmail REST API requires every
outbound message to be a fully-formed RFC 822 message, base64url-encoded
into a `raw` field, with reply / forward threading carried in
`In-Reply-To` / `References` / `threadId`. The `+send / +reply /
+reply-all / +forward` helpers do all of that for you. **For everything
else** (read, search, labels, attachments) `gws` and curl are equivalent,
so the curl recipes below are usually shorter — stay on those.
### Install
```sh
npm install -g @googleworkspace/cli # or: brew install googleworkspace-cli
# Pre-built binaries also at https://github.com/googleworkspace/cli/releases
gws --version
```
### Auth
`gws` reads its OAuth bearer token from the `GOOGLE_WORKSPACE_CLI_TOKEN`
environment variable. The Gmail token used in this skill is in
`$GOOGLE_GMAIL_TOKEN`, so re-export it once at the top of every shell
block that calls `gws`:
```sh
export GOOGLE_WORKSPACE_CLI_TOKEN="$GOOGLE_GMAIL_TOKEN"
```
You can confirm the active account with `gws gmail users getProfile
--params '{"userId":"me"}'`.
### Send / reply / forward
```sh
# New message
gws gmail +send \
--to alice@example.com \
--cc team@example.com \
--subject "Q1 status" \
--body "Numbers attached."
# Reply (handles threadId, In-Reply-To, References automatically;
# To is the original sender, Subject gets the "Re: " prefix)
gws gmail +reply --message-id MSG_ID --body "Thanks — looks good."
# Reply-all
gws gmail +reply-all --message-id MSG_ID --body "+1"
# Forward to new recipients (preserves the original message body
# inline; original headers are summarised in the forward block)
gws gmail +forward --message-id MSG_ID --to bob@example.com
```
Each helper exits with a non-zero status and a JSON error on stderr if
Google rejects the request — surface that error verbatim. `+send` /
`+reply` need the `gmail.send` scope; if the user only granted
`gmail.readonly` you'll see `403 insufficientPermissions` and should ask
them to re-install the connector with the send box checked.
All the read / list / search / label / attachment recipes below are
intentionally **not** rewritten to `gws` — a one-line `curl ... | jq` is
shorter and easier to compose with shell pipelines.
## Recipes
### Verify auth (always run first)
```sh
curl -sS -H "Authorization: Bearer $GOOGLE_GMAIL_TOKEN" \
"https://gmail.googleapis.com/gmail/v1/users/me/profile" \
| jq '{email: .emailAddress, totalMessages, totalThreads, historyId}'
```
### List recent unread inbox
```sh
curl -sS -H "Authorization: Bearer $GOOGLE_GMAIL_TOKEN" \
--get "https://gmail.googleapis.com/gmail/v1/users/me/messages" \
--data-urlencode 'q=is:unread in:inbox newer_than:7d' \
--data-urlencode 'maxResults=20' \
| jq '.messages // [] | .[]'
```
**Always default `.messages` to `[]`** — Gmail's `messages.list` omits the
field entirely when there are zero matches (the response is just
`{"resultSizeEstimate": 0}`), so a bare `.messages[]` will crash jqFrom AceDataCloud/Skills, Apache-2.0.
More from AceDataCloud/Skills
- 0.646score
didi-ride
acedatacloud
通过滴滴出行 MCP 打车、查价、查询订单、取消订单、规划路线(驾车/公交/步行/骑行)和搜索地点。Use when the user mentions 滴滴, 打车, 叫车, 回家/上班要打车, 查一下从 A 到 B 多少钱/怎么走, 查询订单, 司机在哪/多久到, 预约叫车, 路线规划, DiDi…
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
ghost
acedatacloud
Create drafts and publish or update posts on a self-hosted Ghost site through the official Admin API.
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
apple-notes
acedatacloud
Manage Apple Notes on macOS — list, search, read, create, append, move, delete, and export notes, and manage folders.
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
cto51
acedatacloud
Read the connected 51CTO 博客 (blog.51cto.com) account and create Markdown article drafts with the user's own login cookies (BYOC).
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
discord
acedatacloud
Work with the user's Discord account.
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
bilibili
acedatacloud
Read and publish 专栏 articles on Bilibili (bilibili.com) with the user's own login cookies (BYOC) — list their published articles with view/like/comment stats…
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
capability-spotlight-video
acedatacloud
Plan and submit a recurring series of diverse, premium Ace Data Cloud sales films.
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
cnblogs
acedatacloud
Publish, update and read CNBlogs (博客园) posts with a personal access token through the API used by the official vscode-cnb client.
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
bluesky
acedatacloud
Publish (with optional images), delete and read your own posts on Bluesky via the AT Protocol (XRPC).
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
csdn
acedatacloud
Read and publish on CSDN (blog.csdn.net) with the user's own login cookies (BYOC) — list their published articles with view/like/comment stats, inspect one…
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
acedatacloud
acedatacloud
Manage your AceDataCloud account through the management API (platform.acedata.cloud).
SkillAFreshness: A★ 17Claude Code +9 - 0.643score
discordbot
acedatacloud
List channels, read recent messages, send channel messages, and send a single user-initiated DM on Discord using the user's own bot via the Discord REST API.
SkillAFreshness: A★ 17Claude Code +9
Signals
- Stars
- 17
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Jul 28, 2026 (3 months ago)
- Last release
- Oct 23, 2026 (5 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.2
- License
- Apache-2.0
- Repository
- github.com/AceDataCloud/Skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from acedatacloud
- 0.646score
acedatacloud
acedatacloud
Manage your AceDataCloud account through the management API (platform.acedata.cloud).
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
apple-notes
acedatacloud
Manage Apple Notes on macOS — list, search, read, create, append, move, delete, and export notes, and manage folders.
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
cnblogs
acedatacloud
Publish, update and read CNBlogs (博客园) posts with a personal access token through the API used by the official vscode-cnb client.
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
bilibili
acedatacloud
Read and publish 专栏 articles on Bilibili (bilibili.com) with the user's own login cookies (BYOC) — list their published articles with view/like/comment stats…
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
capability-spotlight-video
acedatacloud
Plan and submit a recurring series of diverse, premium Ace Data Cloud sales films.
SkillAFreshness: A★ 17Claude Code +9 - 0.646score
bluesky
acedatacloud
Publish (with optional images), delete and read your own posts on Bluesky via the AT Protocol (XRPC).
SkillAFreshness: A★ 17Claude Code +9
Cite this page
google-gmail skill. Agent Mart. https://agentmart.dev/skills/acedatacloud-google-gmail (last updated 2026-10-24)