Agent skill

Gmcli

by badlogic in badlogic/pi-skills

Gmail CLI for searching emails, reading threads, sending messages, managing drafts, and handling labels/attachments.

MITAuto-check passedProductivity & Automation

Install Gmcli

skills CLI
$ npx skills add badlogic/pi-skills --skill gmcli -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install badlogic/pi-skills gmcli --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/badlogic/pi-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/gmcli .claude/skills/gmcli && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gmcli
GitHub stars
2.6k
Token cost
~470 tokens
SKILL.md length
190 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Gmail CLI for searching emails, reading threads, sending messages, managing drafts, and handling labels/attachments.

  • Works in 5 steps: Create a new project (or select existing) → Enable the Gmail API → Set app name in OAuth branding → …
  • Tasks that involve Email management
  • SKILL.md covers Installation, Setup, Usage and Data Storage
  • Calls npm

What it does

Gmcli is an agent skill from badlogic/pi-skills. Gmail CLI for searching emails, reading threads, sending messages, managing drafts, and handling labels/attachments.

Its SKILL.md is about 470 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Productivity & Automation, covering Email management. It works with Gmail and Google Cloud. The repository describes itself as: Skills for pi coding agent (compatible with Claude Code and Codex CLI). The licence is MIT.

When your agent uses it

  • Tasks that involve Email management

Example prompts

  • “/gmcli”

Requirements

  • Node.js

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  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

What it can do on your machine

Read from SKILL.md and the folder at commit 90bb51c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • console.cloud.google.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gmcli loads about 470 tokens when it runs. Until then it costs about 31 tokens; SKILL.md has 190 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~31
When it runs · the whole SKILL.md, loaded when a task matches
~470

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from badlogic/pi-skills at commit 90bb51c, republished under its MIT licence (© badlogic). 190 words, ~470 tokens.

Download SKILL.mdSave it as .claude/skills/gmcli/SKILL.md (or your agent's skills folder).
name
gmcli
description
Gmail CLI for searching emails, reading threads, sending messages, managing drafts, and handling labels/attachments.

Gmail CLI

Command-line interface for Gmail operations.

Installation

bash
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:

bash
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

© badlogic, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in gmcli of badlogic/pi-skills.

Open the folder on GitHubat commit 90bb51c

Compare with similar skills

Gmcli next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gmcli compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gmcli this skillbadlogic/pi-skills2.6k—~470Automated safety check: PassMIT
Add Gmailsbusso/claudeclaw194—~1.9kAutomated safety check: PassMIT
Gmail Inbox Watchergoogleworkspace/cli31k1 repos~476Automated safety check: PassApache-2.0
GCP Workspace Pivotwgpsec/AboutSecurity1.8k—~2.9kAutomated safety check: PassNone
Google Workspaceericrisco/rsc-harness156—~3.2kAutomated safety check: PassMIT
Google WorkspaceAlexAI-MCP/hermes-CCC135—~1.2kAutomated safety check: PassMIT

Similar skills

  • Add Gmail

    sbusso/claudeclaw

    Add Gmail integration to ClaudeClaw. An agent skill from sbusso/claudeclaw.

    194 GitHub stars~1.9k tokensUpdated 1 mo ago
    Productivity & AutomationAuto-check passed
  • Gmail Inbox Watcher

    googleworkspace/cli

    Streams new Gmail messages as NDJSON from the gws command line tool using Google Pub/Sub, with label filters, batch settings and optional per-message files.

    31k GitHub starsUsed in 1 repo~476 tokens
    Productivity & AutomationAuto-check passed
  • GCP Workspace Pivot

    wgpsec/AboutSecurity

    GCP 到 Google Workspace 的穿越攻击方法论。当已获取 GCP Service Account 或 Project 权限并发现目标组织使用 Google Workspace、需要从云平台穿越到企业邮件/文档/管理控制台、或发现 Domain-Wide Delegation 配置时使用。覆盖 Domain-Wide Delegation 滥用、OAuth…

    1.8k GitHub stars~2.9k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Google Workspace

    ericrisco/rsc-harness

    A skill your agent uses when server-side code reads or writes Gmail, Drive, Calendar, or Sheets with a GCP service account and no human in the OAuth loop: picking the auth mode (app-owned vs…

    156 GitHub stars~3.2k tokensUpdated today
    Backend & APIsAuto-check passed
  • Google Workspace

    AlexAI-MCP/hermes-CCC

    Automate Google Workspace — Gmail, Drive, Sheets, Docs, Calendar via Google API Python client or gcloud CLI.

    135 GitHub stars~1.2k tokensUpdated 6 mo ago
    Documents & OfficeAuto-check passed
  • Bootstrap Google Tools

    google/adk-recipes

    Official

    Install/auth CLIs the sandbox lacks - gws (Drive, Gmail, Sheets, Calendar), gcloud, agents-cli, mcp-cli (MCP servers).

    10k GitHub stars~5k tokensUpdated yesterday
    Agent WorkflowsAuto-check: warnings

More from badlogic/pi-skills

  • Brave Search

    badlogic/pi-skills

    Web search and content extraction via Brave Search API. An agent skill from badlogic/pi-skills.

    2.6k GitHub starsUsed in 6 repos~592 tokens
    Auto-check passed
  • Gdcli

    badlogic/pi-skills

    Google Drive CLI for listing, searching, uploading, downloading, and sharing files and folders.

    2.6k GitHub starsUsed in 1 repo~759 tokens
    Auto-check passed
  • Gccli

    badlogic/pi-skills

    Google Calendar CLI for listing calendars, viewing/creating/updating events, and checking availability.

    2.6k GitHub stars~530 tokensUpdated 4 mo ago
    Auto-check passed
  • Youtube Transcript

    badlogic/pi-skills

    Fetch transcripts from YouTube videos for summarization and analysis.

    2.6k GitHub starsUsed in 1 repo~179 tokens
    Auto-check passed
  • Transcribe

    badlogic/pi-skills

    Local speech-to-text transcription on Apple Silicon macOS. An agent skill from badlogic/pi-skills.

    2.6k GitHub stars~264 tokensUpdated 4 mo ago
    Auto-check passed

Questions about Gmcli

What does Gmcli do?

Gmail CLI for searching emails, reading threads, sending messages, managing drafts, and handling labels/attachments. Gmcli is an agent skill from badlogic/pi-skills. Gmail CLI for searching emails, reading threads, sending messages, managing drafts, and handling labels/attachments.

When should I use Gmcli?

Gmcli fits situations like: tasks that involve Email management.

How do I install Gmcli in Claude Code?

Run `npx skills add badlogic/pi-skills --skill gmcli -a claude-code`. Or copy the skill folder (gmcli in badlogic/pi-skills) into .claude/skills/gmcli in your project. Claude Code loads it when a task matches its description.

How do I install Gmcli in Codex?

Run `npx skills add badlogic/pi-skills --skill gmcli -a codex`. Or copy the skill folder (gmcli in badlogic/pi-skills) into .agents/skills/gmcli in your project. Codex loads it when a task matches its description.

Can I use Gmcli in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add badlogic/pi-skills --skill gmcli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gmcli, .gemini/skills/gmcli, .github/skills/gmcli and .opencode/skills/gmcli in your project.

What does Gmcli need to run?

Going by SKILL.md and its folder, Gmcli needs the command-line tools its instructions call (npm). Our summary lists: Node.js.

Does Gmcli access the network?

SKILL.md names 1 domain. As links in the text: console.cloud.google.com. This is read from the text; nothing was executed.

Is Gmcli safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gmcli use?

Gmcli is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gmcli use?

About 470 tokens (SKILL.md is roughly 1.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Gmcli?

Skills that share tags, products or a category with Gmcli: Add Gmail (sbusso/claudeclaw, 194 stars), Gmail Inbox Watcher (googleworkspace/cli, 31k stars), GCP Workspace Pivot (wgpsec/AboutSecurity, 1.8k stars) and Google Workspace (ericrisco/rsc-harness, 156 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gmcli?

badlogic (a GitHub user) maintains it in badlogic/pi-skills, which has 2,589 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on June 6, 2026.

Source: badlogic/pi-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.