/personal:gmail-create-filterfrom personal
Create Gmail filters with the `gws` CLI: rules that label, archive, star, or forward mail as it arrives. Use when the user wants future mail handled automatically, on phrasings like "always label these", "auto-archive that newsletter", "keep this sender out of my inbox", "set up a filter", "star anything from my boss".
Ships in personal. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A filter is a criteria → action rule Gmail applies to incoming mail. Mail already in the mailbox stays put, so a filter answers half the request: pair it with a gmail-triage sweep to file the backlog the same way.
gws prints a Using keyring backend: keyring line before the JSON body.
gws gmail users labels list --params '{"userId":"me"}' --format json
gws gmail users labels create --params '{"userId":"me"}' --json '{"name":"Receipts"}'
gws gmail users settings filters list --params '{"userId":"me"}' --format json
gws gmail users settings filters create --params '{"userId":"me"}' --json '<filter>'
gws gmail users settings filters delete --params '{"userId":"me","id":"<filter_id>"}'
{"criteria": {"from": "[email protected]"},
"action": {"addLabelIds": ["Label_5"], "removeLabelIds": ["INBOX"]}}
criteria: from, to, subject, query, negatedQuery,
hasAttachment, excludeChats, size + sizeComparison. query takes a
full Gmail search string, such as from:([email protected] OR [email protected]) has:attachment,
so one filter covers a whole family of senders.
action: addLabelIds, removeLabelIds, forward. Labels are addressed
by id (Label_5), never display name. Every Gmail-UI checkbox is one of
these two lists:
| Intent | Action |
|---|---|
| Skip the inbox (archive) | removeLabelIds: ["INBOX"] |
| Star it | addLabelIds: ["STARRED"] |
| Mark as read | removeLabelIds: ["UNREAD"] |
| Always / never important | addLabelIds / removeLabelIds: ["IMPORTANT"] |
| Delete it | addLabelIds: ["TRASH"] |
| Never send to spam | removeLabelIds: ["SPAM"] |
A forward address has to be verified in Gmail's settings UI first; the API
forwards to verified addresses only.
labels list builds the id↔name map. labels create makes the target
label when it is missing.filters list reads what already fires. Gmail runs every matching
filter, so a near-duplicate stacks its actions on top of the old one.filters create, then filters list to confirm the stored criteria
match what was asked.Filters are immutable. There is no update verb. Editing one means delete plus create, so keep the old filter's JSON until the replacement is listed.
"label anything from Amazon as Orders and keep it out of my inbox"
Label: Orders (Label_12, created)
Filter: AND_1234 created
criteria: from = [email protected] OR [email protected]
action: +Orders, -INBOX (skips the inbox)
Applies to new mail only. 14 older Amazon threads still in the inbox.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
3 skills in this plugin
/gmail-triageTriage Gmail with the `gws` CLI: classify inbox threads into labels, create labels on demand, and bulk-file the results of a mailbox-wide search. Use when the user wants mail sorted, labeled, filed, archived, or moved to a folder, and on the softer phrasings that mean the same thing, such as "clean up my inbox", "where did that receipt go", "organize this mess"./herdrControl Herdr, a terminal multiplexer for coding agents. Use only when the user explicitly mentions Herdr or asks to use Herdr to inspect or control panes, tabs, workspaces, commands, or another agent. Do not use merely because a task could benefit from a background terminal, delegation, or parallel work. Requires HERDR_ENV=1.npx claudepluginhub joaopinto15/skills --plugin personal