技能圖譜SKILLSGROVE
技能圖譜/效率工具/aiagentwithdhruv/skills/gmail-inbox

gmail-inbox

安裝

$npx skills add https://github.com/aiagentwithdhruv/skills --skill gmail-inbox
$git clone --depth 1 https://github.com/aiagentwithdhruv/skills.git /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/gmail-inbox ~/.claude/skills/gmail-inbox
請幫我安裝這個 Agent Skill:https://github.com/aiagentwithdhruv/skills/tree/2f4c62c203b1279e82979f2d78776ce846e5a30c/gmail-inbox ,先閱讀它的 SKILL.md 和指令碼,確認安全後再安裝到我的技能目錄。

簡介

原文描述 · MITManage emails across multiple Gmail accounts with unified tooling. Use when user asks to check email, read inbox, label emails, archive messages, or manage Gmail across accounts.
以下 SKILL.md 內容轉載自 aiagentwithdhruv/skills(提交 2f4c62c),依據 MIT 許可證轉載正文(文字未改動;僅省略檔案頭後設資料、將圖片顯示為連結,超長內容會截斷);版權歸 2026 Dhruv Tomar (AIwithDhruv) 所有。許可證:LICENSE。僅展示說明檔案,附帶指令碼請在原倉庫檢視。

Gmail Inbox Management

Goal

Check and manage emails across multiple Gmail accounts using unified tooling.

Scripts

  • ./scripts/gmail_unified.py - Check and manage inboxes
  • ./scripts/gmail_multi_auth.py - Authenticate accounts
  • ./scripts/gmail_bulk_label.py - Bulk labeling
  • ./scripts/gmail_create_filters.py - Create filters
  • ./scripts/gmail_auth.py - Auth helper

Quick Reference

# Check unread across all accounts
python3 ./scripts/gmail_unified.py --query "is:unread" --limit 50

# Check specific account only
python3 ./scripts/gmail_unified.py --query "is:unread" --account yourcompany

# List registered accounts
python3 ./scripts/gmail_unified.py --accounts

# Label and archive emails
python3 ./scripts/gmail_unified.py --query "from:notifications@" --label "Notifications" --archive

# Mark as read
python3 ./scripts/gmail_unified.py --query "from:noreply@" --mark-read

# Dry run (preview)
python3 ./scripts/gmail_unified.py --query "subject:invoice" --label "Invoices" --dry-run

Account Registry

Account Email Credentials Token
youruser you@example.com credentials.json token_youruser.json
yourcompany you@yourdomain.com credentials_yourcompany.json token_yourcompany.json

Troubleshooting Auth Errors

"Token file not found"

python3 ./scripts/gmail_multi_auth.py --account yourcompany --email you@yourdomain.com

"invalid_scope: Bad Request"

rm token_youruser.json
python3 ./scripts/gmail_multi_auth.py --account youruser --email you@example.com

"Failed to authenticate" Check that credentials.json exists in root directory.

Required Scopes

  • gmail.modify - Read/write emails
  • gmail.labels - Create/manage labels
  • gmail.settings.basic - Manage settings
  • spreadsheets - Google Sheets access
  • drive - Google Drive access

Credentials Location

All credential files should be in the workspace root:

  • credentials.json / credentials_yourcompany.json - OAuth client configs
  • token_*.json - Auth tokens (auto-generated)
  • gmail_accounts.json - Account registry

Schema

Inputs

Name Type Required Description
query string No Gmail search query (e.g., 'is:unread')
account string No Specific account name from registry
limit integer No Max emails to fetch (default: 50)

Outputs

Name Type Description
emails array List of email objects with subject, from, date, snippet

Credentials

Name Source
credentials.json file
token_*.json file (auto-generated)

Composable With

Skills that chain well with this one: gmail-label, instantly-autoreply

Cost

Free (Gmail API)

檢視許可證全文(MIT)
MIT License

Copyright (c) 2026 Dhruv Tomar (AIwithDhruv)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.