home / skills / jinfanzheng / kode-sdk-csharp / email

This skill manages email operations via IMAP/SMTP, enabling reading, drafting, and sending with pre-flight safety checks and audit-friendly workflows.

npx playbooks add skill jinfanzheng/kode-sdk-csharp --skill email

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.9 KB
---
name: email
description: Email operations via IMAP/SMTP. Trigger for inbox checking, reading, drafting, or sending emails. Requires `.config/email.json` setup.
---

## Mental Model

Email is for **asynchronous communication with audit trail**. Unlike chat (instant, casual), emails are formal, searchable, and have recipients/CC/threads.

## Trigger Patterns

| User Intent | Action | Requires Approval |
|-------------|--------|-------------------|
| "Check email" / "Any new mail?" | `email_list` | No |
| "Read email from X" | `email_read` | No |
| "Send email to X" | `email_send` | **Yes** |
| "Draft email" | `email_draft` | No |
| "Archive/delete email" | `email_move` / `email_delete` | Delete: **Yes** |

## Pre-flight Checks (Before Sending)

**CRITICAL: Always confirm before `email_send`**

1. Show full email: To, CC, Subject, Body
2. Check for sensitive content (passwords, tokens, confidential)
3. Warn if body mentions "attachment" but none attached
4. Alert if sending outside business hours (user's timezone)

## Anti-Patterns (NEVER)

- Don't send without user confirmation
- Don't guess recipient addresses - ask if unclear
- Don't include passwords/API keys in emails
- Don't send empty emails or ones with placeholder text
- Don't delete without showing what will be deleted

## Common Queries

**Check unread:**
```
email_list unreadOnly=true limit=10
```

**From specific sender:**
```
email_list from="[email protected]"
```

**Search by subject:**
```
email_list subject="Report"
```

**After sending important email, notify:**
```
notify_send title="Email Sent" content="Quarterly report sent to [email protected]" priority="high"
```

## Setup Required

`.config/email.json` must exist (user provides credentials):
```json
{
  "imap": {"host": "imap.gmail.com", "port": 993, "auth": {"user": "...", "pass": "..."}},
  "smtp": {"host": "smtp.gmail.com", "port": 587, "auth": {"user": "...", "pass": "..."}}
}
```


Overview

This skill provides IMAP/SMTP email operations for checking inboxes, reading messages, drafting, sending, and managing mail. It requires a .config/email.json credentials file and enforces safety checks before any send or delete action. Use it to automate email workflows while preserving an audit trail and explicit user approvals.

How this skill works

The skill connects to IMAP to list, search, read, archive, or delete messages and uses SMTP to draft and send outgoing mail. Triggers map natural intents (check, read, draft, send, move, delete) to specific actions and the skill performs pre-flight validations before destructive or outbound operations. All send actions require explicit user confirmation and the skill warns about missing attachments, sensitive content, and out-of-hours delivery.

When to use it

  • Check for new or unread messages and summarize inbox status.
  • Read or search emails by sender, subject, or thread for context and follow-up.
  • Draft messages and present full content for review before sending.
  • Send emails only after explicit user confirmation and pre-flight safety checks.
  • Archive or move messages to folders safely; require confirmation before deletion.

Best practices

  • Require explicit user confirmation before any email_send or email_delete action.
  • Always display full outgoing email (To, CC, Subject, Body) and ask about attachments before sending.
  • Validate recipient addresses if ambiguous; ask clarifying questions instead of guessing.
  • Scan body for sensitive data (passwords, tokens, confidential info) and block sending until cleared.
  • Respect user timezone and warn if sending outside business hours.

Example use cases

  • "Check email" to list unread messages and show the top 10 summaries.
  • "Read email from [email protected]" to pull the latest thread and highlight action items.
  • Draft a project update email and present it for user edits before confirming send.
  • Send a finalized quarterly report email after pre-flight checks and user approval.
  • Archive routine notifications into a designated folder and confirm what will be moved.

FAQ

What configuration is required to use this skill?

.config/email.json must exist with IMAP and SMTP host, port, and auth credentials. The skill uses those credentials to connect and operate.

Will the skill send emails automatically?

No. email_send always requires explicit user confirmation. The skill will show the full message, check for sensitive content, and warn about missing attachments or off-hours sending.