Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

gmail-filter-architect

БесплатноЗапускает вложенные скриптыНе проверен

Design, verify and import a complete Gmail filter system: a small emoji label taxonomy, urgent mail starred, bills/finance/infra/codes labelled, marketing and…

kisssam6886от kisssam6886399 установок в других каталогах

Об этом скилле

Gmail Filter Architect

Goal: nothing important is missed, noise is archived automatically, and every message shows at a glance what it is and which account it came from.

The generator is scripts/build_filters.py. Your personal settings live in profiles/<you>.json (start from profiles/TEMPLATE.json, or profiles/example.zh-CN.json for Chinese labels and keywords). Never commit a real profile to a public repo.

0. Five rules (breaking any of them causes real damage)

  1. Every archiving filter carries the same protection group (protect). Gmail has no "move back to inbox" action and there is no "stop processing"; every matching filter runs. If any one filter archives a message, nothing can bring it back. The protection group excludes subjects about codes, security, login, passwords, bills, receipts, invoices, statements, overdue, renewal, suspension, abuse, tickets, "action required", plus critical senders (Apple, cloud providers, account security).
  2. CJK keywords only inside subject:. Gmail matches Chinese/Japanese/Korean as substrings, so a body match on 优惠 ("discount") also hits bank mail about 优惠利率 ("preferential rate"). In the first real run, body keyword filters had silently archived 85 transactional mails (hosting bills, credit card overdue notices, broker agreement updates, anti-fraud notices).
  3. Never use unsubscribe to detect marketing. Bank payment reminders, broker login alerts, receipts and GitHub notifications all have it in the footer. Use category:promotions / category:social (the plural form works in search; the singular returned 0) plus a known marketing sender list.
  4. No is:, label:, in: or dates in filters. New mail has none of those states, so they never match.
  5. One user label per filter, and keep each query under ~1,400 characters (Gmail rejects around 1,470–1,490 with "The specified filter is too long").

1. Sender census (read-only)

With the Gmail connector (search_threads, metadata view, page size 50):

  • Page through newer_than:90d (archived mail included). Group by sender address/domain: thread count, whether most sit in the inbox, one or two example subjects.
  • Put each sender in one bucket: urgent candidates (security, login, failed payment, suspension, abuse report, review rejection) · bills · infrastructure (cloud, VPS, CDN, DNS, registrar, GitHub, email delivery) · Apple / app stores · finance (list transactional and marketing addresses separately) · verification codes · own business · marketing / social / cold outreach · real people.
  • Check specifically: do banks, cards, brokers and exchanges send marketing from different addresses than statements and alerts? (Usually yes, which lets you separate them exactly.) Which transactional mails have "discount / coupon / % off" or local-language equivalents in the subject?
  • On a large mailbox, give this to a background agent and ask for ready-to-paste from:{...} groups and subject keyword groups.

2. Write the profile, generate

Fill profiles/<you>.json: labels, protect, urgent, bill, infra, apple, fin (txn / mkt / exclude_compact / archive_rules), otp, biz, mkt (brand groups, social, cold, subject keywords), extra_rules (e.g. deliveredto: rules for forwarded accounts).

python3 scripts/build_filters.py profiles/<you>.json out/ --gmailctl

Outputs batchA.xml (label only), batchB.xml (star / archive), tests.json (one search query per filter) and, with --gmailctl, gmailctl.jsonnet. The script checks length and bracket balance.

Recommended labels (about ten; the emoji prefix makes them easy to spot and sorts them first):

Label Actions Inbox?
⚠️ Action star + important + never spam yes (new mail only)
💳 Bills / 🍎 Apple / 📈 Finance / 🔐 Codes / 🛠 Infra / 🏢 Business label + never spam yes
Marketing / Marketing/Social / Marketing/Cold archive + mark read + never important no
From/ label only (deliveredto:[email protected]) yes

High-volume routine infra and finance mail (DNS change confirmations, Search Console reports, GitHub CI, daily broker statements) gets its own "label + archive" rule, still with the protection group. For infra senders use a subject whitelist (archive only the routine subjects). Archiving a whole infra sender also swallowed its login codes, "zone deleted" alerts and nameserver warnings in the first run.

3. Verify every rule against real mail (before importing)

Run each query in tests.json as (<query>) newer_than:90d and read the first 30 subjects:

  • Archiving rules: any bill, renewal/expiry notice, security or login alert, code, failed payment, account warning, app review, cloud provider notice or human reply among the hits is a serious misfire. Add it to the protection group or exclude the sender.
  • Star rules: estimate stars per week. If marketing gets starred, exclude that sender. One or two a day is the usef
Полный SKILL.md на ClawHub

Установить gmail-filter-architect в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл gmail-filter-architect?

Design, verify and import a complete Gmail filter system: a small emoji label taxonomy, urgent mail starred, bills/finance/infra/codes labelled, marketing and social auto-archived, forwarded accounts tagged by source. Built from a 90-day sender census of your own mailbox, every rule is checked against your real mail for misfires before import, and every archiving rule carries a shared protection group so bills, codes and security alerts are never hidden. Use for: cleaning up Gmail filters, bills landing in promotions, important mail getting archived, 'set up the best Gmail filters', labelling mail forwarded from other accounts. 中文:整理 Gmail 过滤器、账单被当营销收走、重要邮件看不到、转发来的邮件标记来源账号、要一套最好的过滤规则。

Как установить скилл gmail-filter-architect?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл gmail-filter-architect запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить gmail-filter-architect с