gws-gmail
Gmail skill for sending, reading, searching, labelling, and managing email via the gws CLI. Covers messages, threads, labels, drafts, filters, and inbox management.
Best use case
gws-gmail is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Gmail skill for sending, reading, searching, labelling, and managing email via the gws CLI. Covers messages, threads, labels, drafts, filters, and inbox management.
Teams using gws-gmail should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/gws-gmail/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How gws-gmail Compares
| Feature / Agent | gws-gmail | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Gmail skill for sending, reading, searching, labelling, and managing email via the gws CLI. Covers messages, threads, labels, drafts, filters, and inbox management.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Gmail (gws-gmail)
> **PREREQUISITE:** Read the `gws-shared` skill for auth, global flags, and security rules.
Manage Gmail using the `gws` CLI.
```bash
gws gmail <resource> <method> [flags]
```
## Quick Examples
```bash
# Get Gmail profile
gws gmail users getProfile --params '{"userId": "me"}'
# List inbox messages (10 most recent)
gws gmail users messages list \
--params '{"userId": "me", "labelIds": "INBOX", "maxResults": 10}'
# Search messages
gws gmail users messages list \
--params '{"userId": "me", "q": "from:boss@example.com is:unread"}'
# Get a message (full format)
gws gmail users messages get \
--params '{"userId": "me", "id": "MESSAGE_ID", "format": "full"}'
# Send an email (use +send helper for simplicity — see gws-gmail-send skill)
gws gmail users messages send \
--params '{"userId": "me"}' \
--json '{"raw": "<base64-encoded RFC 2822 message>"}'
# List labels
gws gmail users labels list --params '{"userId": "me"}'
# Create a label
gws gmail users labels create \
--params '{"userId": "me"}' \
--json '{"name": "Invoices", "labelListVisibility": "labelShow"}'
# Apply a label to a message
gws gmail users messages modify \
--params '{"userId": "me", "id": "MESSAGE_ID"}' \
--json '{"addLabelIds": ["LABEL_ID"]}'
# Archive a message (remove INBOX label)
gws gmail users messages modify \
--params '{"userId": "me", "id": "MESSAGE_ID"}' \
--json '{"removeLabelIds": ["INBOX"]}'
# Trash a message
gws gmail users messages trash \
--params '{"userId": "me", "id": "MESSAGE_ID"}'
# Create a draft
gws gmail users drafts create \
--params '{"userId": "me"}' \
--json '{"message": {"raw": "<base64-encoded RFC 2822 message>"}}'
# List threads
gws gmail users threads list \
--params '{"userId": "me", "q": "subject:\"Project Update\"", "maxResults": 5}'
# Get thread
gws gmail users threads get \
--params '{"userId": "me", "id": "THREAD_ID"}'
# Create a Gmail filter (auto-label)
gws gmail users settings filters create \
--params '{"userId": "me"}' \
--json '{"criteria": {"from": "newsletter@example.com"}, "action": {"addLabelIds": ["LABEL_ID"], "removeLabelIds": ["INBOX"]}}'
# Watch inbox for push notifications
gws gmail users watch \
--params '{"userId": "me"}' \
--json '{"topicName": "projects/my-project/topics/gmail-push", "labelIds": ["INBOX"]}'
```
## Helper Commands
| Command | Description |
|---------|-------------|
| `gws gmail +send` | Send an email (see `gws-gmail-send` skill) |
| `gws gmail +triage` | Show unread inbox summary |
| `gws gmail +reply` | Reply to a message (threading handled automatically) |
| `gws gmail +reply-all` | Reply-all to a message |
| `gws gmail +forward` | Forward a message |
| `gws gmail +watch` | Stream new emails as NDJSON |
## Gmail Query Syntax
```
is:unread Unread messages
is:starred Starred messages
from:user@example.com From a specific sender
to:user@example.com To a recipient
subject:invoice Subject contains word
has:attachment Has file attachments
larger:5M Larger than 5 MB
after:2026/01/01 Received after date
before:2026/03/01 Received before date
label:work Has label "work"
-label:spam Does not have label "spam"
```
## Key API Resources
### users.messages
`list`, `get`, `send`, `modify`, `trash`, `delete`, `batchModify`
### users.threads
`list`, `get`, `modify`, `trash`, `delete`
### users.labels
`list`, `get`, `create`, `update`, `delete`
### users.drafts
`list`, `get`, `create`, `update`, `send`, `delete`
### users.settings.filters
`list`, `get`, `create`, `delete`
## Discovering More
```bash
gws gmail --help
gws schema gmail.users.messages.list
gws schema gmail.users.messages.send
```Related Skills
gws-gmail-send
Gmail helper for sending email via the gws CLI. Handles RFC 2822 formatting and base64 encoding automatically. Supports plain text, HTML, CC, and BCC.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
web-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
valyu
Search the live web and 36+ specialised data sources including SEC filings, PubMed, ChEMBL, clinical trials, FRED economic indicators, and patent databases. Use when current, authoritative, or paywalled data is required.
ui-ux-pro-max
AI-powered design intelligence with 67 UI styles, 161 color palettes, 57 font pairings, 99 UX guidelines, and 25 chart types across 15+ tech stacks. Generates complete design systems for any product type with industry-specific reasoning rules.
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
slack-gif-creator
Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
shannon
Autonomous AI security pen testing. Executes real exploits against web applications to find SQL injection, XSS, SSRF, authentication flaws, and IDOR vulnerabilities. Reports only confirmed, reproducible findings — no false positives.
remotion
Create programmatic videos using React and Remotion. Translate natural language descriptions into working Remotion components for product demos, release announcements, explainer videos, and animated content.
planetscale
Design schemas and write queries for PlanetScale serverless MySQL using branch-based workflows. Ensures index coverage, avoids foreign key anti-patterns, and treats every schema change as a reviewable, reversible deploy request.
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).