plugins/google-workspace-cli/skills/gmail/SKILL.md
Use this skill when the user asks about reading, sending, searching, or managing emails via the Google Workspace CLI. Trigger on Gmail-related tasks like composing emails, searching inbox, managing labels, archiving, or working with drafts.
npx skillsauth add nsheaps/ai-mktpl gmailInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use gws gmail to interact with Gmail from the command line.
# List recent emails
gws gmail list
# List unread emails
gws gmail list --unread --limit 20
# Search emails (uses Gmail search syntax)
gws gmail search "from:[email protected]"
gws gmail search "subject:meeting is:unread"
gws gmail search "has:attachment newer_than:7d"
gws gmail search "label:important in:inbox"
# Read a specific message
gws gmail read <message-id>
# Read with full headers
gws gmail read <message-id> --full
# Read as JSON for parsing
gws gmail read <message-id> --format json
# Send a new email
gws gmail send --to "[email protected]" --subject "Hello" --body "Message body"
# Send with CC/BCC
gws gmail send --to "[email protected]" --cc "[email protected]" --subject "Hello" --body "Body"
# Reply to a message
gws gmail reply <message-id> --body "Thanks for the update"
# Forward a message
gws gmail forward <message-id> --to "[email protected]"
# Create a draft
gws gmail draft create --to "[email protected]" --subject "Draft" --body "Content"
# List drafts
gws gmail draft list
# Send a draft
gws gmail draft send <draft-id>
# Archive a message
gws gmail archive <message-id>
# Mark as read/unread
gws gmail mark-read <message-id>
gws gmail mark-unread <message-id>
# Add/remove labels
gws gmail label add <message-id> "MyLabel"
gws gmail label remove <message-id> "MyLabel"
# Move to trash
gws gmail trash <message-id>
# List all labels
gws gmail labels list
# Create a label
gws gmail labels create "MyNewLabel"
Gmail supports powerful search operators:
| Operator | Example | Description |
| ------------- | ------------------------- | ---------------- |
| from: | from:[email protected] | Sender |
| to: | to:[email protected] | Recipient |
| subject: | subject:meeting | Subject line |
| is: | is:unread, is:starred | Message state |
| has: | has:attachment | Has attachments |
| in: | in:inbox, in:sent | Mailbox location |
| label: | label:important | Has label |
| newer_than: | newer_than:7d | Date range |
| older_than: | older_than:30d | Date range |
| filename: | filename:pdf | Attachment type |
All commands support --format json for machine-readable output:
gws gmail list --format json | jq '.[].subject'
tools
Manually reproduce what the github-app plugin's SessionStart hook does to make a GitHub App installation token usable in the current session — materialize the PEM, generate the token, isolate GH_CONFIG_DIR, write the runtime env file, and wire CLAUDE_ENV_FILE so every Bash call sees GH_TOKEN/GITHUB_TOKEN. Use when the hook did not run, the token is missing from the environment, or a shell/teammate needs the token wired up by hand. <example>GH_TOKEN isn't set even though github-app is configured</example> <example>the github-app SessionStart hook didn't run, set up the token manually</example> <example>wire the github app token into CLAUDE_ENV_FILE</example> <example>gh keeps falling back to the wrong account, isolate GH_CONFIG_DIR</example>
tools
Manually configure the GitHub App bot git identity the way the github-app plugin's SessionStart hook does — resolve the app slug and bot user ID, build the <slug>[bot] name and noreply email, set GIT_AUTHOR_*/GIT_COMMITTER_* env vars, and write an isolated GIT_CONFIG_GLOBAL with the gh auth git-credential helper. Use when commits are attributed to the wrong account, "Author identity unknown" appears, or git identity must be set up by hand. <example>my commits are showing up as the handler, not the bot</example> <example>git says Author identity unknown after the github-app hook ran</example> <example>configure the github app bot git identity manually</example> <example>set up the gh credential helper for git push</example>
tools
Manages spec files for requirements capture and validation
tools
# Bash Chaining Alternatives This skill teaches you how to work around the bash command chaining restriction enforced by this plugin. ## Why Chaining is Blocked The `bash-command-rejection` plugin blocks these operators: | Operator | Name | Why Blocked | | -------- | ---------- | ----------------------------------------------------------------------------------- | | `&&` | AND chain | Runs cmd2 only if cmd1 su