GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - axisrow/claude_code_gmail_plugin

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
.claude-plugin
.claude-plugin
 
 
.claude
.claude
 
 
scripts
scripts
 
 
skills
skills
 
 
.gitignore
.gitignore
 
 
CLAUDE.md
CLAUDE.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
README.ru.md
README.ru.md
 
 
gmail_client.py
gmail_client.py
 
 
main.py
main.py
 
 
requirements-sdk.txt
requirements-sdk.txt
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

Gmail Analyzer — Claude Code Plugin

Русская версия

A Claude Code plugin that extends Gmail MCP with 5-category email classification, auto-tagging, search, and label management. Also includes a standalone CLI (main.py).

Plugin Installation

1. Clone and copy skills

git clone https://github.com/axisrow/claude_code_gmail_plugin.git
cd claude_code_gmail_plugin
cp -r skills/* ~/.claude/skills/
mkdir -p ~/.claude/scripts/gmail-analyzer
cp scripts/*.py gmail_client.py ~/.claude/scripts/gmail-analyzer/

2. Install dependencies

pip install -r requirements.txt            # Google API libs

For the standalone CLI (main.py):

pip install -r requirements-sdk.txt        # + claude-agent-sdk, openpyxl

3. Gmail Authorization (pick one)

The client auto-selects an available backend: gcloud ADC → gws CLI → credentials.json.

Option A: gcloud ADC (recommended)

  1. Install gcloud CLI:

    macOS (Apple Silicon):

    curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-darwin-arm.tar.gz
    tar -xf google-cloud-cli-darwin-arm.tar.gz
    ./google-cloud-sdk/install.sh

    macOS (Intel):

    curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-darwin-x86_64.tar.gz
    tar -xf google-cloud-cli-darwin-x86_64.tar.gz
    ./google-cloud-sdk/install.sh

    Open a new terminal after installation.

  2. Initialize gcloud:

    gcloud init
  3. Create an OAuth Client ID in Google Cloud Console, download it as client_secret.json into the project root.

  4. Authenticate:

    gcloud auth application-default login \
      --client-id-file=client_secret.json \
      --scopes=https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/gmail.modify

Option B: gws CLI

npm install -g @googleworkspace/cli
gws auth setup
gws auth login -s gmail

Verify: gws gmail +triage --max 3

Option C: credentials.json

  1. Create an OAuth Client ID in Google Cloud Console
  2. Download credentials.json into the project root
  3. A browser window will open for authorization on first run

Plugin Skills

Once installed, 4 skills are available:

Skill Command Description
Email Analysis /analyze-emails 5-category classification (Personal, Newsletter, Important, Noise, Spam)
Search /search-emails <query> Gmail query syntax search (from:, subject:, newer_than:)
Labels /manage-labels List, create, delete labels
Auto-tag /auto-tag Analyze + suggest tags + confirm + apply

Skills use Gmail MCP for reading and scripts from scripts/ for writing (applying labels).

Standalone CLI (optional, requires requirements-sdk.txt)

main.py runs independently from Claude Code via Claude Agent SDK:

python main.py                          # analysis only (INBOX)
python main.py --tag                    # analysis + auto-tagging
python main.py --tag --label CATEGORY_X # tag emails with a specific label
python main.py --label CATEGORY_UPDATES # analyze emails with a specific label
python main.py top [N]                  # top-N newsletter senders
python main.py mark <Label_ID> <emails> # label emails from specific senders
python main.py mark-query <Label_ID> <q># label emails by Gmail query
python main.py analyze-senders [N]      # sender analysis by sector (Excel)
python main.py labels                   # show all labels
python main.py labels create Name       # create a custom label
python main.py labels delete Label_XX   # delete a custom label

Important: main.py cannot be run inside a Claude Code session (nested sessions are not allowed). Use a regular terminal.

Re-authorization: if you previously used the gmail.readonly scope, delete token.json and re-authorize with gmail.modify.

About

No description, website, or topics provided.

Resources

Readme
MIT license
Activity

Stars

3 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.