@inboxapi/cli 0.3.1 → 0.3.2
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/README.md +21 -9
- package/package.json +7 -7
- package/{claude/skills → skills/claude}/setup-inboxapi/SKILL.md +16 -4
- package/skills/codex/check-inbox/SKILL.md +37 -0
- package/skills/codex/compose/SKILL.md +54 -0
- package/skills/codex/email-digest/SKILL.md +57 -0
- package/skills/codex/email-forward/SKILL.md +54 -0
- package/skills/codex/email-reply/SKILL.md +55 -0
- package/skills/codex/email-search/SKILL.md +43 -0
- package/skills/codex/setup-inboxapi/SKILL.md +47 -0
- package/skills/gemini/check-inbox/SKILL.md +37 -0
- package/skills/gemini/compose/SKILL.md +54 -0
- package/skills/gemini/email-digest/SKILL.md +57 -0
- package/skills/gemini/email-forward/SKILL.md +54 -0
- package/skills/gemini/email-reply/SKILL.md +55 -0
- package/skills/gemini/email-search/SKILL.md +43 -0
- package/skills/gemini/setup-inboxapi/SKILL.md +56 -0
- package/skills/opencode/check-inbox.md +36 -0
- package/skills/opencode/compose.md +53 -0
- package/skills/opencode/email-digest.md +56 -0
- package/skills/opencode/email-forward.md +53 -0
- package/skills/opencode/email-reply.md +54 -0
- package/skills/opencode/email-search.md +36 -0
- package/skills/opencode/setup-inboxapi.md +55 -0
- /package/{claude/skills → skills/claude}/check-inbox/SKILL.md +0 -0
- /package/{claude/skills → skills/claude}/compose/SKILL.md +0 -0
- /package/{claude/skills → skills/claude}/email-digest/SKILL.md +0 -0
- /package/{claude/skills → skills/claude}/email-forward/SKILL.md +0 -0
- /package/{claude/skills → skills/claude}/email-reply/SKILL.md +0 -0
- /package/{claude/skills → skills/claude}/email-search/SKILL.md +0 -0
- /package/{claude → skills}/hooks/credential-check.js +0 -0
- /package/{claude → skills}/hooks/email-activity-logger.js +0 -0
- /package/{claude → skills}/hooks/email-send-guard.js +0 -0
package/README.md
CHANGED
|
@@ -147,11 +147,13 @@ inboxapi restore ./my-backup
|
|
|
147
147
|
|
|
148
148
|
### `setup-skills`
|
|
149
149
|
|
|
150
|
-
Installs
|
|
150
|
+
Installs InboxAPI skills for AI coding agents. Supports **Claude Code**, **Codex CLI**, **Gemini CLI**, and **OpenCode**. Auto-detects installed agents and prompts for confirmation, or use flags for non-interactive installation.
|
|
151
151
|
|
|
152
152
|
```bash
|
|
153
|
-
inboxapi setup-skills
|
|
154
|
-
inboxapi setup-skills --
|
|
153
|
+
inboxapi setup-skills # Auto-detect agents, interactive prompt
|
|
154
|
+
inboxapi setup-skills --all # Install for all 4 agents
|
|
155
|
+
inboxapi setup-skills --claude --codex # Install for specific agents
|
|
156
|
+
inboxapi setup-skills --force # Overwrite existing skills and hooks
|
|
155
157
|
```
|
|
156
158
|
|
|
157
159
|
## CLI Commands
|
|
@@ -279,14 +281,24 @@ When prompted, enter:
|
|
|
279
281
|
codex mcp add inboxapi inboxapi
|
|
280
282
|
```
|
|
281
283
|
|
|
282
|
-
## Skills for
|
|
284
|
+
## Skills for AI Coding Agents
|
|
283
285
|
|
|
284
|
-
InboxAPI includes
|
|
286
|
+
InboxAPI includes skills — slash commands and guided workflows — for multiple AI coding agents. Install them with:
|
|
285
287
|
|
|
286
288
|
```bash
|
|
287
|
-
inboxapi setup-skills
|
|
289
|
+
inboxapi setup-skills # Auto-detect and install
|
|
290
|
+
inboxapi setup-skills --all # Install for all agents
|
|
288
291
|
```
|
|
289
292
|
|
|
293
|
+
Skills are installed to agent-specific directories:
|
|
294
|
+
|
|
295
|
+
| Agent | Install Directory |
|
|
296
|
+
|-------|-------------------|
|
|
297
|
+
| Claude Code | `.claude/skills/` |
|
|
298
|
+
| Codex CLI | `.agents/skills/` |
|
|
299
|
+
| Gemini CLI | `.gemini/skills/` |
|
|
300
|
+
| OpenCode | `.opencode/commands/` |
|
|
301
|
+
|
|
290
302
|
### Available Skills
|
|
291
303
|
|
|
292
304
|
| Skill | Description |
|
|
@@ -297,11 +309,11 @@ inboxapi setup-skills
|
|
|
297
309
|
| `/email-reply` | Reply to an email with full thread context and preview before sending |
|
|
298
310
|
| `/email-digest` | Generate a structured digest of recent email activity grouped by threads |
|
|
299
311
|
| `/email-forward` | Forward an email to another recipient with an optional note |
|
|
300
|
-
| `/setup-inboxapi` | Configure InboxAPI MCP server and install skills
|
|
312
|
+
| `/setup-inboxapi` | Configure InboxAPI MCP server and install skills for your AI coding agent |
|
|
301
313
|
|
|
302
|
-
### Hooks
|
|
314
|
+
### Hooks (Claude Code only)
|
|
303
315
|
|
|
304
|
-
The `setup-skills` command also installs three hooks that run automatically:
|
|
316
|
+
The `setup-skills` command also installs three hooks for Claude Code that run automatically:
|
|
305
317
|
|
|
306
318
|
| Hook | Type | Description |
|
|
307
319
|
|------|------|-------------|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inboxapi/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "📧 Email for your AI 🤖",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"index.js",
|
|
11
|
-
"
|
|
11
|
+
"skills"
|
|
12
12
|
],
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"test": "cargo test"
|
|
29
29
|
},
|
|
30
30
|
"optionalDependencies": {
|
|
31
|
-
"@inboxapi/cli-darwin-arm64": "0.3.
|
|
32
|
-
"@inboxapi/cli-darwin-x64": "0.3.
|
|
33
|
-
"@inboxapi/cli-linux-arm64": "0.3.
|
|
34
|
-
"@inboxapi/cli-linux-x64": "0.3.
|
|
35
|
-
"@inboxapi/cli-win32-x64": "0.3.
|
|
31
|
+
"@inboxapi/cli-darwin-arm64": "0.3.2",
|
|
32
|
+
"@inboxapi/cli-darwin-x64": "0.3.2",
|
|
33
|
+
"@inboxapi/cli-linux-arm64": "0.3.2",
|
|
34
|
+
"@inboxapi/cli-linux-x64": "0.3.2",
|
|
35
|
+
"@inboxapi/cli-win32-x64": "0.3.2"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: setup-inboxapi
|
|
3
|
-
description: Set up InboxAPI email tools in your
|
|
3
|
+
description: Set up InboxAPI email tools in your AI coding agent. Adds MCP server config, installs skills, and configures safety hooks. Use when the user wants to configure InboxAPI for their project.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Setup InboxAPI
|
|
9
9
|
|
|
10
|
-
Configure InboxAPI email tools for this Claude Code
|
|
10
|
+
Configure InboxAPI email tools for this project. Supports Claude Code, Codex CLI, Gemini CLI, and OpenCode.
|
|
11
11
|
|
|
12
12
|
## Steps
|
|
13
13
|
|
|
@@ -28,7 +28,19 @@ Configure InboxAPI email tools for this Claude Code project.
|
|
|
28
28
|
}
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
**For other agents:**
|
|
32
|
+
- **Codex CLI**: `codex mcp add inboxapi -- npx -y @inboxapi/cli`
|
|
33
|
+
- **Gemini CLI**: Add to `settings.json` under `mcpServers`:
|
|
34
|
+
```json
|
|
35
|
+
{ "mcpServers": { "inboxapi": { "command": "npx", "args": ["-y", "@inboxapi/cli"] } } }
|
|
36
|
+
```
|
|
37
|
+
- **OpenCode**: Add to `opencode.json` under `mcp`:
|
|
38
|
+
```json
|
|
39
|
+
{ "mcp": { "inboxapi": { "command": "npx", "args": ["-y", "@inboxapi/cli"] } } }
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
3. **Install skills**: Run `npx -y @inboxapi/cli setup-skills` to install skills for detected agents
|
|
43
|
+
- Use `--all` to install for all agents, or `--claude`, `--codex`, `--gemini`, `--opencode` for specific ones
|
|
32
44
|
|
|
33
45
|
4. **Verify credentials**:
|
|
34
46
|
- Run: `npx -y @inboxapi/cli whoami` to check if credentials are set up
|
|
@@ -49,7 +61,7 @@ Configure InboxAPI email tools for this Claude Code project.
|
|
|
49
61
|
/email-digest — Email activity digest
|
|
50
62
|
/email-forward — Forward emails
|
|
51
63
|
|
|
52
|
-
Installed Hooks:
|
|
64
|
+
Installed Hooks (Claude Code only):
|
|
53
65
|
PreToolUse — Email send guard (reviews before sending)
|
|
54
66
|
PostToolUse — Activity logger (audit trail)
|
|
55
67
|
SessionStart — Credential check (verifies auth on startup)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: check-inbox
|
|
3
|
+
description: "Check your InboxAPI email inbox and display a summary of recent messages. Use when the user wants to see their emails, check mail, or view their inbox."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Check Inbox
|
|
7
|
+
|
|
8
|
+
Fetch and display a summary of recent emails from the user's InboxAPI inbox.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. Run: `npx -y @inboxapi/cli whoami` to identify the current account and email address
|
|
13
|
+
2. Run: `npx -y @inboxapi/cli get-email-count` to show the total number of emails
|
|
14
|
+
3. Run: `npx -y @inboxapi/cli get-emails --limit <N>` where `<N>` is `$ARGUMENTS` if provided, otherwise `20`
|
|
15
|
+
4. Present results in a formatted table with columns:
|
|
16
|
+
- **From** — sender name or address
|
|
17
|
+
- **Subject** — email subject line (truncated to 60 chars)
|
|
18
|
+
- **Date** — received date in relative format (e.g., "2 hours ago", "yesterday")
|
|
19
|
+
5. After the table, show a summary line: "Showing X of Y emails for <email>"
|
|
20
|
+
|
|
21
|
+
## Output Format
|
|
22
|
+
|
|
23
|
+
Use this markdown table format:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
| # | From | Subject | Date |
|
|
27
|
+
|---|------|---------|------|
|
|
28
|
+
| 1 | Alice <alice@example.com> | Re: Project update... | 2h ago |
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
If the inbox is empty, display: "Your inbox is empty. Your email address is <email>."
|
|
32
|
+
|
|
33
|
+
## Notes
|
|
34
|
+
|
|
35
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
36
|
+
- Do NOT read full email bodies — only show the summary list
|
|
37
|
+
- If the user asks to read a specific email after seeing the list, run `npx -y @inboxapi/cli get-email "<message-id>"` with the email ID
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: compose
|
|
3
|
+
description: "Compose and send an email with guided prompts, addressbook lookup, and send confirmation. Use when the user wants to write and send an email."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Compose Email
|
|
7
|
+
|
|
8
|
+
Guide the user through composing and sending an email safely.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Identify sender**: Run: `npx -y @inboxapi/cli whoami` to get the current account email address
|
|
13
|
+
|
|
14
|
+
2. **Resolve recipient**:
|
|
15
|
+
- If `$ARGUMENTS` is provided, use it as the recipient hint
|
|
16
|
+
- Run: `npx -y @inboxapi/cli get-addressbook` to check for matching contacts
|
|
17
|
+
- If multiple matches found, ask the user to pick one
|
|
18
|
+
- If no match, ask the user to confirm or provide the full email address
|
|
19
|
+
|
|
20
|
+
3. **Collect email details**: Ask the user for:
|
|
21
|
+
- **To**: Recipient email (pre-filled if resolved above)
|
|
22
|
+
- **Subject**: Email subject line
|
|
23
|
+
- **Body**: Email content (plain text)
|
|
24
|
+
|
|
25
|
+
4. **Preview**: Show the complete email before sending:
|
|
26
|
+
```
|
|
27
|
+
From: <your-email@inboxapi.ai>
|
|
28
|
+
To: <recipient@example.com>
|
|
29
|
+
Subject: <subject>
|
|
30
|
+
---
|
|
31
|
+
<body>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
5. **Safety checks**:
|
|
35
|
+
- Warn if the recipient address matches the sender's own @inboxapi.ai address
|
|
36
|
+
- Warn if the body is empty
|
|
37
|
+
- Warn if the subject is empty
|
|
38
|
+
|
|
39
|
+
6. **Confirm**: Ask the user to confirm: "Send this email? (yes/no)"
|
|
40
|
+
|
|
41
|
+
7. **Send**: Run: `npx -y @inboxapi/cli send-email --to "<recipient>" --subject "<subject>" --body "<body>"`
|
|
42
|
+
|
|
43
|
+
8. **Confirm delivery**: Report the result to the user
|
|
44
|
+
|
|
45
|
+
## Notes
|
|
46
|
+
|
|
47
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
48
|
+
|
|
49
|
+
## Rules
|
|
50
|
+
|
|
51
|
+
- ALWAYS show a preview before sending
|
|
52
|
+
- ALWAYS ask for explicit confirmation before calling send-email
|
|
53
|
+
- NEVER send an email without the user confirming
|
|
54
|
+
- If the user cancels, acknowledge and do not send
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: email-digest
|
|
3
|
+
description: "Generate a digest summary of recent email activity grouped by thread. Use when the user wants an overview of their email activity."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Email Digest
|
|
7
|
+
|
|
8
|
+
Generate a structured digest of recent email activity.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Determine timeframe**: Use `$ARGUMENTS` if provided (e.g., "today", "this week", "last 3 days"), otherwise default to "last 24 hours"
|
|
13
|
+
|
|
14
|
+
2. **Get account info**: Run: `npx -y @inboxapi/cli whoami` for the account email
|
|
15
|
+
|
|
16
|
+
3. **Get total count**: Run: `npx -y @inboxapi/cli get-email-count` for inbox statistics
|
|
17
|
+
|
|
18
|
+
4. **Fetch recent emails**: Run: `npx -y @inboxapi/cli get-emails --limit 50`
|
|
19
|
+
|
|
20
|
+
5. **Group by thread**: For threads with multiple emails, run `npx -y @inboxapi/cli get-thread --message-id "<message-id>"` to understand the conversation
|
|
21
|
+
|
|
22
|
+
6. **Generate digest** with these sections:
|
|
23
|
+
|
|
24
|
+
```markdown
|
|
25
|
+
# Email Digest — <timeframe>
|
|
26
|
+
Account: <email>
|
|
27
|
+
|
|
28
|
+
## Summary
|
|
29
|
+
- Total emails in inbox: X
|
|
30
|
+
- Emails in this period: Y
|
|
31
|
+
- Unique senders: Z
|
|
32
|
+
- Threads with activity: N
|
|
33
|
+
|
|
34
|
+
## Active Threads
|
|
35
|
+
### 1. <Subject>
|
|
36
|
+
- Participants: alice@..., bob@...
|
|
37
|
+
- Messages in period: 3
|
|
38
|
+
- Latest: "Brief preview of most recent message..."
|
|
39
|
+
- Status: Awaiting your reply / You replied / FYI only
|
|
40
|
+
|
|
41
|
+
## New Emails (not in threads)
|
|
42
|
+
| From | Subject | Date |
|
|
43
|
+
|------|---------|------|
|
|
44
|
+
| ... | ... | ... |
|
|
45
|
+
|
|
46
|
+
## Needs Attention
|
|
47
|
+
- Emails you haven't replied to where you were directly addressed
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
7. **Offer actions**: "Would you like to reply to any of these, or read a specific email?"
|
|
51
|
+
|
|
52
|
+
## Notes
|
|
53
|
+
|
|
54
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
55
|
+
- Focus on actionable insights, not raw data
|
|
56
|
+
- Highlight emails that likely need a response
|
|
57
|
+
- Keep the digest concise — summarize, don't reproduce full emails
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: email-forward
|
|
3
|
+
description: "Forward an email to someone with an optional message. Use when the user wants to forward a specific email to another person."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Email Forward
|
|
7
|
+
|
|
8
|
+
Help the user forward an email to another recipient.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Find the email to forward**:
|
|
13
|
+
- Try `npx -y @inboxapi/cli get-email "$ARGUMENTS"` first — if it succeeds, use that email
|
|
14
|
+
- If it fails (e.g., not a valid message ID), fall back to `npx -y @inboxapi/cli search-emails --subject "<query>"` with the argument
|
|
15
|
+
- If multiple results, show them and ask the user to pick one
|
|
16
|
+
|
|
17
|
+
2. **Show email content**: Display the email being forwarded:
|
|
18
|
+
```
|
|
19
|
+
--- Email to forward ---
|
|
20
|
+
From: <original sender>
|
|
21
|
+
Subject: <subject>
|
|
22
|
+
Date: <date>
|
|
23
|
+
---
|
|
24
|
+
<body preview, first 500 chars>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
3. **Resolve recipient**:
|
|
28
|
+
- Ask "Who do you want to forward this to?"
|
|
29
|
+
- Run: `npx -y @inboxapi/cli get-addressbook` to check for matching contacts
|
|
30
|
+
- Confirm the recipient email address
|
|
31
|
+
|
|
32
|
+
4. **Optional message**: Ask "Add a message? (or press enter to skip)"
|
|
33
|
+
|
|
34
|
+
5. **Preview**:
|
|
35
|
+
```
|
|
36
|
+
Forwarding to: <recipient>
|
|
37
|
+
Subject: Fwd: <original subject>
|
|
38
|
+
Your message: <optional message or "(none)">
|
|
39
|
+
Original email from: <sender>, <date>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
6. **Confirm**: Ask "Forward this email? (yes/no)"
|
|
43
|
+
|
|
44
|
+
7. **Send**: Run: `npx -y @inboxapi/cli forward-email --message-id "<id>" --to "<recipient>"` (add `--note "<message>"` if provided)
|
|
45
|
+
|
|
46
|
+
## Notes
|
|
47
|
+
|
|
48
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
49
|
+
|
|
50
|
+
## Rules
|
|
51
|
+
|
|
52
|
+
- ALWAYS show what's being forwarded before sending
|
|
53
|
+
- ALWAYS confirm before forwarding
|
|
54
|
+
- NEVER forward without explicit user confirmation
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: email-reply
|
|
3
|
+
description: "Reply to an email with full thread context. Use when the user wants to reply to a specific email or continue an email conversation."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Email Reply
|
|
7
|
+
|
|
8
|
+
Help the user reply to an email with full thread context.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Find the email**:
|
|
13
|
+
- Try `npx -y @inboxapi/cli get-email "$ARGUMENTS"` first — if it succeeds, use that email
|
|
14
|
+
- If it fails (e.g., not a valid message ID), fall back to `npx -y @inboxapi/cli search-emails --subject "<query>"` with the argument as subject/keyword
|
|
15
|
+
- If multiple results, present them and ask the user to pick one
|
|
16
|
+
|
|
17
|
+
2. **Load thread context**: Run: `npx -y @inboxapi/cli get-thread --message-id "<message-id>"` with the email's message ID to show the full conversation
|
|
18
|
+
|
|
19
|
+
3. **Display thread**: Show the conversation history in chronological order:
|
|
20
|
+
```
|
|
21
|
+
--- Thread: <subject> ---
|
|
22
|
+
|
|
23
|
+
[1] From: alice@example.com (Jan 15, 2:30 PM)
|
|
24
|
+
> Original message text...
|
|
25
|
+
|
|
26
|
+
[2] From: you@inboxapi.ai (Jan 15, 3:00 PM)
|
|
27
|
+
> Your previous reply...
|
|
28
|
+
|
|
29
|
+
[3] From: alice@example.com (Jan 15, 4:15 PM)
|
|
30
|
+
> Latest message you're replying to...
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
4. **Compose reply**: Ask the user what they want to say in their reply
|
|
34
|
+
|
|
35
|
+
5. **Preview**: Show the reply before sending:
|
|
36
|
+
```
|
|
37
|
+
Replying to: alice@example.com
|
|
38
|
+
Subject: Re: <subject>
|
|
39
|
+
---
|
|
40
|
+
<reply body>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
6. **Confirm**: Ask "Send this reply? (yes/no)"
|
|
44
|
+
|
|
45
|
+
7. **Send**: Run: `npx -y @inboxapi/cli send-reply --message-id "<id>" --body "<reply>"`
|
|
46
|
+
|
|
47
|
+
## Notes
|
|
48
|
+
|
|
49
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
50
|
+
|
|
51
|
+
## Rules
|
|
52
|
+
|
|
53
|
+
- ALWAYS show the thread context before composing
|
|
54
|
+
- ALWAYS preview and confirm before sending
|
|
55
|
+
- NEVER send without explicit user confirmation
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: email-search
|
|
3
|
+
description: "Search your InboxAPI emails using natural language. Use when the user wants to find specific emails by sender, subject, date, or content."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Email Search
|
|
7
|
+
|
|
8
|
+
Search emails using natural language and present results clearly.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. Take the user's query from `$ARGUMENTS`
|
|
13
|
+
- If no arguments provided, ask: "What are you looking for?"
|
|
14
|
+
|
|
15
|
+
2. Translate the natural language query into CLI flags for `search-emails`:
|
|
16
|
+
- Extract sender hints (e.g., "from John" -> `--sender "John"`)
|
|
17
|
+
- Extract subject hints (e.g., "about invoices" -> `--subject "invoices"`)
|
|
18
|
+
- Extract date hints (e.g., "last week", "yesterday" -> `--since "..."`, `--until "..."`)
|
|
19
|
+
- Combine with `--limit` as needed
|
|
20
|
+
|
|
21
|
+
3. Run: `npx -y @inboxapi/cli search-emails` with the appropriate flags (`--sender "..."`, `--subject "..."`, `--since "..."`, `--until "..."`)
|
|
22
|
+
|
|
23
|
+
4. Present results in a formatted table:
|
|
24
|
+
```
|
|
25
|
+
| # | From | Subject | Date |
|
|
26
|
+
|---|------|---------|------|
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
5. After showing results, offer: "Would you like to read any of these emails? Provide the number."
|
|
30
|
+
|
|
31
|
+
6. If the user picks one, run `npx -y @inboxapi/cli get-email "<message-id>"` with the email ID
|
|
32
|
+
|
|
33
|
+
7. If no results, suggest alternative searches or broader terms
|
|
34
|
+
|
|
35
|
+
## Notes
|
|
36
|
+
|
|
37
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
38
|
+
|
|
39
|
+
## Examples
|
|
40
|
+
|
|
41
|
+
- `/email-search invoices from accounting` -> search for "invoices" filtered by sender containing "accounting"
|
|
42
|
+
- `/email-search meeting tomorrow` -> search for "meeting" in recent emails
|
|
43
|
+
- `/email-search` -> prompt user for search query
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup-inboxapi
|
|
3
|
+
description: "Set up InboxAPI email tools in your AI coding agent. Adds MCP server config, installs skills, and verifies credentials. Use when the user wants to configure InboxAPI for their project."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Setup InboxAPI
|
|
7
|
+
|
|
8
|
+
Configure InboxAPI email tools for this project.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Check current setup**: Look for existing MCP server configuration files
|
|
13
|
+
|
|
14
|
+
2. **Add MCP server** (if not already configured):
|
|
15
|
+
- For Codex CLI: Run `codex mcp add inboxapi -- npx -y @inboxapi/cli`
|
|
16
|
+
- Or create/update the appropriate config file with the InboxAPI MCP server entry
|
|
17
|
+
|
|
18
|
+
3. **Install skills**: Run `npx -y @inboxapi/cli setup-skills` to copy bundled skills into the project
|
|
19
|
+
|
|
20
|
+
4. **Verify credentials**:
|
|
21
|
+
- Run: `npx -y @inboxapi/cli whoami` to check if credentials are set up
|
|
22
|
+
- If not authenticated, instruct the user: "Run `npx -y @inboxapi/cli login` in a terminal to authenticate"
|
|
23
|
+
|
|
24
|
+
5. **Show summary**:
|
|
25
|
+
```
|
|
26
|
+
InboxAPI Setup Complete!
|
|
27
|
+
|
|
28
|
+
MCP Server: configured
|
|
29
|
+
Email: <email> (or "not authenticated yet")
|
|
30
|
+
|
|
31
|
+
Installed Skills:
|
|
32
|
+
/check-inbox — View inbox summary
|
|
33
|
+
/compose — Write and send emails
|
|
34
|
+
/email-search — Search emails
|
|
35
|
+
/email-reply — Reply with thread context
|
|
36
|
+
/email-digest — Email activity digest
|
|
37
|
+
/email-forward — Forward emails
|
|
38
|
+
|
|
39
|
+
Next steps:
|
|
40
|
+
- Run /check-inbox to see your emails
|
|
41
|
+
- Run /compose to send your first email
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Notes
|
|
45
|
+
|
|
46
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
47
|
+
- This skill is safe to run multiple times — it won't duplicate entries or overwrite local edits
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: check-inbox
|
|
3
|
+
description: Check your InboxAPI email inbox and display a summary of recent messages. Use when the user wants to see their emails, check mail, or view their inbox.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Check Inbox
|
|
7
|
+
|
|
8
|
+
Fetch and display a summary of recent emails from the user's InboxAPI inbox.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. Run: `npx -y @inboxapi/cli whoami` to identify the current account and email address
|
|
13
|
+
2. Run: `npx -y @inboxapi/cli get-email-count` to show the total number of emails
|
|
14
|
+
3. Run: `npx -y @inboxapi/cli get-emails --limit <N>` where `<N>` is `$ARGUMENTS` if provided, otherwise `20`
|
|
15
|
+
4. Present results in a formatted table with columns:
|
|
16
|
+
- **From** — sender name or address
|
|
17
|
+
- **Subject** — email subject line (truncated to 60 chars)
|
|
18
|
+
- **Date** — received date in relative format (e.g., "2 hours ago", "yesterday")
|
|
19
|
+
5. After the table, show a summary line: "Showing X of Y emails for <email>"
|
|
20
|
+
|
|
21
|
+
## Output Format
|
|
22
|
+
|
|
23
|
+
Use this markdown table format:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
| # | From | Subject | Date |
|
|
27
|
+
|---|------|---------|------|
|
|
28
|
+
| 1 | Alice <alice@example.com> | Re: Project update... | 2h ago |
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
If the inbox is empty, display: "Your inbox is empty. Your email address is <email>."
|
|
32
|
+
|
|
33
|
+
## Notes
|
|
34
|
+
|
|
35
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
36
|
+
- Do NOT read full email bodies — only show the summary list
|
|
37
|
+
- If the user asks to read a specific email after seeing the list, run `npx -y @inboxapi/cli get-email "<message-id>"` with the email ID
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: compose
|
|
3
|
+
description: Compose and send an email with guided prompts, addressbook lookup, and send confirmation. Use when the user wants to write and send an email.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Compose Email
|
|
7
|
+
|
|
8
|
+
Guide the user through composing and sending an email safely.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Identify sender**: Run: `npx -y @inboxapi/cli whoami` to get the current account email address
|
|
13
|
+
|
|
14
|
+
2. **Resolve recipient**:
|
|
15
|
+
- If `$ARGUMENTS` is provided, use it as the recipient hint
|
|
16
|
+
- Run: `npx -y @inboxapi/cli get-addressbook` to check for matching contacts
|
|
17
|
+
- If multiple matches found, ask the user to pick one
|
|
18
|
+
- If no match, ask the user to confirm or provide the full email address
|
|
19
|
+
|
|
20
|
+
3. **Collect email details**: Ask the user for:
|
|
21
|
+
- **To**: Recipient email (pre-filled if resolved above)
|
|
22
|
+
- **Subject**: Email subject line
|
|
23
|
+
- **Body**: Email content (plain text)
|
|
24
|
+
|
|
25
|
+
4. **Preview**: Show the complete email before sending:
|
|
26
|
+
```
|
|
27
|
+
From: <your-email@inboxapi.ai>
|
|
28
|
+
To: <recipient@example.com>
|
|
29
|
+
Subject: <subject>
|
|
30
|
+
---
|
|
31
|
+
<body>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
5. **Safety checks**:
|
|
35
|
+
- Warn if the recipient address matches the sender's own @inboxapi.ai address
|
|
36
|
+
- Warn if the body is empty
|
|
37
|
+
- Warn if the subject is empty
|
|
38
|
+
|
|
39
|
+
6. **Confirm**: Ask the user to confirm: "Send this email? (yes/no)"
|
|
40
|
+
|
|
41
|
+
7. **Send**: Run: `npx -y @inboxapi/cli send-email --to "<recipient>" --subject "<subject>" --body "<body>"`
|
|
42
|
+
|
|
43
|
+
8. **Confirm delivery**: Report the result to the user
|
|
44
|
+
|
|
45
|
+
## Notes
|
|
46
|
+
|
|
47
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
48
|
+
|
|
49
|
+
## Rules
|
|
50
|
+
|
|
51
|
+
- ALWAYS show a preview before sending
|
|
52
|
+
- ALWAYS ask for explicit confirmation before calling send-email
|
|
53
|
+
- NEVER send an email without the user confirming
|
|
54
|
+
- If the user cancels, acknowledge and do not send
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: email-digest
|
|
3
|
+
description: Generate a digest summary of recent email activity grouped by thread. Use when the user wants an overview of their email activity.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Email Digest
|
|
7
|
+
|
|
8
|
+
Generate a structured digest of recent email activity.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Determine timeframe**: Use `$ARGUMENTS` if provided (e.g., "today", "this week", "last 3 days"), otherwise default to "last 24 hours"
|
|
13
|
+
|
|
14
|
+
2. **Get account info**: Run: `npx -y @inboxapi/cli whoami` for the account email
|
|
15
|
+
|
|
16
|
+
3. **Get total count**: Run: `npx -y @inboxapi/cli get-email-count` for inbox statistics
|
|
17
|
+
|
|
18
|
+
4. **Fetch recent emails**: Run: `npx -y @inboxapi/cli get-emails --limit 50`
|
|
19
|
+
|
|
20
|
+
5. **Group by thread**: For threads with multiple emails, run `npx -y @inboxapi/cli get-thread --message-id "<message-id>"` to understand the conversation
|
|
21
|
+
|
|
22
|
+
6. **Generate digest** with these sections:
|
|
23
|
+
|
|
24
|
+
```markdown
|
|
25
|
+
# Email Digest — <timeframe>
|
|
26
|
+
Account: <email>
|
|
27
|
+
|
|
28
|
+
## Summary
|
|
29
|
+
- Total emails in inbox: X
|
|
30
|
+
- Emails in this period: Y
|
|
31
|
+
- Unique senders: Z
|
|
32
|
+
- Threads with activity: N
|
|
33
|
+
|
|
34
|
+
## Active Threads
|
|
35
|
+
### 1. <Subject>
|
|
36
|
+
- Participants: alice@..., bob@...
|
|
37
|
+
- Messages in period: 3
|
|
38
|
+
- Latest: "Brief preview of most recent message..."
|
|
39
|
+
- Status: Awaiting your reply / You replied / FYI only
|
|
40
|
+
|
|
41
|
+
## New Emails (not in threads)
|
|
42
|
+
| From | Subject | Date |
|
|
43
|
+
|------|---------|------|
|
|
44
|
+
| ... | ... | ... |
|
|
45
|
+
|
|
46
|
+
## Needs Attention
|
|
47
|
+
- Emails you haven't replied to where you were directly addressed
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
7. **Offer actions**: "Would you like to reply to any of these, or read a specific email?"
|
|
51
|
+
|
|
52
|
+
## Notes
|
|
53
|
+
|
|
54
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
55
|
+
- Focus on actionable insights, not raw data
|
|
56
|
+
- Highlight emails that likely need a response
|
|
57
|
+
- Keep the digest concise — summarize, don't reproduce full emails
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: email-forward
|
|
3
|
+
description: Forward an email to someone with an optional message. Use when the user wants to forward a specific email to another person.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Email Forward
|
|
7
|
+
|
|
8
|
+
Help the user forward an email to another recipient.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Find the email to forward**:
|
|
13
|
+
- Try `npx -y @inboxapi/cli get-email "$ARGUMENTS"` first — if it succeeds, use that email
|
|
14
|
+
- If it fails (e.g., not a valid message ID), fall back to `npx -y @inboxapi/cli search-emails --subject "<query>"` with the argument
|
|
15
|
+
- If multiple results, show them and ask the user to pick one
|
|
16
|
+
|
|
17
|
+
2. **Show email content**: Display the email being forwarded:
|
|
18
|
+
```
|
|
19
|
+
--- Email to forward ---
|
|
20
|
+
From: <original sender>
|
|
21
|
+
Subject: <subject>
|
|
22
|
+
Date: <date>
|
|
23
|
+
---
|
|
24
|
+
<body preview, first 500 chars>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
3. **Resolve recipient**:
|
|
28
|
+
- Ask "Who do you want to forward this to?"
|
|
29
|
+
- Run: `npx -y @inboxapi/cli get-addressbook` to check for matching contacts
|
|
30
|
+
- Confirm the recipient email address
|
|
31
|
+
|
|
32
|
+
4. **Optional message**: Ask "Add a message? (or press enter to skip)"
|
|
33
|
+
|
|
34
|
+
5. **Preview**:
|
|
35
|
+
```
|
|
36
|
+
Forwarding to: <recipient>
|
|
37
|
+
Subject: Fwd: <original subject>
|
|
38
|
+
Your message: <optional message or "(none)">
|
|
39
|
+
Original email from: <sender>, <date>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
6. **Confirm**: Ask "Forward this email? (yes/no)"
|
|
43
|
+
|
|
44
|
+
7. **Send**: Run: `npx -y @inboxapi/cli forward-email --message-id "<id>" --to "<recipient>"` (add `--note "<message>"` if provided)
|
|
45
|
+
|
|
46
|
+
## Notes
|
|
47
|
+
|
|
48
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
49
|
+
|
|
50
|
+
## Rules
|
|
51
|
+
|
|
52
|
+
- ALWAYS show what's being forwarded before sending
|
|
53
|
+
- ALWAYS confirm before forwarding
|
|
54
|
+
- NEVER forward without explicit user confirmation
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: email-reply
|
|
3
|
+
description: Reply to an email with full thread context. Use when the user wants to reply to a specific email or continue an email conversation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Email Reply
|
|
7
|
+
|
|
8
|
+
Help the user reply to an email with full thread context.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Find the email**:
|
|
13
|
+
- Try `npx -y @inboxapi/cli get-email "$ARGUMENTS"` first — if it succeeds, use that email
|
|
14
|
+
- If it fails (e.g., not a valid message ID), fall back to `npx -y @inboxapi/cli search-emails --subject "<query>"` with the argument as subject/keyword
|
|
15
|
+
- If multiple results, present them and ask the user to pick one
|
|
16
|
+
|
|
17
|
+
2. **Load thread context**: Run: `npx -y @inboxapi/cli get-thread --message-id "<message-id>"` with the email's message ID to show the full conversation
|
|
18
|
+
|
|
19
|
+
3. **Display thread**: Show the conversation history in chronological order:
|
|
20
|
+
```
|
|
21
|
+
--- Thread: <subject> ---
|
|
22
|
+
|
|
23
|
+
[1] From: alice@example.com (Jan 15, 2:30 PM)
|
|
24
|
+
> Original message text...
|
|
25
|
+
|
|
26
|
+
[2] From: you@inboxapi.ai (Jan 15, 3:00 PM)
|
|
27
|
+
> Your previous reply...
|
|
28
|
+
|
|
29
|
+
[3] From: alice@example.com (Jan 15, 4:15 PM)
|
|
30
|
+
> Latest message you're replying to...
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
4. **Compose reply**: Ask the user what they want to say in their reply
|
|
34
|
+
|
|
35
|
+
5. **Preview**: Show the reply before sending:
|
|
36
|
+
```
|
|
37
|
+
Replying to: alice@example.com
|
|
38
|
+
Subject: Re: <subject>
|
|
39
|
+
---
|
|
40
|
+
<reply body>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
6. **Confirm**: Ask "Send this reply? (yes/no)"
|
|
44
|
+
|
|
45
|
+
7. **Send**: Run: `npx -y @inboxapi/cli send-reply --message-id "<id>" --body "<reply>"`
|
|
46
|
+
|
|
47
|
+
## Notes
|
|
48
|
+
|
|
49
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
50
|
+
|
|
51
|
+
## Rules
|
|
52
|
+
|
|
53
|
+
- ALWAYS show the thread context before composing
|
|
54
|
+
- ALWAYS preview and confirm before sending
|
|
55
|
+
- NEVER send without explicit user confirmation
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: email-search
|
|
3
|
+
description: Search your InboxAPI emails using natural language. Use when the user wants to find specific emails by sender, subject, date, or content.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Email Search
|
|
7
|
+
|
|
8
|
+
Search emails using natural language and present results clearly.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. Take the user's query from `$ARGUMENTS`
|
|
13
|
+
- If no arguments provided, ask: "What are you looking for?"
|
|
14
|
+
|
|
15
|
+
2. Translate the natural language query into CLI flags for `search-emails`:
|
|
16
|
+
- Extract sender hints (e.g., "from John" -> `--sender "John"`)
|
|
17
|
+
- Extract subject hints (e.g., "about invoices" -> `--subject "invoices"`)
|
|
18
|
+
- Extract date hints (e.g., "last week", "yesterday" -> `--since "..."`, `--until "..."`)
|
|
19
|
+
- Combine with `--limit` as needed
|
|
20
|
+
|
|
21
|
+
3. Run: `npx -y @inboxapi/cli search-emails` with the appropriate flags (`--sender "..."`, `--subject "..."`, `--since "..."`, `--until "..."`)
|
|
22
|
+
|
|
23
|
+
4. Present results in a formatted table:
|
|
24
|
+
```
|
|
25
|
+
| # | From | Subject | Date |
|
|
26
|
+
|---|------|---------|------|
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
5. After showing results, offer: "Would you like to read any of these emails? Provide the number."
|
|
30
|
+
|
|
31
|
+
6. If the user picks one, run `npx -y @inboxapi/cli get-email "<message-id>"` with the email ID
|
|
32
|
+
|
|
33
|
+
7. If no results, suggest alternative searches or broader terms
|
|
34
|
+
|
|
35
|
+
## Notes
|
|
36
|
+
|
|
37
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
38
|
+
|
|
39
|
+
## Examples
|
|
40
|
+
|
|
41
|
+
- `/email-search invoices from accounting` -> search for "invoices" filtered by sender containing "accounting"
|
|
42
|
+
- `/email-search meeting tomorrow` -> search for "meeting" in recent emails
|
|
43
|
+
- `/email-search` -> prompt user for search query
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup-inboxapi
|
|
3
|
+
description: Set up InboxAPI email tools in your AI coding agent. Adds MCP server config, installs skills, and verifies credentials. Use when the user wants to configure InboxAPI for their project.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Setup InboxAPI
|
|
7
|
+
|
|
8
|
+
Configure InboxAPI email tools for this project.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Check current setup**: Look for existing MCP server configuration files
|
|
13
|
+
|
|
14
|
+
2. **Add MCP server** (if not already configured):
|
|
15
|
+
- For Gemini CLI: Add to `settings.json` under `mcpServers`:
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"mcpServers": {
|
|
19
|
+
"inboxapi": {
|
|
20
|
+
"command": "npx",
|
|
21
|
+
"args": ["-y", "@inboxapi/cli"]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
3. **Install skills**: Run `npx -y @inboxapi/cli setup-skills` to copy bundled skills into the project
|
|
28
|
+
|
|
29
|
+
4. **Verify credentials**:
|
|
30
|
+
- Run: `npx -y @inboxapi/cli whoami` to check if credentials are set up
|
|
31
|
+
- If not authenticated, instruct the user: "Run `npx -y @inboxapi/cli login` in a terminal to authenticate"
|
|
32
|
+
|
|
33
|
+
5. **Show summary**:
|
|
34
|
+
```
|
|
35
|
+
InboxAPI Setup Complete!
|
|
36
|
+
|
|
37
|
+
MCP Server: configured
|
|
38
|
+
Email: <email> (or "not authenticated yet")
|
|
39
|
+
|
|
40
|
+
Installed Skills:
|
|
41
|
+
/check-inbox — View inbox summary
|
|
42
|
+
/compose — Write and send emails
|
|
43
|
+
/email-search — Search emails
|
|
44
|
+
/email-reply — Reply with thread context
|
|
45
|
+
/email-digest — Email activity digest
|
|
46
|
+
/email-forward — Forward emails
|
|
47
|
+
|
|
48
|
+
Next steps:
|
|
49
|
+
- Run /check-inbox to see your emails
|
|
50
|
+
- Run /compose to send your first email
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Notes
|
|
54
|
+
|
|
55
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
56
|
+
- This skill is safe to run multiple times — it won't duplicate entries or overwrite local edits
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Check your InboxAPI email inbox and display a summary of recent messages
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Check Inbox
|
|
6
|
+
|
|
7
|
+
Fetch and display a summary of recent emails from the user's InboxAPI inbox.
|
|
8
|
+
|
|
9
|
+
## Steps
|
|
10
|
+
|
|
11
|
+
1. Run: `npx -y @inboxapi/cli whoami` to identify the current account and email address
|
|
12
|
+
2. Run: `npx -y @inboxapi/cli get-email-count` to show the total number of emails
|
|
13
|
+
3. Run: `npx -y @inboxapi/cli get-emails --limit <N>` where `<N>` is `$ARGUMENTS` if provided, otherwise `20`
|
|
14
|
+
4. Present results in a formatted table with columns:
|
|
15
|
+
- **From** — sender name or address
|
|
16
|
+
- **Subject** — email subject line (truncated to 60 chars)
|
|
17
|
+
- **Date** — received date in relative format (e.g., "2 hours ago", "yesterday")
|
|
18
|
+
5. After the table, show a summary line: "Showing X of Y emails for <email>"
|
|
19
|
+
|
|
20
|
+
## Output Format
|
|
21
|
+
|
|
22
|
+
Use this markdown table format:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
| # | From | Subject | Date |
|
|
26
|
+
|---|------|---------|------|
|
|
27
|
+
| 1 | Alice <alice@example.com> | Re: Project update... | 2h ago |
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
If the inbox is empty, display: "Your inbox is empty. Your email address is <email>."
|
|
31
|
+
|
|
32
|
+
## Notes
|
|
33
|
+
|
|
34
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
35
|
+
- Do NOT read full email bodies — only show the summary list
|
|
36
|
+
- If the user asks to read a specific email after seeing the list, run `npx -y @inboxapi/cli get-email "<message-id>"` with the email ID
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Compose and send an email with guided prompts and send confirmation
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Compose Email
|
|
6
|
+
|
|
7
|
+
Guide the user through composing and sending an email safely.
|
|
8
|
+
|
|
9
|
+
## Steps
|
|
10
|
+
|
|
11
|
+
1. **Identify sender**: Run: `npx -y @inboxapi/cli whoami` to get the current account email address
|
|
12
|
+
|
|
13
|
+
2. **Resolve recipient**:
|
|
14
|
+
- If `$ARGUMENTS` is provided, use it as the recipient hint
|
|
15
|
+
- Run: `npx -y @inboxapi/cli get-addressbook` to check for matching contacts
|
|
16
|
+
- If multiple matches found, ask the user to pick one
|
|
17
|
+
- If no match, ask the user to confirm or provide the full email address
|
|
18
|
+
|
|
19
|
+
3. **Collect email details**: Ask the user for:
|
|
20
|
+
- **To**: Recipient email (pre-filled if resolved above)
|
|
21
|
+
- **Subject**: Email subject line
|
|
22
|
+
- **Body**: Email content (plain text)
|
|
23
|
+
|
|
24
|
+
4. **Preview**: Show the complete email before sending:
|
|
25
|
+
```
|
|
26
|
+
From: <your-email@inboxapi.ai>
|
|
27
|
+
To: <recipient@example.com>
|
|
28
|
+
Subject: <subject>
|
|
29
|
+
---
|
|
30
|
+
<body>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
5. **Safety checks**:
|
|
34
|
+
- Warn if the recipient address matches the sender's own @inboxapi.ai address
|
|
35
|
+
- Warn if the body is empty
|
|
36
|
+
- Warn if the subject is empty
|
|
37
|
+
|
|
38
|
+
6. **Confirm**: Ask the user to confirm: "Send this email? (yes/no)"
|
|
39
|
+
|
|
40
|
+
7. **Send**: Run: `npx -y @inboxapi/cli send-email --to "<recipient>" --subject "<subject>" --body "<body>"`
|
|
41
|
+
|
|
42
|
+
8. **Confirm delivery**: Report the result to the user
|
|
43
|
+
|
|
44
|
+
## Notes
|
|
45
|
+
|
|
46
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
47
|
+
|
|
48
|
+
## Rules
|
|
49
|
+
|
|
50
|
+
- ALWAYS show a preview before sending
|
|
51
|
+
- ALWAYS ask for explicit confirmation before calling send-email
|
|
52
|
+
- NEVER send an email without the user confirming
|
|
53
|
+
- If the user cancels, acknowledge and do not send
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate a digest summary of recent email activity grouped by thread
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Email Digest
|
|
6
|
+
|
|
7
|
+
Generate a structured digest of recent email activity.
|
|
8
|
+
|
|
9
|
+
## Steps
|
|
10
|
+
|
|
11
|
+
1. **Determine timeframe**: Use `$ARGUMENTS` if provided (e.g., "today", "this week", "last 3 days"), otherwise default to "last 24 hours"
|
|
12
|
+
|
|
13
|
+
2. **Get account info**: Run: `npx -y @inboxapi/cli whoami` for the account email
|
|
14
|
+
|
|
15
|
+
3. **Get total count**: Run: `npx -y @inboxapi/cli get-email-count` for inbox statistics
|
|
16
|
+
|
|
17
|
+
4. **Fetch recent emails**: Run: `npx -y @inboxapi/cli get-emails --limit 50`
|
|
18
|
+
|
|
19
|
+
5. **Group by thread**: For threads with multiple emails, run `npx -y @inboxapi/cli get-thread --message-id "<message-id>"` to understand the conversation
|
|
20
|
+
|
|
21
|
+
6. **Generate digest** with these sections:
|
|
22
|
+
|
|
23
|
+
```markdown
|
|
24
|
+
# Email Digest — <timeframe>
|
|
25
|
+
Account: <email>
|
|
26
|
+
|
|
27
|
+
## Summary
|
|
28
|
+
- Total emails in inbox: X
|
|
29
|
+
- Emails in this period: Y
|
|
30
|
+
- Unique senders: Z
|
|
31
|
+
- Threads with activity: N
|
|
32
|
+
|
|
33
|
+
## Active Threads
|
|
34
|
+
### 1. <Subject>
|
|
35
|
+
- Participants: alice@..., bob@...
|
|
36
|
+
- Messages in period: 3
|
|
37
|
+
- Latest: "Brief preview of most recent message..."
|
|
38
|
+
- Status: Awaiting your reply / You replied / FYI only
|
|
39
|
+
|
|
40
|
+
## New Emails (not in threads)
|
|
41
|
+
| From | Subject | Date |
|
|
42
|
+
|------|---------|------|
|
|
43
|
+
| ... | ... | ... |
|
|
44
|
+
|
|
45
|
+
## Needs Attention
|
|
46
|
+
- Emails you haven't replied to where you were directly addressed
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
7. **Offer actions**: "Would you like to reply to any of these, or read a specific email?"
|
|
50
|
+
|
|
51
|
+
## Notes
|
|
52
|
+
|
|
53
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
54
|
+
- Focus on actionable insights, not raw data
|
|
55
|
+
- Highlight emails that likely need a response
|
|
56
|
+
- Keep the digest concise — summarize, don't reproduce full emails
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forward an email to someone with an optional message
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Email Forward
|
|
6
|
+
|
|
7
|
+
Help the user forward an email to another recipient.
|
|
8
|
+
|
|
9
|
+
## Steps
|
|
10
|
+
|
|
11
|
+
1. **Find the email to forward**:
|
|
12
|
+
- Try `npx -y @inboxapi/cli get-email "$ARGUMENTS"` first — if it succeeds, use that email
|
|
13
|
+
- If it fails (e.g., not a valid message ID), fall back to `npx -y @inboxapi/cli search-emails --subject "<query>"` with the argument
|
|
14
|
+
- If multiple results, show them and ask the user to pick one
|
|
15
|
+
|
|
16
|
+
2. **Show email content**: Display the email being forwarded:
|
|
17
|
+
```
|
|
18
|
+
--- Email to forward ---
|
|
19
|
+
From: <original sender>
|
|
20
|
+
Subject: <subject>
|
|
21
|
+
Date: <date>
|
|
22
|
+
---
|
|
23
|
+
<body preview, first 500 chars>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
3. **Resolve recipient**:
|
|
27
|
+
- Ask "Who do you want to forward this to?"
|
|
28
|
+
- Run: `npx -y @inboxapi/cli get-addressbook` to check for matching contacts
|
|
29
|
+
- Confirm the recipient email address
|
|
30
|
+
|
|
31
|
+
4. **Optional message**: Ask "Add a message? (or press enter to skip)"
|
|
32
|
+
|
|
33
|
+
5. **Preview**:
|
|
34
|
+
```
|
|
35
|
+
Forwarding to: <recipient>
|
|
36
|
+
Subject: Fwd: <original subject>
|
|
37
|
+
Your message: <optional message or "(none)">
|
|
38
|
+
Original email from: <sender>, <date>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
6. **Confirm**: Ask "Forward this email? (yes/no)"
|
|
42
|
+
|
|
43
|
+
7. **Send**: Run: `npx -y @inboxapi/cli forward-email --message-id "<id>" --to "<recipient>"` (add `--note "<message>"` if provided)
|
|
44
|
+
|
|
45
|
+
## Notes
|
|
46
|
+
|
|
47
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
48
|
+
|
|
49
|
+
## Rules
|
|
50
|
+
|
|
51
|
+
- ALWAYS show what's being forwarded before sending
|
|
52
|
+
- ALWAYS confirm before forwarding
|
|
53
|
+
- NEVER forward without explicit user confirmation
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Reply to an email with full thread context and send confirmation
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Email Reply
|
|
6
|
+
|
|
7
|
+
Help the user reply to an email with full thread context.
|
|
8
|
+
|
|
9
|
+
## Steps
|
|
10
|
+
|
|
11
|
+
1. **Find the email**:
|
|
12
|
+
- Try `npx -y @inboxapi/cli get-email "$ARGUMENTS"` first — if it succeeds, use that email
|
|
13
|
+
- If it fails (e.g., not a valid message ID), fall back to `npx -y @inboxapi/cli search-emails --subject "<query>"` with the argument as subject/keyword
|
|
14
|
+
- If multiple results, present them and ask the user to pick one
|
|
15
|
+
|
|
16
|
+
2. **Load thread context**: Run: `npx -y @inboxapi/cli get-thread --message-id "<message-id>"` with the email's message ID to show the full conversation
|
|
17
|
+
|
|
18
|
+
3. **Display thread**: Show the conversation history in chronological order:
|
|
19
|
+
```
|
|
20
|
+
--- Thread: <subject> ---
|
|
21
|
+
|
|
22
|
+
[1] From: alice@example.com (Jan 15, 2:30 PM)
|
|
23
|
+
> Original message text...
|
|
24
|
+
|
|
25
|
+
[2] From: you@inboxapi.ai (Jan 15, 3:00 PM)
|
|
26
|
+
> Your previous reply...
|
|
27
|
+
|
|
28
|
+
[3] From: alice@example.com (Jan 15, 4:15 PM)
|
|
29
|
+
> Latest message you're replying to...
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
4. **Compose reply**: Ask the user what they want to say in their reply
|
|
33
|
+
|
|
34
|
+
5. **Preview**: Show the reply before sending:
|
|
35
|
+
```
|
|
36
|
+
Replying to: alice@example.com
|
|
37
|
+
Subject: Re: <subject>
|
|
38
|
+
---
|
|
39
|
+
<reply body>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
6. **Confirm**: Ask "Send this reply? (yes/no)"
|
|
43
|
+
|
|
44
|
+
7. **Send**: Run: `npx -y @inboxapi/cli send-reply --message-id "<id>" --body "<reply>"`
|
|
45
|
+
|
|
46
|
+
## Notes
|
|
47
|
+
|
|
48
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
49
|
+
|
|
50
|
+
## Rules
|
|
51
|
+
|
|
52
|
+
- ALWAYS show the thread context before composing
|
|
53
|
+
- ALWAYS preview and confirm before sending
|
|
54
|
+
- NEVER send without explicit user confirmation
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Search InboxAPI emails using natural language by sender, subject, date, or content
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Email Search
|
|
6
|
+
|
|
7
|
+
Search emails using natural language and present results clearly.
|
|
8
|
+
|
|
9
|
+
## Steps
|
|
10
|
+
|
|
11
|
+
1. Take the user's query from `$ARGUMENTS`
|
|
12
|
+
- If no arguments provided, ask: "What are you looking for?"
|
|
13
|
+
|
|
14
|
+
2. Translate the natural language query into CLI flags for `search-emails`:
|
|
15
|
+
- Extract sender hints (e.g., "from John" -> `--sender "John"`)
|
|
16
|
+
- Extract subject hints (e.g., "about invoices" -> `--subject "invoices"`)
|
|
17
|
+
- Extract date hints (e.g., "last week", "yesterday" -> `--since "..."`, `--until "..."`)
|
|
18
|
+
- Combine with `--limit` as needed
|
|
19
|
+
|
|
20
|
+
3. Run: `npx -y @inboxapi/cli search-emails` with the appropriate flags (`--sender "..."`, `--subject "..."`, `--since "..."`, `--until "..."`)
|
|
21
|
+
|
|
22
|
+
4. Present results in a formatted table:
|
|
23
|
+
```
|
|
24
|
+
| # | From | Subject | Date |
|
|
25
|
+
|---|------|---------|------|
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
5. After showing results, offer: "Would you like to read any of these emails? Provide the number."
|
|
29
|
+
|
|
30
|
+
6. If the user picks one, run `npx -y @inboxapi/cli get-email "<message-id>"` with the email ID
|
|
31
|
+
|
|
32
|
+
7. If no results, suggest alternative searches or broader terms
|
|
33
|
+
|
|
34
|
+
## Notes
|
|
35
|
+
|
|
36
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Set up InboxAPI email tools for your AI coding agent
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Setup InboxAPI
|
|
6
|
+
|
|
7
|
+
Configure InboxAPI email tools for this project.
|
|
8
|
+
|
|
9
|
+
## Steps
|
|
10
|
+
|
|
11
|
+
1. **Check current setup**: Look for existing MCP server configuration files
|
|
12
|
+
|
|
13
|
+
2. **Add MCP server** (if not already configured):
|
|
14
|
+
- For OpenCode: Add to `opencode.json` under `mcp`:
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"mcp": {
|
|
18
|
+
"inboxapi": {
|
|
19
|
+
"command": "npx",
|
|
20
|
+
"args": ["-y", "@inboxapi/cli"]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
3. **Install skills**: Run `npx -y @inboxapi/cli setup-skills` to copy bundled skills into the project
|
|
27
|
+
|
|
28
|
+
4. **Verify credentials**:
|
|
29
|
+
- Run: `npx -y @inboxapi/cli whoami` to check if credentials are set up
|
|
30
|
+
- If not authenticated, instruct the user: "Run `npx -y @inboxapi/cli login` in a terminal to authenticate"
|
|
31
|
+
|
|
32
|
+
5. **Show summary**:
|
|
33
|
+
```
|
|
34
|
+
InboxAPI Setup Complete!
|
|
35
|
+
|
|
36
|
+
MCP Server: configured
|
|
37
|
+
Email: <email> (or "not authenticated yet")
|
|
38
|
+
|
|
39
|
+
Installed Skills:
|
|
40
|
+
/check-inbox — View inbox summary
|
|
41
|
+
/compose — Write and send emails
|
|
42
|
+
/email-search — Search emails
|
|
43
|
+
/email-reply — Reply with thread context
|
|
44
|
+
/email-digest — Email activity digest
|
|
45
|
+
/email-forward — Forward emails
|
|
46
|
+
|
|
47
|
+
Next steps:
|
|
48
|
+
- Run /check-inbox to see your emails
|
|
49
|
+
- Run /compose to send your first email
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Notes
|
|
53
|
+
|
|
54
|
+
- All CLI commands output JSON by default — parse the JSON response to extract the relevant fields
|
|
55
|
+
- This skill is safe to run multiple times — it won't duplicate entries or overwrite local edits
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|