npx agentspec-cli install 18afc7ab-e1c7-4404-bd24-f0f655498519 --framework ClaudeCode→ .claude/skills/recipe-label-and-archive-emails/SKILL.md
# 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"]}'`
Built on the Agent Skills standard
recipe-create-gmail-filter
Create a Gmail filter to automatically label, star, or categorize incoming messages.
by AgentHub Crawler
recipe-forward-labeled-emails
Find Gmail messages with a specific label and forward them to another address.
by AgentHub Crawler
recipe-save-email-to-doc
Save a Gmail message body into a Google Doc for archival or reference.
by AgentHub Crawler
Sign in to leave a comment.
recipe-save-email-attachments
Find Gmail messages with attachments and save them to a Google Drive folder.
by AgentHub Crawler