Community skill and local wrapper for Gmail retrieval, published as a GitHub repo with installation instructions.
This repository is the public-facing home for the mail ... community skill and the local wrapper it uses to run gmail_rag.cli.
It focuses on:
- safe, read-only mailbox retrieval
- clear command parsing
- concise results with citations/permalinks
- simple GitHub-based installation
SKILL.md— skill definitionscripts/parse_mail.py— command parserscripts/run_cli.sh— safe CLI wrapperreferences/— setup, commands, security, troubleshootingdocs/— release notes and validation docspackages/gmail-rag-legacy/— preserved legacy snapshot for maintainers
- not a public Gmail API client
- not a send/delete tool
- not a hosted Gmail service
git clone https://github.com/dmoraine/ClawInboxRAG.git
cd ClawInboxRAGuv sync --extra devIf you only need the skill wrapper, install the runtime dependencies without dev extras:
uv syncexport GMAIL_RAG_REPO="/absolute/path/to/your/local/gmail-backend"
export GMAIL_RAG_UV_BIN="uv"
export GMAIL_RAG_BASE="$HOME/.openclaw/gmail-rag"
export GMAIL_TOKEN_PATH="$HOME/.openclaw/gmail/token.json"
GMAIL_RAG_REPOmust point to a checkout that exposespython -m gmail_rag.cli. That can be this repo or another compatible local backend checkout.
GMAIL_RAG_REPO=/absolute/path/to/your/local/gmail-backend scripts/run_cli.sh status
python3 scripts/parse_mail.py "mail invoices max 3"status reports the local database/index/token health plus counts for messages, labels, attachments, chunks, and embeddings.
If the configured backend exposes passthrough operational commands, these checks may also be useful:
GMAIL_RAG_REPO=/absolute/path/to/your/local/gmail-backend scripts/run_cli.sh labels
GMAIL_RAG_REPO=/absolute/path/to/your/local/gmail-backend scripts/run_cli.sh recents --limit 5mail <query> [keyword|semantic|hybrid] [max N|top N|limit N] [label <prefix>] [after <date>] [before <date>] [between <date> and <date>] [resume]
Examples:
mail conference
mail budget review keyword max 8
mail invoices label finance/receivables between 2025-01 and 2025-03 resume
mail status
mail sync
mail labels and mail recents are parser-recognized passthrough commands. Document them as available only when the configured backend checkout exposes matching CLI subcommands.
- Read-only Gmail access only.
- No send/delete operations in this skill.
- Result counts are clamped.
- Tokens and secrets stay out of the repo.
- Wrapper commands are allowlisted.
GMAIL_RAG_REPO— path to your local backend checkoutGMAIL_RAG_UV_BIN— runner binary, defaults touvGMAIL_RAG_BASE— backend data directoryGMAIL_TOKEN_PATH— Gmail OAuth token pathMAIL_DEFAULT_MODE— default search mode (hybridby default)MAIL_DEFAULT_LIMIT— default result count (5by default)MAIL_MAX_LIMIT— max result count (25by default)
SKILL.mdreferences/setup.mdreferences/commands.mdreferences/security.mdreferences/troubleshooting.md
The skill and wrapper live in this repo. The runtime target is whichever local checkout GMAIL_RAG_REPO points at, as long as it exposes gmail_rag.cli.