agentsclimarketplace

Gmail classify

Skill CorentinLumineau/gmail-assistant/skills/gmail-classify

AI-powered email classification using intelligent content analysis. Categorizes emails into Newsletter, Shopping, Work, Personal, Notifications, Receipts, and Promotions. Use for smart inbox organization beyond simple pattern matching.From its SKILL.md

Install
npx -y skills add CorentinLumineau/gmail-assistant --skill gmail-classify

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

5.0 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

Gmail AI Classifier

Intelligent email classification using AI reasoning for smart inbox organization.

Overview

Unlike pattern-based filtering, AI classification analyzes email content, sender context, and user behavior to make intelligent categorization decisions.

Usage

Syntax: /gmail-classify [days]

Examples:

/gmail-classify           # Classify last 7 days
/gmail-classify 30        # Classify last 30 days
/gmail-classify --dry-run # Preview without applying

Classification Categories

CategoryIndicatorsLabel
NewsletterSubstack, Mailchimp, "unsubscribe" linkNewsletters
ShoppingOrder confirmation, shipping, trackingShopping
WorkCompany domain, professional toneWork
PersonalPersonal contacts, casual tonePersonal
NotificationsGitHub, Slack, calendar alertsNotifications
ReceiptsInvoice, payment, receipt keywordsFinance/Receipts
PromotionsDiscount, sale, marketing languagePromotions

Classification Workflow

Step 1: Fetch Emails

gog gmail search 'newer_than:${DAYS}d -label:classified' --json

Exclude already-classified emails to avoid re-processing.

Step 2: Analyze Each Email

For each email, analyze:

  1. Sender Analysis

    • Domain reputation (newsletter service? company?)
    • Sender name format (person vs system)
    • Reply-to address
  2. Subject Analysis

    • Keywords (order, invoice, newsletter, etc.)
    • Format (numbered list? FW:? RE:?)
    • Tone (formal, casual, marketing)
  3. Content Indicators

    • Unsubscribe link presence
    • Tracking numbers
    • Financial amounts
    • Personal greetings

Step 3: Classify with Confidence

Assign category with confidence level:

ConfidenceThresholdAction
High (90%+)Strong signalsAuto-apply label
Medium (70-89%)Mixed signalsApply with note
Low (<70%)UnclearSkip, flag for review

Step 4: Apply Labels

For high-confidence classifications:

# Ensure label exists
gog gmail labels list --json
gog gmail labels create "CategoryName"

# Apply label
gog gmail modify <message-id> --add-label <label-id>

Step 5: Report Results

## Classification Report

**Period**: Last 7 days
**Emails Analyzed**: 142
**Classifications Made**: 128
**Skipped (low confidence)**: 14

### Summary by Category

| Category | Count | % of Total |
|----------|-------|------------|
| Newsletters | 45 | 35% |
| Notifications | 32 | 25% |
| Shopping | 18 | 14% |
| Work | 15 | 12% |
| Personal | 12 | 9% |
| Receipts | 6 | 5% |

### High-Confidence Classifications (Auto-labeled)
- 98 emails across all categories

### Low-Confidence (Manual Review Needed)
1. "Meeting notes from John" - Work or Personal?
2. "Your weekly summary" - Newsletter or Notification?
...

### Suggested Filters

Based on this analysis, create permanent filters:
1. `/gmail-filter create @substack.com Newsletters --archive`
2. `/gmail-filter create @github.com Notifications`

Classification Signals

Newsletter Signals

  • Sender: newsletter@, digest@, weekly@
  • Domains: substack.com, mailchimp.com, beehiiv.com
  • Content: "unsubscribe", "view in browser"
  • Subject: "Weekly", "Digest", "Newsletter"

Shopping Signals

  • Subject: "order", "shipped", "delivered", "tracking"
  • Sender: orders@, shipping@, noreply@
  • Content: Order numbers, tracking links

Work Signals

  • Sender: Company domain match
  • Content: Project names, professional terminology
  • CC: Multiple company addresses

Personal Signals

  • Sender: In contacts, personal domain
  • Content: Casual language, personal topics
  • No marketing footers

Notification Signals

  • Sender: notifications@, alerts@, noreply@
  • Subject: [GitHub], [Slack], calendar patterns
  • Content: Action buttons, status updates

Receipt Signals

  • Subject: "receipt", "invoice", "payment"
  • Content: Dollar amounts, transaction IDs
  • Sender: billing@, receipts@

Dry Run Mode

Preview classifications without applying:

/gmail-classify --dry-run

Shows what would be classified without making changes.

Error Handling

  • No emails found: Suggest widening date range
  • Label creation fails: Check permissions
  • API rate limit: Pause and resume
  • Classification uncertain: Flag for user review

See Also

  • references/categories.md - Detailed category definitions
  • /gmail-analyze - Pattern analysis (faster, simpler)
  • /gmail-filter - Create permanent rules from classifications

What ships with it: 1 file

4.6 KB alongside SKILL.md

references/

Keep looking

Skills are one crate of 326,422. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.