agentleFS
aiagentwithdhruvaiagentwithdhruv/skills/gmail-inbox/SKILL.md

gmail-inbox

Skill16 starsChanged 9 months agoMITView on GitHub

Manage emails across multiple Gmail accounts with unified tooling. Use when user asks to check email, read inbox, label emails, archive messages, or manage Gmail across accounts.

  • Reads credentials

4 other projects use a version of this, 3 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 2 are common, 0 are distinctive, and 1 is very specific to this project.

  • 2

    Common

    Most of the 4 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Common:

    Check and manage emails across multiple Gmail accounts using unified tooling.

    line 9
  2. Very specific:

    Check that credentials.json exists in root directory.

    line 61
  3. Common:

    All credential files should be in the workspace root:

    line 71

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Gmail Inbox Management

Goal

Check and manage emails across multiple Gmail accounts using unified tooling.

Scripts

  • ./scripts/gmail_unified.py - Check and manage inboxes
  • ./scripts/gmail_multi_auth.py - Authenticate accounts
  • ./scripts/gmail_bulk_label.py - Bulk labeling
  • ./scripts/gmail_create_filters.py - Create filters
  • ./scripts/gmail_auth.py - Auth helper

Quick Reference

# Check unread across all accounts
python3 ./scripts/gmail_unified.py --query "is:unread" --limit 50

# Check specific account only
python3 ./scripts/gmail_unified.py --query "is:unread" --account yourcompany

# List registered accounts
python3 ./scripts/gmail_unified.py --accounts

# Label and archive emails
python3 ./scripts/gmail_unified.py --query "from:notifications@" --label "Notifications" --archive

# Mark as read
python3 ./scripts/gmail_unified.py --query "from:noreply@" --mark-read

# Dry run (preview)
python3 ./scripts/gmail_unified.py --query "subject:invoice" --label "Invoices" --dry-run

Account Registry

AccountEmailCredentialsToken
youruseryou@example.comcredentials.jsontoken_youruser.json
yourcompanyyou@yourdomain.comcredentials_yourcompany.jsontoken_yourcompany.json

Troubleshooting Auth Errors

"Token file not found"

python3 ./scripts/gmail_multi_auth.py --account yourcompany --email you@yourdomain.com

"invalid_scope: Bad Request"

rm token_youruser.json
python3 ./scripts/gmail_multi_auth.py --account youruser --email you@example.com

"Failed to authenticate" Check that credentials.json exists in root directory.

Required Scopes

  • gmail.modify - Read/write emails
  • gmail.labels - Create/manage labels
  • gmail.settings.basic - Manage settings
  • spreadsheets - Google Sheets access
  • drive - Google Drive access

Credentials Location

All credential files should be in the workspace root:

  • credentials.json / credentials_yourcompany.json - OAuth client configs
  • token_*.json - Auth tokens (auto-generated)
  • gmail_accounts.json - Account registry

Schema

Inputs

NameTypeRequiredDescription
querystringNoGmail search query (e.g., 'is:unread')
accountstringNoSpecific account name from registry
limitintegerNoMax emails to fetch (default: 50)

Outputs

NameTypeDescription
emailsarrayList of email objects with subject, from, date, snippet

Credentials

NameSource
credentials.jsonfile
token_*.jsonfile (auto-generated)

Composable With

Skills that chain well with this one: gmail-label, instantly-autoreply

Cost

Free (Gmail API)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.