Phase 1 of plugin-structure refactor: - Add hooks/hooks.json for SessionStart automation - Refactor gmail skill: - Extract inline scripts to scripts/check_unread.py, check_urgent.py, search.py - Add references/query-patterns.md for query documentation - Simplify SKILL.md to reference scripts instead of inline code - Add gcal/scripts/agenda.py for direct calendar access - Make all scripts executable This follows the "Skill with Bundled Resources" pattern from developing-claude-code-plugins best practices. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
58 lines
1.4 KiB
Markdown
58 lines
1.4 KiB
Markdown
# Gmail Query Patterns
|
|
|
|
## Basic Queries
|
|
|
|
| Request | Gmail Query |
|
|
|---------|-------------|
|
|
| Unread | `is:unread` |
|
|
| Last N days | `newer_than:Nd` |
|
|
| From sender | `from:email@example.com` |
|
|
| To recipient | `to:email@example.com` |
|
|
| With attachments | `has:attachment` |
|
|
| Important | `is:important` |
|
|
| Starred | `is:starred` |
|
|
| In inbox | `in:inbox` |
|
|
|
|
## Urgent/Priority
|
|
|
|
| Pattern | Query |
|
|
|---------|-------|
|
|
| Urgent keywords | `subject:(urgent OR asap OR "action required")` |
|
|
| Important + unread | `is:important is:unread` |
|
|
| Time-sensitive | `subject:(deadline OR "due date" OR "end of day")` |
|
|
|
|
## Sender Patterns
|
|
|
|
| Pattern | Query |
|
|
|---------|-------|
|
|
| GitHub notifications | `from:github.com` |
|
|
| Google alerts | `from:googlealerts-noreply@google.com` |
|
|
| Calendar invites | `from:calendar-notification@google.com` |
|
|
| Newsletters | `category:promotions` |
|
|
|
|
## Combining Queries
|
|
|
|
Queries can be combined:
|
|
|
|
```
|
|
is:unread newer_than:7d from:github.com
|
|
is:unread (subject:urgent OR is:important) newer_than:3d
|
|
has:attachment from:client@example.com newer_than:30d
|
|
```
|
|
|
|
## Date Queries
|
|
|
|
| Pattern | Query |
|
|
|---------|-------|
|
|
| Last 24 hours | `newer_than:1d` |
|
|
| Last week | `newer_than:7d` |
|
|
| Last month | `newer_than:30d` |
|
|
| Specific date | `after:2024/01/01 before:2024/01/31` |
|
|
|
|
## Size Queries
|
|
|
|
| Pattern | Query |
|
|
|---------|-------|
|
|
| Large attachments | `larger:10M` |
|
|
| Small emails | `smaller:100K` |
|