Gmail filter
Create and manage Gmail filters to automatically label, archive, or forward emails. Use when setting up email automation rules. Creates native Gmail filters that work 24/7 without needing Claude.From its SKILL.md
npx -y skills add CorentinLumineau/gmail-assistant --skill gmail-filterAssembled 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
3.5 KB, 766 tokens by cl100k_base, as published. Nobody here has run it
Gmail Filter Manager
Create and manage native Gmail filters for automatic email organization.
Commands
Create Filter
Syntax: /gmail-filter create <from-pattern> <label> [--archive]
Examples:
/gmail-filter create @newsletter.com Newsletters
/gmail-filter create @github.com Notifications --archive
/gmail-filter create "orders@amazon" Shopping
List Filters
Syntax: /gmail-filter list
Shows all existing filters with their criteria and actions.
Delete Filter
Syntax: /gmail-filter delete <filter-id>
Create Filter Workflow
Step 1: Parse Arguments
Extract from $ARGUMENTS:
from_pattern- Email pattern (domain or address)label_name- Label to applyarchive- Whether to remove from inbox
Step 2: Ensure Label Exists
Check if label exists, create if needed:
# List existing labels
gog gmail labels list --json
# Create if not found
gog gmail labels create "LabelName"
Step 3: Create the Filter
gog gmail filters create \
--from "[email protected]" \
--add-label "LABEL_ID" \
[--remove-label "INBOX"]
Note: Use label ID, not name, for the filter command.
Step 4: Verify Creation
gog gmail filters list --json
Confirm the filter appears in the list.
Step 5: Report Success
## Filter Created Successfully
**Criteria**: Emails from `@newsletter.com`
**Action**: Apply label "Newsletters"
**Archive**: Yes (removes from inbox)
This filter is now active and will automatically process matching emails.
**Note**: Existing emails are not affected. Use `/gmail-label apply` to label past emails.
List Filters Workflow
gog gmail filters list --json
Format output as table:
| ID | From | To | Subject | Labels Added | Labels Removed |
|---|---|---|---|---|---|
| abc123 | @github.com | - | - | Notifications | INBOX |
Delete Filter Workflow
gog gmail filters delete <filter-id>
Confirm deletion:
Filter `abc123` deleted successfully.
Filter Criteria Options
Available criteria (combine as needed):
--from- Sender address or domain--to- Recipient address--subject- Subject contains--query- Full Gmail search query--has-attachment- Has attachments
Filter Actions
Available actions:
--add-label- Apply a label (use label ID)--remove-label- Remove a label (use "INBOX" to archive)--forward- Forward to verified address--mark-read- Mark as read
Common Filter Recipes
Newsletter Filter (archive)
gog gmail filters create --from "@substack.com" --add-label "Newsletters" --remove-label "INBOX"
GitHub Notifications
gog gmail filters create --from "@github.com" --add-label "GitHub"
Shopping Orders
gog gmail filters create --from "orders@amazon" --add-label "Shopping/Orders"
Error Handling
- Label not found: Create it automatically
- Invalid filter criteria: Show supported options
- Duplicate filter: Warn user, don't create duplicate
- Permission error: Check OAuth scopes
What ships with it: 1 file
2.2 KB alongside SKILL.md
references/
- filter-syntax.md2.2 KB