inboxd 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/inbox-assistant/SKILL.md +281 -0
- package/CLAUDE.md +34 -0
- package/README.md +34 -0
- package/package.json +1 -1
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: inbox-assistant
|
|
3
|
+
description: Manage Gmail inbox with AI-powered triage, cleanup, and restore. Use when the user mentions inbox, email triage, clean inbox, email cleanup, check email, email summary, delete emails, manage inbox, or wants to organize their email.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Inbox Assistant
|
|
7
|
+
|
|
8
|
+
**Why?** Email overload is real—most inboxes are cluttered with newsletters, promotions, and notifications that bury important messages. This skill applies expert classification to surface what matters and safely clean the rest.
|
|
9
|
+
|
|
10
|
+
Comprehensive Gmail inbox management using the `inboxd` CLI tool. Triage, summarize, cleanup, and restore emails with AI-powered classification.
|
|
11
|
+
|
|
12
|
+
## Quick Start
|
|
13
|
+
|
|
14
|
+
| Task | Command |
|
|
15
|
+
|------|---------|
|
|
16
|
+
| Check status | `inbox summary --json` |
|
|
17
|
+
| Full triage | `inbox analyze --count 50` → classify → present |
|
|
18
|
+
| Delete emails | `inbox delete --ids "id1,id2" --confirm` |
|
|
19
|
+
| Undo deletion | `inbox restore --last N` |
|
|
20
|
+
|
|
21
|
+
## Package Information
|
|
22
|
+
|
|
23
|
+
| | |
|
|
24
|
+
|---|---|
|
|
25
|
+
| **Package** | `inboxd` |
|
|
26
|
+
| **Install** | `npm install -g inboxd` |
|
|
27
|
+
| **Setup** | `inbox setup` (interactive wizard) |
|
|
28
|
+
| **Documentation** | https://github.com/dparedesi/inboxd |
|
|
29
|
+
| **npm** | https://www.npmjs.com/package/inboxd |
|
|
30
|
+
|
|
31
|
+
## Pre-flight Check
|
|
32
|
+
|
|
33
|
+
Before any inbox operation, always verify the setup:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# 1. Check if inboxd is installed
|
|
37
|
+
inbox --version
|
|
38
|
+
|
|
39
|
+
# 2. Check if accounts are configured
|
|
40
|
+
inbox accounts
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### If Not Installed
|
|
44
|
+
|
|
45
|
+
> [!TIP]
|
|
46
|
+
> Guide the user through installation—it takes about 5 minutes.
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
inboxd is not installed. To install:
|
|
50
|
+
|
|
51
|
+
1. Run: npm install -g inboxd
|
|
52
|
+
2. Run: inbox setup
|
|
53
|
+
3. Follow the wizard to configure your Gmail account
|
|
54
|
+
|
|
55
|
+
The setup requires creating OAuth credentials in Google Cloud Console.
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### If No Accounts Configured
|
|
59
|
+
```
|
|
60
|
+
No Gmail accounts configured. Run: inbox setup
|
|
61
|
+
|
|
62
|
+
This will guide you through:
|
|
63
|
+
1. Creating OAuth credentials in Google Cloud Console
|
|
64
|
+
2. Authenticating your Gmail account
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Command Reference
|
|
68
|
+
|
|
69
|
+
### Status & Reading
|
|
70
|
+
|
|
71
|
+
| Command | Description | Output |
|
|
72
|
+
|---------|-------------|--------|
|
|
73
|
+
| `inbox summary --json` | Quick inbox overview | `{accounts: [{name, email, unreadCount}], totalUnread}` |
|
|
74
|
+
| `inbox analyze --count 50` | Get email data for analysis | JSON array of email objects |
|
|
75
|
+
| `inbox analyze --count 50 --all` | Include read emails | JSON array (read + unread) |
|
|
76
|
+
| `inbox accounts` | List configured accounts | Account names and emails |
|
|
77
|
+
|
|
78
|
+
### Actions
|
|
79
|
+
|
|
80
|
+
| Command | Description |
|
|
81
|
+
|---------|-------------|
|
|
82
|
+
| `inbox delete --ids "id1,id2,id3" --confirm` | Move emails to trash |
|
|
83
|
+
| `inbox restore --last N` | Restore last N deleted emails |
|
|
84
|
+
| `inbox restore --ids "id1,id2"` | Restore specific emails |
|
|
85
|
+
| `inbox deletion-log` | View recent deletions |
|
|
86
|
+
|
|
87
|
+
### Email Object Shape
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"id": "18e9abc123",
|
|
91
|
+
"threadId": "18e9abc123",
|
|
92
|
+
"from": "Sender Name <sender@example.com>",
|
|
93
|
+
"subject": "Email Subject Line",
|
|
94
|
+
"snippet": "Preview of the email content...",
|
|
95
|
+
"date": "Fri, 03 Jan 2026 10:30:00 -0800",
|
|
96
|
+
"account": "personal",
|
|
97
|
+
"labelIds": ["UNREAD", "INBOX", "CATEGORY_PROMOTIONS"]
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Workflow
|
|
102
|
+
|
|
103
|
+
### 1. Check Inbox Status
|
|
104
|
+
```bash
|
|
105
|
+
inbox summary --json
|
|
106
|
+
```
|
|
107
|
+
Report the total unread count and per-account breakdown.
|
|
108
|
+
|
|
109
|
+
### 2. Fetch Emails for Analysis
|
|
110
|
+
```bash
|
|
111
|
+
inbox analyze --count 50
|
|
112
|
+
```
|
|
113
|
+
Parse the JSON output and classify each email.
|
|
114
|
+
|
|
115
|
+
### 3. Classify Emails
|
|
116
|
+
|
|
117
|
+
Categorize each email into one of these categories:
|
|
118
|
+
|
|
119
|
+
#### Important
|
|
120
|
+
- From known contacts or domains the user has corresponded with
|
|
121
|
+
- Contains urgent keywords: "urgent", "asap", "action required", "deadline"
|
|
122
|
+
- Direct replies to user's emails (Re: in subject)
|
|
123
|
+
- From the user's organization domain
|
|
124
|
+
|
|
125
|
+
#### Newsletters
|
|
126
|
+
- From contains: newsletter, digest, weekly, noreply, news@
|
|
127
|
+
- Subject contains: issue #, edition, roundup, weekly, digest
|
|
128
|
+
- Has CATEGORY_PROMOTIONS or CATEGORY_UPDATES label
|
|
129
|
+
|
|
130
|
+
#### Promotions
|
|
131
|
+
- From contains: marketing, promo, sales, deals, offers, shop
|
|
132
|
+
- Subject contains: % off, sale, discount, limited time, exclusive, deal, save
|
|
133
|
+
- Has CATEGORY_PROMOTIONS label
|
|
134
|
+
|
|
135
|
+
#### Notifications
|
|
136
|
+
- From contains: notify, alert, noreply, automated, no-reply
|
|
137
|
+
- Subject contains: notification, alert, update, reminder, receipt, confirmation
|
|
138
|
+
- Snippet is short (<50 chars) and appears templated (generic text like "You have a new notification" or "Your order has shipped")
|
|
139
|
+
- Has CATEGORY_UPDATES label
|
|
140
|
+
|
|
141
|
+
#### Low-Priority / Spam-like
|
|
142
|
+
- Repeated sender (>3 emails from same sender in batch)
|
|
143
|
+
- Generic/clickbait subjects
|
|
144
|
+
- No personalization in snippet
|
|
145
|
+
- Unknown sender with promotional tone
|
|
146
|
+
|
|
147
|
+
### 4. Present Summary
|
|
148
|
+
|
|
149
|
+
Show the user a categorized breakdown:
|
|
150
|
+
```
|
|
151
|
+
## Inbox Analysis
|
|
152
|
+
|
|
153
|
+
**Total Unread:** 47 emails across 2 accounts
|
|
154
|
+
|
|
155
|
+
### By Category:
|
|
156
|
+
- Important: 5 emails
|
|
157
|
+
- Newsletters: 12 emails
|
|
158
|
+
- Promotions: 18 emails
|
|
159
|
+
- Notifications: 8 emails
|
|
160
|
+
- Low-Priority: 4 emails
|
|
161
|
+
|
|
162
|
+
### Recommended for Cleanup:
|
|
163
|
+
I found 22 emails that could be deleted:
|
|
164
|
+
- 12 newsletters (older than 3 days)
|
|
165
|
+
- 8 promotional emails
|
|
166
|
+
- 2 duplicate notifications
|
|
167
|
+
|
|
168
|
+
Would you like me to show the list before deleting?
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### 5. Show Deletion Candidates
|
|
172
|
+
|
|
173
|
+
> [!CAUTION]
|
|
174
|
+
> Always show the full list before any deletion. Never skip this step.
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
## Emails Recommended for Deletion
|
|
178
|
+
|
|
179
|
+
### Newsletters (12)
|
|
180
|
+
1. "TechCrunch Daily" - Issue #423: AI News...
|
|
181
|
+
2. "Morning Brew" - Your Daily Digest...
|
|
182
|
+
...
|
|
183
|
+
|
|
184
|
+
### Promotions (8)
|
|
185
|
+
1. "Amazon" - 50% off electronics...
|
|
186
|
+
2. "Best Buy" - Limited time deals...
|
|
187
|
+
...
|
|
188
|
+
|
|
189
|
+
Delete these 20 emails? (y/n)
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### 6. Execute Deletion
|
|
193
|
+
|
|
194
|
+
Only after explicit user confirmation:
|
|
195
|
+
```bash
|
|
196
|
+
inbox delete --ids "id1,id2,id3,..." --confirm
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### 7. Confirm & Remind About Undo
|
|
200
|
+
|
|
201
|
+
After deletion:
|
|
202
|
+
```
|
|
203
|
+
Deleted 20 emails successfully.
|
|
204
|
+
|
|
205
|
+
To undo, run: inbox restore --last 20
|
|
206
|
+
Deletion log: inbox deletion-log
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Safety Rules
|
|
210
|
+
|
|
211
|
+
> [!CAUTION]
|
|
212
|
+
> These rules are non-negotiable. Violating them risks deleting important emails.
|
|
213
|
+
|
|
214
|
+
1. **NEVER auto-delete** - Always show what will be deleted and wait for explicit confirmation
|
|
215
|
+
2. **NEVER delete "Important" emails** - Do not even suggest deleting emails classified as Important
|
|
216
|
+
3. **Show sender + subject** - User must see exactly what will be deleted
|
|
217
|
+
4. **Batch limit: 20** - For large cleanups, suggest multiple passes
|
|
218
|
+
5. **Always remind about undo** - After every deletion, mention `inbox restore --last N`
|
|
219
|
+
6. **Preserve by default** - When in doubt about classification, keep the email
|
|
220
|
+
|
|
221
|
+
## Common Mistakes to Avoid
|
|
222
|
+
|
|
223
|
+
| Mistake | Why It's Wrong | Correct Approach |
|
|
224
|
+
|---------|----------------|------------------|
|
|
225
|
+
| Deleting without showing the list first | User can't verify what's being deleted | Always show full list, wait for "yes" |
|
|
226
|
+
| Suggesting deletion of "Re:" emails | These are often important replies | Classify as Important, never suggest deletion |
|
|
227
|
+
| Batching >20 emails at once | Harder to undo, overwhelming to review | Suggest multiple passes |
|
|
228
|
+
| Skipping pre-flight check | Tool may not be installed | Always run `inbox --version` first |
|
|
229
|
+
| Forgetting the `--confirm` flag | Command will hang waiting for input | Always include `--confirm` for non-interactive |
|
|
230
|
+
|
|
231
|
+
## Example Interactions
|
|
232
|
+
|
|
233
|
+
### "Clean up my inbox"
|
|
234
|
+
1. Run `inbox summary --json` to check status
|
|
235
|
+
2. Run `inbox analyze --count 50` to get emails
|
|
236
|
+
3. Classify and present summary
|
|
237
|
+
4. Show deletion candidates (excluding Important)
|
|
238
|
+
5. Wait for explicit confirmation
|
|
239
|
+
6. Execute and remind about undo
|
|
240
|
+
|
|
241
|
+
### "What's in my inbox?"
|
|
242
|
+
1. Run `inbox summary --json`
|
|
243
|
+
2. Report counts per account
|
|
244
|
+
3. Offer full triage if count is high
|
|
245
|
+
|
|
246
|
+
### "Undo last deletion"
|
|
247
|
+
1. Run `inbox restore --last 1`
|
|
248
|
+
2. Confirm restoration
|
|
249
|
+
|
|
250
|
+
## Multi-Account Support
|
|
251
|
+
|
|
252
|
+
> [!TIP]
|
|
253
|
+
> When user has multiple accounts, always show which account each email belongs to.
|
|
254
|
+
|
|
255
|
+
- Group recommendations by account
|
|
256
|
+
- Allow user to specify account: "clean up my work inbox"
|
|
257
|
+
- Use `--account <name>` flag when needed
|
|
258
|
+
|
|
259
|
+
## Troubleshooting
|
|
260
|
+
|
|
261
|
+
| Problem | Solution |
|
|
262
|
+
|---------|----------|
|
|
263
|
+
| `command not found: inbox` | Run: `npm install -g inboxd` |
|
|
264
|
+
| "No accounts configured" | Run: `inbox setup` |
|
|
265
|
+
| Token expired / auth errors | Delete token and re-auth: `rm ~/.config/inboxd/token-<account>.json && inbox auth -a <account>` |
|
|
266
|
+
| Permission errors on delete | Re-authenticate: `inbox logout -a <account> && inbox auth -a <account>` |
|
|
267
|
+
|
|
268
|
+
## Testing
|
|
269
|
+
|
|
270
|
+
### Evaluation Scenarios
|
|
271
|
+
|
|
272
|
+
| Scenario | Expected Behavior | Failure Indicator |
|
|
273
|
+
|----------|-------------------|-------------------|
|
|
274
|
+
| User says "clean my inbox" | Run summary → analyze → classify → present → wait for confirmation | Auto-deletes without confirmation |
|
|
275
|
+
| inboxd not installed | Detect missing tool, guide installation | Proceeds to run commands that fail |
|
|
276
|
+
| User says "delete all emails" | Show list first, ask for confirmation | Deletes without showing list |
|
|
277
|
+
| User says "undo" | Run `inbox restore --last N` | Fails to restore or wrong count |
|
|
278
|
+
|
|
279
|
+
### Model Coverage
|
|
280
|
+
- Tested with: Sonnet, Opus
|
|
281
|
+
- Pre-flight check critical for all models to avoid tool errors
|
package/CLAUDE.md
CHANGED
|
@@ -80,3 +80,37 @@ All user data lives in `~/.config/inboxd/`:
|
|
|
80
80
|
4. The `publish.yml` workflow will automatically test and publish to npm
|
|
81
81
|
- Note: `src/cli.js` dynamically imports version from `package.json` to ensure consistency
|
|
82
82
|
|
|
83
|
+
## AI Agent Integration
|
|
84
|
+
|
|
85
|
+
This package includes a Claude Code skill for AI-powered inbox management.
|
|
86
|
+
|
|
87
|
+
### Skill Location
|
|
88
|
+
`.claude/skills/inbox-assistant/SKILL.md`
|
|
89
|
+
|
|
90
|
+
### What the Skill Provides
|
|
91
|
+
- **Triage**: Classify emails (Important, Newsletters, Promotions, Notifications, Low-Priority)
|
|
92
|
+
- **Cleanup**: Identify and delete low-value emails with user confirmation
|
|
93
|
+
- **Restore**: Undo accidental deletions
|
|
94
|
+
- **Safety**: Never auto-deletes, batch limits, always shows what will be deleted
|
|
95
|
+
|
|
96
|
+
### Key Commands for AI Use
|
|
97
|
+
| Command | Purpose |
|
|
98
|
+
|---------|---------|
|
|
99
|
+
| `inbox summary --json` | Quick status check (unread counts) |
|
|
100
|
+
| `inbox analyze --count 50` | Get email data as JSON for classification |
|
|
101
|
+
| `inbox delete --ids "id1,id2" --confirm` | Delete with confirmation flag |
|
|
102
|
+
| `inbox restore --last N` | Undo last N deletions |
|
|
103
|
+
|
|
104
|
+
### Email Object Shape (from `analyze`)
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"id": "18e9abc123",
|
|
108
|
+
"from": "Sender <email@example.com>",
|
|
109
|
+
"subject": "Email Subject",
|
|
110
|
+
"snippet": "Preview text...",
|
|
111
|
+
"date": "Fri, 03 Jan 2026 10:30:00 -0800",
|
|
112
|
+
"account": "personal",
|
|
113
|
+
"labelIds": ["UNREAD", "CATEGORY_PROMOTIONS"]
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
package/README.md
CHANGED
|
@@ -141,6 +141,40 @@ Or use the `analyze` command for structured output:
|
|
|
141
141
|
inbox analyze --count 20
|
|
142
142
|
```
|
|
143
143
|
|
|
144
|
+
## AI Agent Integration
|
|
145
|
+
|
|
146
|
+
This package includes a Claude Code skill for AI-powered inbox management. The skill provides expert-level email triage, cleanup recommendations, and safe deletion workflows.
|
|
147
|
+
|
|
148
|
+
### Using with Claude Code
|
|
149
|
+
|
|
150
|
+
1. Copy the skill to your Claude Code skills directory:
|
|
151
|
+
```bash
|
|
152
|
+
cp -r node_modules/inboxd/.claude/skills/inbox-assistant ~/.claude/skills/
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
2. Invoke with `/inbox-assistant` or just ask Claude to manage your inbox.
|
|
156
|
+
|
|
157
|
+
### What the Skill Does
|
|
158
|
+
|
|
159
|
+
| Capability | Description |
|
|
160
|
+
|------------|-------------|
|
|
161
|
+
| **Triage** | Classifies emails into Important, Newsletters, Promotions, Notifications, Low-Priority |
|
|
162
|
+
| **Cleanup** | Identifies deletable emails and presents them for confirmation |
|
|
163
|
+
| **Restore** | Provides undo capability for accidental deletions |
|
|
164
|
+
| **Safety** | Never auto-deletes, enforces batch limits, always shows before deleting |
|
|
165
|
+
|
|
166
|
+
### CLI vs MCP
|
|
167
|
+
|
|
168
|
+
Unlike an MCP server that exposes raw Gmail API primitives, `inboxd` provides **opinionated commands** with built-in safety:
|
|
169
|
+
|
|
170
|
+
| inboxd CLI | Raw Gmail MCP |
|
|
171
|
+
|------------|---------------|
|
|
172
|
+
| `inbox delete` logs before trashing | Just trashes |
|
|
173
|
+
| `inbox restore` removes from log | Just untrashes |
|
|
174
|
+
| `inbox analyze` formats for AI consumption | Raw API response |
|
|
175
|
+
|
|
176
|
+
The skill layer adds expert workflow guidance on top of these commands.
|
|
177
|
+
|
|
144
178
|
## Uninstalling
|
|
145
179
|
|
|
146
180
|
To remove the package:
|