gws-gmail-send — Claude Code skill: send Gmail email
A skill that teaches your agent to send Gmail from the terminal: recipients, subject, body, attachments and drafts.
npx skills add googleworkspace/cli --skill gws-gmail-send -a claude-codeWhat gws-gmail-send does
The skill hands the agent one command for outgoing mail: gws gmail +send. Three flags are required — --to, --subject and --body. The rest you add as needed.
SKILL.md holds a flag table, worked examples and a pointer to ../gws-shared/SKILL.md for auth, global flags and security rules. RFC 5322 formatting, MIME encoding and base64 are the command's problem, not yours. Attachments go through -a/--attach, the flag repeats, and the total size cap is 25MB. There is --cc and --bcc, --from for a send-as alias, --html for fragment markup without an ` wrapper, --draft to save instead of send, and --dry-run` to see the request first.
You need the gws binary and the shared skill file; if that file is missing, gws generate-skills writes it. This is a write command, so the agent is expected to confirm with you before it fires. Worth installing if your mail already runs through gws. For one message, the web UI is less setup.
What it helps with
- send a short email from the terminal without opening a browser
- park a reply as a Gmail draft with
--draft - attach two files and let the command deal with MIME and base64
- preview the outgoing request with
--dry-runbefore anything leaves - copy teammates in with
--ccand--bccin the same call
Example prompts for the agent
- Send an email to [email protected], subject Hello, body Hi Alice!
- Save that as a Gmail draft, do not send it yet.
- Attach report.pdf and data.csv and put [email protected] on cc.
How to install gws-gmail-send
1Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-gmail-send -a claude-code2Manually: put the files in place
~/.claude/skills/gws-gmail-send/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/gws-gmail-send/
1Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-gmail-send -a codex2Manually: put the files in place
.agents/skills/gws-gmail-send/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-gmail-send -a cursor2Manually: put the files in place
.cursor/skills/gws-gmail-send/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install googleworkspace/cli gws-gmail-send2Manually: put the files in place
.github/skills/gws-gmail-send/SKILL.md1Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-gmail-send -a gemini-cli2Platform CLI
gemini skills install https://github.com/googleworkspace/cli --path skills/gws-gmail-sendManually: put the files in place
.devin/skills/gws-gmail-send/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-gmail-send -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set95
The whole set →Similar
Questions about gws-gmail-send
How do I install gws-gmail-send in Claude Code?
Run npx skills add googleworkspace/cli --skill gws-gmail-send -a claude-code. The skill lands at ~/.claude/skills/gws-gmail-send/SKILL.md.
What does gws-gmail-send do?
It wraps gws gmail +send, which builds and sends a message through Gmail. Drafts, attachments and send-as aliases are covered too.
What do I need before using it?
The gws binary plus the shared ../gws-shared/SKILL.md file that carries the auth setup. If that file is absent, gws generate-skills creates it.
Source text
SKILL.md · Apache-2.0
---
name: gws-gmail-send
description: "Gmail: Send an email."
metadata:
version: 0.22.5
openclaw:
category: "productivity"
requires:
bins:
- gws
cliHelp: "gws gmail +send --help"
---
# gmail +send
> **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it.
Send an email
## Usage
```bash
gws gmail +send --to <EMAILS> --subject <SUBJECT> --body <TEXT>
```
## Flags
| Flag | Required | Default | Description |
|------|----------|---------|-------------|
| `--to` | ✓ | — | Recipient email address(es), comma-separated |
| `--subject` | ✓ | — | Email subject |
| `--body` | ✓ | — | Email body (plain text, or HTML with --html) |
| `--from` | — | — | Sender address (for send-as/alias; omit to use account default) |
| `--attach` | — | — | Attach a file (can be specified multiple times) |
| `--cc` | — | — | CC email address(es), comma-separated |
| `--bcc` | — | — | BCC email address(es), comma-separated |
| `--html` | — | — | Treat --body as HTML content (default is plain text) |
| `--dry-run` | — | — | Show the request that would be sent without executing it |
| `--draft` | — | — | Save as draft instead of sending |
## Examples
```bash
gws gmail +send --to [email protected] --subject 'Hello' --body 'Hi Alice!'
gws gmail +send --to [email protected] --subject 'Hello' --body 'Hi!' --cc [email protected]
gws gmail +send --to [email protected] --subject 'Hello' --body '<b>Bold</b> text' --html
gws gmail +send --to [email protected] --subject 'Hello' --body 'Hi!' --from [email protected]
gws gmail +send --to [email protected] --subject 'Report' --body 'See attached' -a report.pdf
gws gmail +send --to [email protected] --subject 'Files' --body 'Two files' -a a.pdf -a b.csv
gws gmail +send --to [email protected] --subject 'Hello' --body 'Hi!' --draft
```
## Tips
- Handles RFC 5322 formatting, MIME encoding, and base64 automatically.
- Use --from to send from a configured send-as alias instead of your primary address.
- Use -a/--attach to add file attachments. Can be specified multiple times. Total size limit: 25MB.
- With --html, use fragment tags (<p>, <b>, <a>, <br>, etc.) — no <html>/<body> wrapper needed.
- Use --draft to save the message as a draft instead of sending it immediately.
> [!CAUTION]
> This is a **write** command — confirm with the user before executing.
## See Also
- [gws-shared](../gws-shared/SKILL.md) — Global flags and auth
- [gws-gmail](../gws-gmail/SKILL.md) — All send, read, and manage email commands
© googleworkspace · Apache-2.0 · googleworkspace/cli