Agent skill · Workflow & Productivity

add-gmail-tool

Add Gmail as an MCP tool (read, search, send, label, draft) using OneCLI-managed OAuth. The agent gets Gmail tools in every enabled group; OneCLI injects real tokens at request time so no raw credentials are ever in the container or on disk in usable form.

NanoCo30,389★ · +78/wk · 1 repos on radarProfile →
claude-codeships scriptsMIT
Install
npx skills add nanocoai/nanoclaw --skill add-gmail-tool --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 4
SKILL.md size: 14 KB
Bundled scripts: yes
Path: .claude/skills/add-gmail-tool/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 30,426 · +37 this week
Language: TypeScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Add Gmail Tool (OneCLI-native) This skill wires the [`@gongrzhe/server-gmail-autoauth-mcp`](https://www.npmjs.com/package/@gongrzhe/server-gmail-autoauth-mcp) stdio MCP server into selected agent groups. The MCP server reads stub credentials containing the `onecli-managed` placeholder; the OneCLI gateway intercepts outbound calls to `gmail.googleapis.com` and injects the real OAuth bearer from its vault. Tools exposed (from `gmail-mcp@1.1.11`, surfaced to the agent as `mcp__gmail__<name>`): `search_emails`, `read_email`, `send_email`, `draft_email`, `delete_email`, `modify_email`, `batch_modify_emails`, `batch_delete_emails`, `download_attachment`, `list_email_labels`, `create_label`, `update_label`, `delete_label`, `get_or_create_label`, `list_filters`, `get_filter`, `create_filter`, `create_filter_from_template`, `delete_filter`. **Why this pattern:** v2's invariant is that containers never receive raw API keys — OneCLI is the sole credential path (see CHANGELOG v2.0.0). The stub-file pattern satisfies this: the container sees `"onecli-managed"` placeholders, the gateway swaps them in flight. ## Phase 1: Pre-flight ### Verify OneCLI has Gmail connected ```bash onecli apps get -

What's inside
Steps it walks through
  1. Phase 1: Pre-flight
  2. Verify OneCLI has Gmail connected
  3. Verify stub credentials exist
  4. Verify mount allowlist covers the path
  5. Check agent secret-mode
  6. Phase 2: Apply Code Changes
  7. Check if already applied
  8. Copy the skill's tests into the container tree
  9. Add MCP server to Dockerfile
  10. Rebuild the container image
  11. Phase 3: Wire Per-Agent-Group
  12. List groups, pick which ones get Gmail
  13. Register the MCP server
  14. Add the .gmail-mcp mount
Ships with 3 files
  • REMOVE.md
  • gmail-allow-pattern.test.ts
  • gmail-dockerfile.test.ts
Commands it runs
onecli apps get --provider gmail
ls -la ~/.gmail-mcp/gcp-oauth.keys.json ~/.gmail-mcp/credentials.json 2>&1
grep -l onecli-managed ~/.gmail-mcp/gcp-oauth.keys.json ~/.gmail-mcp/credentials.json
mkdir -p ~/.gmail-mcp
cat > ~/.gmail-mcp/gcp-oauth.keys.json <<'EOF'
cat > ~/.gmail-mcp/credentials.json <<'EOF'
chmod 600 ~/.gmail-mcp/gcp-oauth.keys.json ~/.gmail-mcp/credentials.json
cat ~/.config/nanoclaw/mount-allowlist.json
onecli agents list
onecli agents set-secrets --id <agent-id> --secret-ids "$MERGED"
More from nanoclaw
All skills →
About this skill
What does the add-gmail-tool skill do?

Add Gmail as an MCP tool (read, search, send, label, draft) using OneCLI-managed OAuth. The agent gets Gmail tools in every enabled group; OneCLI injects real tokens at request time so no raw credentials are ever in the container or on disk in usable form.

How do I install it?

Run `npx skills add nanocoai/nanoclaw --skill add-gmail-tool --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From nanocoai/nanoclaw, a repository with 30,426 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going