gmail-cleanup
БесплатноЗапускает вложенные скриптыНе проверенApproval-gated Gmail cleanup — triage your inbox into spam/info/action lanes, draft replies, and archive or trash only after you approve on Telegram.
от joeyang001444 установки в других каталогахОб этом скилле
gmail-cleanup
Approval-gated Gmail triage: classify inbox mail into three lanes, propose cleanup and reply drafts, route every decision through Telegram, and execute only what the owner approves. Nothing is sent or trashed automatically.
Built on the gog skill (Google Workspace CLI). Requires the gog skill and a
configured Telegram channel.
Changelog
- v8 (2026-10-13): added
scripts/delta-scan.sh— scans mail new since the last run (watermark-based delta, 24h bootstrap) instead of the newest N, so nothing is missed between runs. Documented grouped bulk digests and a day/night cadence example. Scripts still requireGOG_KEYRING_PASSWORDfrom the environment only. - v7 (2026-10-12): Setup step 2 shows a plain
export GOG_KEYRING_PASSWORD='***'example alongside the secret-manager form. No script changes. - v6 (2026-10-12): reworded the Setup credential step — supply
GOG_KEYRING_PASSWORDper run from a secret manager; do not persist or commit it. - v5 (2026-10-12): tightened the summary and added a concrete Setup section.
- v4 (2026-10-12): scripts no longer read credential files or honor an
env-selected binary.
GOG_KEYRING_PASSWORDmust be supplied by the caller (no fallback to~/.config/gogcli/keyring.pass), and the Workspace CLI is invoked asgogfromPATHonly (noGOG_BINoverride). - v3 (2026-10-12):
cleanup-execute.pynow enforces the approval, dry-run, and send gates in code: dry-run is the default;--applyis refused without an explicitapproval{approved,approvedBy,approvedAt}artifact;send-draftadditionally requires--sendand per-action"sendApproved": trueandsafety.blockAllSends == false. - v2 (2026-10-12): hardened
triage-scan.py— retry + exponential backoff on Gmail403 rateLimitExceeded, optional per-request pacing, and tolerance for malformed/partial API responses (skipped, not fatal).
Setup
Authenticate
gogfor the target account —gog auth add [email protected](confirm withgog auth list).Provide the keyring password to the run (required).
gogneedsGOG_KEYRING_PASSWORDin the environment to unlock its keyring without an interactive prompt. The scripts require it and never read credential files themselves. Export it for the run — ideally sourced from a secret manager rather than typed in plaintext:export GOG_KEYRING_PASSWORD='<your gog keyring password>' # current session only # or, sourced from a secret manager: export GOG_KEYRING_PASSWORD="$(pass show gog-keyring)" # current session onlyDo not commit the secret or persist it in shell rc; prefer a secret manager or CI secret store for scheduled runs.
Put
gogonPATH. The scripts callgogdirectly and accept no override.Configure the Telegram channel in OpenClaw (
channels.telegram) with the owner's numeric user id in an allowlist. Outbound usesopenclaw message send.Create the state dir and config:
mkdir -p state/gmail-cleanup cp skills/gmail-cleanup/templates/config.example.json state/gmail-cleanup/config.json # then edit account + notify.target
Lanes
| Lane | Meaning | Standing action |
|---|---|---|
spam_suspect |
missed spam — cold outreach, lookalike/sketchy domains, scam phrasing, no prior thread | trash, on approval only |
info_only |
informational, no action needed — receipts, shipping, statements, newsletters, notifications, noreply@, List-Unsubscribe present |
mark-read + archive |
action_required |
needs the owner — real humans asking something, bills/invoices with deadlines, security/account alerts, invites | keep + draft a reply |
Every lane's action and whether it needs approval are config-driven (see
templates/config.example.json). Defaults match the owner's standing choices:
archive for info-only, trash-on-approval for spam, draft-on-approval for replies.
Config
state/gmail-cleanup/config.json — copy from templates/config.example.json.
Everything the workflow does is data-driven here; no skill edits needed to retune.
account— Gmail address.scope.query— base Gmail search syntax; the scope knob (e.g.in:inbox). Whenscripts/delta-scan.shruns, it replaces this at runtime within:inbox after:<lastScanEpoch>so only the delta window is fetched.scope.extraQueries[]merges additional queries (e.g.category:promotions). De-duplicated by id.policy.<lane>.action—trash|archive|mark-read|none.policy.<lane>.requiresApproval— true/false.policy.action_required.draftReply/sendRequiresApproval.limits.scanMax— max candidates fetched per run (a safety cap, not the primary scope). In delta mode this caps a single run; keep it modest (≈50–200). Per-messagegetis API-costly, so a cap prevents a runaway backfill.- `
Установить gmail-cleanup в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл gmail-cleanup?
Approval-gated Gmail cleanup — triage your inbox into spam/info/action lanes, draft replies, and archive or trash only after you approve on Telegram.
Как установить скилл gmail-cleanup?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл gmail-cleanup запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic