Full command-line access to Gmail operations like searching, sending, and managing threads.

Install

mkdir -p .claude/skills/gmcli && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5130" && unzip -o skill.zip -d .claude/skills/gmcli && rm skill.zip

Installs to .claude/skills/gmcli

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Gmail CLI for searching emails, reading threads, sending messages, managing drafts, and handling labels/attachments.
116 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Search mailbox archives
  • Read email threads
  • Send messages
  • Manage drafts
  • Handle labels and attachments

How it works

The skill interfaces with the Gmail API to perform mailbox operations via CLI commands, using OAuth for authentication and local storage for credentials.

Inputs & outputs

You give it
Search queries or email commands
You get back
Email content or operation confirmation

When to use gmcli

  • Searching mailbox archives
  • Sending automated emails
  • Listing and managing email drafts

About this skill

Gmail CLI

Command-line interface for Gmail operations.

Installation

npm install -g @mariozechner/gmcli

Setup

Google Cloud Console (one-time)

  1. Create a new project (or select existing)
  2. Enable the Gmail API
  3. Set app name in OAuth branding
  4. Add test users (all Gmail addresses you want to use)
  5. Create OAuth client:
    • Click "Create Client"
    • Application type: "Desktop app"
    • Download the JSON file

Configure gmcli

First check if already configured:

gmcli accounts list

If no accounts, guide the user through setup:

  1. Ask if they have a Google Cloud project with Gmail API enabled
  2. If not, walk them through the Google Cloud Console steps above
  3. Have them download the OAuth credentials JSON
  4. Run: gmcli accounts credentials ~/path/to/credentials.json
  5. Run: gmcli accounts add <email> (use --manual for browserless OAuth)

Usage

Run gmcli --help for full command reference.

Common operations:

  • gmcli <email> search "<query>" - Search emails using Gmail query syntax
  • gmcli <email> thread <threadId> - Read a thread with all messages
  • gmcli <email> send --to <emails> --subject <s> --body <b> - Send email
  • gmcli <email> labels list - List all labels
  • gmcli <email> drafts list - List drafts

Data Storage

  • ~/.gmcli/credentials.json - OAuth client credentials
  • ~/.gmcli/accounts.json - Account tokens
  • ~/.gmcli/attachments/ - Downloaded attachments

When not to use it

  • High-volume bulk email marketing
  • Complex email parsing requirements

Prerequisites

Google Cloud projectGmail API enabledOAuth client credentials

Limitations

  • Requires initial OAuth setup
  • Limited by Gmail API quotas

How it compares

It enables command-line access to Gmail, allowing for integration into scripts and terminal-based workflows.

Compared to similar skills

gmcli side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
gmcli (this skill)18moReviewIntermediate
gmail-manager274moReviewIntermediate
mailchimp-automation24moNo flagsIntermediate
action-creator29moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry