Skip to main content
ClaudeWave
Skill654 repo starsupdated today

outlook

# Outlook This Claude Code skill enables Outlook-specific email management operations including drafting, sending, forwarding, and organizing messages with categories and flags. Use it for advanced Outlook features like auto-reply configuration, server-side rules creation, inbox analysis by sender, and attachment handling, while relying on the shared messaging skill for basic send, read, search, and reply functions across platforms.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/vellum-ai/vellum-assistant /tmp/outlook && cp -r /tmp/outlook/skills/outlook ~/.claude/skills/outlook
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

This skill provides Outlook-specific operations beyond the shared **messaging** skill. For cross-platform messaging (send, read, search, reply), use the messaging skill. Outlook operations depend on the messaging skill's provider infrastructure - load messaging first if Outlook is not yet connected.

## Script Reference

All operations use CLI scripts that return JSON:

- **Success**: `{ "ok": true, "data": ... }`
- **Failure**: `{ "ok": false, "error": "..." }`

| Script              | Operation       | Description                                                              |
| ------------------- | --------------- | ------------------------------------------------------------------------ |
| `outlook-email.ts`  | `draft`         | Create email drafts in the Drafts folder (including reply drafts)        |
| `outlook-email.ts`  | `send-draft`    | Send an existing draft (**requires explicit user confirmation**)         |
| `outlook-email.ts`  | `forward`       | Create forward drafts, preserving attachments                            |
| `outlook-email.ts`  | `trash`         | Move messages to Deleted Items                                           |
| `outlook-manage.ts` | `categories`    | Manage message categories (add, remove, list available)                  |
| `outlook-manage.ts` | `follow-up`     | Track messages with Outlook's native flag system                         |
| `outlook-manage.ts` | `attachments`   | List and download email attachments                                      |
| `outlook-manage.ts` | `rules`         | Create, list, and delete server-side inbox message rules                 |
| `outlook-manage.ts` | `vacation`      | Get, enable, or disable auto-reply (out-of-office) settings              |
| `outlook-manage.ts` | `unsubscribe`   | Unsubscribe from mailing lists (**requires explicit user confirmation**) |
| `outlook-scan.ts`   | `sender-digest` | Scan inbox and group messages by sender for declutter workflows          |
| `outlook-scan.ts`   | `outreach-scan` | Identify cold outreach senders (no List-Unsubscribe header)              |

### Email Operations

```bash
# Draft an email
bun run scripts/outlook-email.ts draft --to "user@example.com" --subject "Hello" --body "Message body"

# Send an existing draft (REQUIRES user confirmation before execution)
bun run scripts/outlook-email.ts send-draft --draft-id "AAMk..."

# Forward a message
bun run scripts/outlook-email.ts forward --message-id "AAMk..." --to "recipient@example.com" --comment "FYI"

# Trash a message
bun run scripts/outlook-email.ts trash --message-id "AAMk..."
```

### Management Operations

```bash
# Categories - add categories to a message
bun run scripts/outlook-manage.ts categories --action add --message-id "AAMk..." --categories "Blue Category,Important"

# Follow-up - flag a message for follow-up
bun run scripts/outlook-manage.ts follow-up --action track --message-id "AAMk..."

# Attachments - list attachments on a message
bun run scripts/outlook-manage.ts attachments --action list --message-id "AAMk..."

# Rules - create a server-side inbox rule
bun run scripts/outlook-manage.ts rules --action create --name "Archive newsletters" --conditions '{"senderContains":["newsletter"]}' --actions '{"moveToFolder":"Archive"}'

# Vacation - enable auto-reply
bun run scripts/outlook-manage.ts vacation --action enable --internal-message "I'm out of office" --external-message "I'm currently away"

# Unsubscribe from a mailing list (REQUIRES user confirmation before execution)
bun run scripts/outlook-manage.ts unsubscribe --message-id "AAMk..."
```

### Scan Operations

```bash
# Sender digest - scan inbox grouped by sender
bun run scripts/outlook-scan.ts sender-digest [--query "..."] [--time-range "90d"] [--account "..."]

# Outreach scan - identify cold outreach senders
bun run scripts/outlook-scan.ts outreach-scan [--time-range "90d"] [--account "..."]
```

Scan scripts store message IDs in the daemon's in-memory cache (via `assistant cache`) and return a lightweight summary with a `cache_key`. This keeps thousands of message IDs out of the conversation context. To retrieve cached message IDs for a specific sender:

```bash
assistant cache get <cache_key> --json
# Returns: { "ok": true, "data": { "sender@example.com": ["msgId1", "msgId2", ...], ... } }
```

## Email Routing Priority

When the user mentions "email" - sending, reading, checking, decluttering, drafting, or anything else - **always default to the user's own email (Outlook)** unless they explicitly ask about the assistant's own email address (e.g., "set up your email", "send from your address", "check your inbox"). The vast majority of email requests are about the user's Outlook, not the assistant's @vellum.me address.

Do not offer the assistant's own email as an option unless the user specifically asks. If Outlook is not connected, guide them through Outlook setup.

## Connection Setup

### Outlook

1. **Check connection health first.** Run `assistant oauth ping outlook`. This checks whether the user's Outlook/Microsoft account is connected and the token is valid.
2. **If no connection is found or the ping fails:** Load the `vellum-oauth-integrations` skill. The skill will evaluate whether managed or your-own mode is appropriate and guide the user accordingly.

## Error Recovery

When an Outlook script fails with a token or authorization error:

1. **Try to reconnect silently.** Run `assistant oauth ping outlook`. This often resolves expired tokens automatically.
2. **If reconnection fails, go straight to setup.** Don't present options, ask which route the user prefers, or explain what went wrong technically. Just tell the user briefly (e.g., "Outlook needs to be reconnected - let me set that up") and immediately load the `vellum-oauth-integrations` skill. The user came to you to get something done, not to troubleshoot - make it seamless.
3. **Never try alternative approaches.** Don't use curl, browser automation, or any workaroun