gmail-label
Skill2 starsChanged 3 months agoMITView on GitHub
Create Gmail labels and apply them to existing emails in batch. Use when organizing past emails or setting up label taxonomy. Supports full Gmail search syntax for targeting specific emails.
- Installs packages
5 other projects use a version of this.
Adopted by
Most recently taken up by
- runehub-ai/rune-hubtheir own version, first seen Nov 15, 2026
- MohamedEssam0-0/claude-skillstheir own version, first seen Oct 11, 2026
- aiagentwithdhruv/skillstheir own version, first seen Mar 2, 2026
- phuongdo/claude-skillstheir own version, first seen Feb 17, 2026
Other versions5 projects use a version of this.
Word for word · 1
- CorentinLumineau/gmail-assistant★ 0100% same
Edited · 0
None found.
Wrote their own version · 4
- aiagentwithdhruv/skills★ 16same name
- runehub-ai/rune-hub★ 6same name
- MohamedEssam0-0/claude-skills★ 0same name
- phuongdo/claude-skills★ 0same 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 repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- gmail-analyzeSkill
- gmail-classifySkill
- gmail-filterSkill
- gogSkill
- prj-drive-cleanupSkill
- prj-driveSkill
- prj-gmail-cleanupSkill
- prj-inboxSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
3
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
- Distinctive: line 14
Create labels and batch-apply them to existing emails.
- Distinctive: line 58
Search for existing label with same name.
- Distinctive: line 102
Test the query first:
- Very specific: line 156
Use / for nested labels:
“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 Label Manager
Create labels and batch-apply them to existing emails.
Commands
Create Label
Syntax: /gmail-label create <name>
Examples:
/gmail-label create Newsletters
/gmail-label create "Work/Projects"
/gmail-label create "Finance/Invoices"List Labels
Syntax: /gmail-label list
Shows all labels with IDs.
Apply Labels to Existing Emails
Syntax: /gmail-label apply "<search-query>" <label>
Examples:
/gmail-label apply "from:@github.com newer_than:30d" Notifications
/gmail-label apply "from:newsletter@company.com" Newsletters
/gmail-label apply "subject:invoice" "Finance/Invoices"Delete Label
Syntax: /gmail-label delete <label-name>
Create Label Workflow
Step 1: Check if Label Exists
gog gmail labels list --jsonSearch for existing label with same name.
Step 2: Create Label
gog gmail labels create "LabelName"For nested labels, use forward slash:
gog gmail labels create "Parent/Child"Step 3: Confirm Creation
## Label Created
**Name**: Newsletters
**ID**: Label_123456789
Use this label with:
- `/gmail-filter create @domain.com Newsletters`
- `/gmail-label apply "from:@domain.com" Newsletters`List Labels Workflow
gog gmail labels list --jsonFormat as table:
| Name | ID | Type |
| Newsletters | Label_123 | user |
| Work | Label_456 | user |
| INBOX | INBOX | system |
Apply Labels Workflow
Step 1: Validate Search Query
Test the query first:
gog gmail search '<query>' --json | head -5Show count: "Found X emails matching query"
Step 2: Get Label ID
gog gmail labels list --jsonFind label ID by name.
Step 3: Apply Labels in Batch
For each matching email:
gog gmail modify <message-id> --add-label <label-id>Note: Process in batches of 50 for efficiency.
Step 4: Report Results
## Labels Applied
**Query**: from:@github.com newer_than:30d
**Label**: Notifications
**Emails Modified**: 47
Sample of labeled emails:
- "[GitHub] Pull request #123..." (Jan 25)
- "[GitHub] Issue comment on..." (Jan 24)
- ...Delete Label Workflow
# Get label ID first
gog gmail labels list --json
# Delete by ID
gog gmail labels delete <label-id>Warning: Deleting a label removes it from all emails.
Label Naming Conventions
Hierarchy
Use / for nested labels:
Work/ProjectsWork/ClientsFinance/InvoicesFinance/Receipts
Recommended Structure
Work/
├── Projects
├── Clients
└── Internal
Personal/
├── Family
└── Friends
Finance/
├── Invoices
├── Receipts
└── Statements
Newsletters/
├── Tech
├── News
└── Other
Notifications/
├── GitHub
├── Slack
└── CalendarSearch Query Examples
| Description | Query |
| From domain | from:@github.com |
| Last 30 days | newer_than:30d |
| Unread only | is:unread |
| With attachments | has:attachment |
| Subject contains | subject:invoice |
| Combined | from:@amazon.com subject:order newer_than:60d |
Error Handling
- Label exists: Return existing label, don't duplicate
- Invalid query: Show example queries
- No matches: Suggest broadening search
- Rate limit: Pause and retry with smaller batches
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.

