recipe-label-and-archive-emails
Apply Gmail labels to matching messages and archive them to keep your inbox clean.
npx skills add googleworkspace/cli --skill recipe-label-and-archive-emails --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Label and Archive Gmail Threads > **PREREQUISITE:** Load the following skills to execute this recipe: `gws-gmail` Apply Gmail labels to matching messages and archive them to keep your inbox clean. ## Steps 1. Search for matching emails: `gws gmail users messages list --params '{"userId": "me", "q": "from:notifications@service.com"}' --format table` 2. Apply a label: `gws gmail users messages modify --params '{"userId": "me", "id": "MESSAGE_ID"}' --json '{"addLabelIds": ["LABEL_ID"]}'` 3. Archive (remove from inbox): `gws gmail users messages modify --params '{"userId": "me", "id": "MESSAGE_ID"}' --json '{"removeLabelIds": ["INBOX"]}'`
- Steps
What does the recipe-label-and-archive-emails skill do?
Apply Gmail labels to matching messages and archive them to keep your inbox clean.
How do I install it?
Run `npx skills add googleworkspace/cli --skill recipe-label-and-archive-emails --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From googleworkspace/cli, a repository with 30,193 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
