gmail-label
Skill16 starsChanged 9 months agoMITView on GitHub
Auto-label Gmail emails into Action Required, Waiting On, and Reference categories. Use when user asks to label emails, triage inbox, categorize emails, or organize Gmail.
- Reads credentials
3 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- MohamedEssam0-0/claude-skillsedited, first seen Oct 11, 2026
- CorentinLumineau/tidytheir own version, first seen Aug 15, 2026
- phuongdo/claude-skillsedited, first seen Feb 17, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- MohamedEssam0-0/claude-skills★ 098% same
- phuongdo/claude-skills★ 098% same
Wrote their own version · 1
- CorentinLumineau/tidy★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository39 other files it gives its agents.
- add-webhookSkill
- aws-production-deploySkill
- build-in-public-youtubeSkill
- casualize-namesSkill
- classify-leadsSkill
- create-proposalSkill
- cross-niche-outliersSkill
- design-websiteSkill
- euron-qaSkill
- excalidraw-diagramSkill
- excalidraw-visualsSkill
- generate-reportSkill
- ghost-browserSkill
- gmail-inboxSkill
- gmaps-leadsSkill
- image-to-videoSkill
- instantly-autoreplySkill
- instantly-campaignsSkill
- linkedin-carousel-handwrittenSkill
- literature-researchSkill
- local-serverSkill
- mac-controlSkill
- modal-deploySkill
- Nano Banana 2 Image Generation MasterSkill
- onboarding-kickoffSkill
- pan-3d-transitionSkill
- recreate-thumbnailsSkill
- scrape-leadsSkill
- send-telegramSkill
- skill-builderSkill
- skool-monitorSkill
- skool-ragSkill
- thumbnail-generatorSkill
- title-variantsSkill
- upwork-applySkill
- video-editSkill
- welcome-emailSkill
- whisper-voiceSkill
- youtube-outliersSkill
The file
We split this skill into the rules it gives an agent
2 rules. 1 is common, 0 are distinctive, and 1 is very specific to this project.
1
Common
Most of the 3 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
- Very specific: line 42
Use the Task tool with run_in_background: true and model: "sonnet".
- Common: line 54
Instead, poll for file existence:
“Common” is measured: kept by at least 6 in 10 of the 3 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.
Files
Gmail Auto-Label
Goal
Fetch inbox emails, classify them via parallel subagents into Action Required / Waiting On / Reference, and apply labels in bulk via Gmail API.
Scripts
./scripts/gmail_label_fetch.py- Fetch email summaries as compact JSON./scripts/gmail_label_split.py- Split emails into N chunks for parallel classification./scripts/gmail_label_merge.py- Merge classified chunks into single labels.json./scripts/gmail_label_apply.py- Apply label classifications in bulk
Subagent
email-classifier— defined in.claude/agents/email-classifier.md- Model: Sonnet 4.5 (fast, cost-efficient classification)
- Each subagent reads one chunk, writes one classified output file
Flow (Parallel — default)
Step 1: Fetch emails
python3 .claude/skills/gmail-label/scripts/gmail_label_fetch.py \
--account ACCOUNT --query "in:inbox" --limit 100 --output .tmp/emails.jsonStep 2: Split into chunks
python3 .claude/skills/gmail-label/scripts/gmail_label_split.py \
--input .tmp/emails.json --chunks 10 --output-dir .tmp/chunksStep 3: Classify in parallel (spawn 10 subagents)
Spawn 10 email-classifier subagents in background, one per chunk. Each subagent:
- Reads
.tmp/chunks/chunk_N.json - Classifies each email
- Writes
.tmp/chunks/classified_N.json
Use the Task tool with run_in_background: true and model: "sonnet". Launch ALL 10 in a single message for true parallelism:
For each chunk 0-9, spawn a Task with:
subagent_type: "email-classifier"
model: "sonnet"
run_in_background: true
prompt: "Read /absolute/path/.tmp/chunks/chunk_N.json, classify each email, write results to /absolute/path/.tmp/chunks/classified_N.json"CRITICAL: Do NOT use TaskOutput to read subagent results. The subagents write their results to files — the main agent never needs to see the classification data. Reading TaskOutput will flood the context window and cause "prompt too long" errors with large batches (500+ emails).
Instead, poll for file existence:
# Wait until all classified files exist (timeout after 120s)
for i in $(seq 0 9); do
while [ ! -f ".tmp/chunks/classified_$i.json" ]; do sleep 2; done
doneThen proceed directly to Step 4 (merge).
Step 4: Merge classifications
python3 .claude/skills/gmail-label/scripts/gmail_label_merge.py \
--input-dir .tmp/chunks --output .tmp/labels.jsonStep 5: Apply labels
python3 .claude/skills/gmail-label/scripts/gmail_label_apply.py \
--account ACCOUNT --input .tmp/labels.jsonClassification Guidelines
Action Required:
- Security alerts that need verification
- Expiring credit cards / domain renewals with deadlines
- Slack @mentions asking questions
- New team members to greet (Slack join notifications)
- Client emails needing response
- Business listing updates (Google Business Profile, Bing Places)
- Stripe action-required notices
Waiting On:
- Outbound sales emails awaiting reply
- Support tickets awaiting resolution
- Proposals sent, pending response
Reference:
- Marketing newsletters (DigitalMarketer, etc.)
- Charity/nonprofit newsletters (RAPS, etc.)
- Google Business Profile performance reports
- Promotional offers (Blinkist, sales, etc.)
- Platform update notifications (Google Play, Apify, etc.)
- Confirmation codes (already used)
- Real estate newsletters (Westbank, etc.)
- Gaming account emails (Riot Games, etc.)
- Informational security alerts (2FA turned on, etc.)
- Health advisories
- Legal/policy update notices
Account Registry
Accounts are stored in gmail_accounts.json at workspace root. Each account needs:
email- Gmail addresstoken_file- Path to OAuth token
Adding New Accounts
python3 .claude/skills/gmail-inbox/scripts/gmail_multi_auth.py --account ACCOUNT_NAME --email EMAILPerformance
- Serial flow: ~36s for 100 emails (fetch 1s + classify 34s + apply 1s)
- Parallel flow: ~30s for 100 emails (classify 19s + merge <1s + apply ~10s)
- Classification is the bottleneck; 10 parallel subagents cut it from 34s to 19s (~1.8x speedup)
- Agent startup overhead (~4s stagger) limits theoretical gains
- Apply step may vary due to Gmail API throttling
Schema
Inputs
| Name | Type | Required | Description |
account | string | Yes | Gmail account name from registry |
query | string | No | Gmail search query (default: 'in:inbox') |
limit | integer | No | Max emails to classify (default: 100) |
chunks | integer | No | Parallel classification chunks (default: 10) |
Outputs
| Name | Type | Description |
labels_applied | object | Count per category: Action Required, Waiting On, Reference |
Credentials
| Name | Source |
credentials.json | file |
token_*.json | file (auto-generated) |
Composable With
Skills that chain well with this one: gmail-inbox
Cost
Claude Sonnet API for classification
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
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.

