Quick Start
Invoke tools via CLI:
CODEBLOCK0
When to Use This Skill
- - 📧 Check inbox or search emails
- 📧 Send, reply, or move emails
- 🏷️ Apply labels or organize mailbox
- 📅 View calendar or events
- 📅 Create, update, or delete events
- 🔔 Set event reminders or alarms
Email Tools (10 total)
| Tool | Purpose |
|---|
| INLINECODE0 | List all folders |
| INLINECODE1 |
List emails in mailbox |
|
get_email | Get full email content |
|
get_thread | Get all emails in a conversation thread |
|
search_emails | Search by text query |
|
send_email | Send new email |
|
reply_email | Reply to email |
|
move_email | Move to folder |
|
set_labels | Apply labels ($seen, $flagged) |
|
delete_email | Delete (move to trash) |
Bulk Email Tools (3 total)
| Tool | Purpose |
|---|
| INLINECODE10 | Move multiple emails at once |
| INLINECODE11 |
Apply labels to multiple emails |
|
bulk_delete_emails | Delete multiple emails at once |
Calendar Tools (10 total)
| Tool | Purpose |
|---|
| INLINECODE13 | List all calendars |
| INLINECODE14 |
List events by date range |
|
get_event | Get event details |
|
create_event | Create new event |
|
update_event | Update existing event |
|
delete_event | Delete event |
|
search_events | Search by title/description |
|
create_recurring_event | Create repeating event |
|
list_invitations | List calendar invitations |
|
respond_to_invitation | Accept/decline/maybe invitations |
Reminder Tools (4 total)
| Tool | Purpose |
|---|
| INLINECODE23 | Add reminder to event |
| INLINECODE24 |
Remove reminder(s) |
|
list_event_reminders | List reminders for event |
|
create_event_with_reminder | Create event + reminder in one call |
Common Examples
CODEBLOCK1
Decision Tree
Need to manage email?
- - List/search →
list_emails or INLINECODE28 - Read content → INLINECODE29
- View conversation → INLINECODE30
- Send/reply →
send_email or INLINECODE32 - Organize →
move_email, set_labels, INLINECODE35 - Bulk actions →
bulk_move_emails, bulk_set_labels, INLINECODE38
Need to manage calendar?
- - View →
list_calendars or INLINECODE40 - Create →
create_event or INLINECODE42 - Modify → INLINECODE43
- Delete → INLINECODE44
- Invitations →
list_invitations, INLINECODE46
Need reminders?
- - Add to existing event → INLINECODE47
- Create event + reminder →
create_event_with_reminder (faster) - Manage →
list_event_reminders, INLINECODE50
Output Format
All tools return JSON:
CODEBLOCK2
Environment Variables
| Variable | Purpose | Required |
|---|
| INLINECODE51 | Email via JMAP | Yes (for email) |
| INLINECODE52 |
Calendar via CalDAV | Yes (for calendar) |
|
FASTMAIL_PASSWORD | Calendar app password | Yes (for calendar) |
|
FASTMAIL_TIMEZONE | Calendar timezone (IANA format) | No (auto-detected) |
Setup:
CODEBLOCK3
Timezone Support
⏰ Configurable calendar timezone
- - Default: Auto-detects your system's local timezone
- Override: Set
FASTMAIL_TIMEZONE environment variable - Uses IANA timezone identifiers (e.g.,
America/New_York, Asia/Bangkok, Europe/London) - Input times assumed in configured timezone
- Output times shown in configured timezone
- Stored internally as UTC
- Handles Daylight Saving Time (DST) automatically
See Also
- - Detailed reference: INLINECODE59
- Full guide: INLINECODE60
- Setup help: Fastmail Settings → Privacy & Security → Integrations
快速开始
通过命令行调用工具:
bash
首先安装依赖
cd .opencode/skills/fastmail && bun install
邮件:列出邮箱
bunx fastmail list_mailboxes
邮件:发送
bunx fastmail send_email \
{to: [{email: user@example.com}], subject: Hi, text_body: Message}
日历:列出事件
bunx fastmail list_events \
{start
date: 2024-01-01, enddate: 2024-01-31}
日历:创建带提醒的事件
bunx fastmail create
eventwith_reminder \
{title: Meeting, start: 2024-01-15T10:00:00, end: 2024-01-15T11:00:00, reminder_minutes: [15, 60]}
列出所有可用工具
bunx fastmail --list
何时使用此技能
- - 📧 查看收件箱或搜索邮件
- 📧 发送、回复或移动邮件
- 🏷️ 应用标签或整理邮箱
- 📅 查看日历或事件
- 📅 创建、更新或删除事件
- 🔔 设置事件提醒或闹钟
邮件工具(共10个)
| 工具 | 用途 |
|---|
| listmailboxes | 列出所有文件夹 |
| listemails |
列出邮箱中的邮件 |
| get_email | 获取完整邮件内容 |
| get_thread | 获取会话线程中的所有邮件 |
| search_emails | 按文本查询搜索 |
| send_email | 发送新邮件 |
| reply_email | 回复邮件 |
| move_email | 移动到文件夹 |
| set_labels | 应用标签($seen、$flagged) |
| delete_email | 删除(移至垃圾箱) |
批量邮件工具(共3个)
| 工具 | 用途 |
|---|
| bulkmoveemails | 一次移动多封邮件 |
| bulksetlabels |
为多封邮件应用标签 |
| bulk
deleteemails | 一次删除多封邮件 |
日历工具(共10个)
| 工具 | 用途 |
|---|
| listcalendars | 列出所有日历 |
| listevents |
按日期范围列出事件 |
| get_event | 获取事件详情 |
| create_event | 创建新事件 |
| update_event | 更新现有事件 |
| delete_event | 删除事件 |
| search_events | 按标题/描述搜索 |
| create
recurringevent | 创建重复事件 |
| list_invitations | 列出日历邀请 |
| respond
toinvitation | 接受/拒绝/待定邀请 |
提醒工具(共4个)
| 工具 | 用途 |
|---|
| addeventreminder | 为事件添加提醒 |
| removeeventreminder |
移除提醒 |
| list
eventreminders | 列出事件的提醒 |
| create
eventwith_reminder | 一次调用创建事件+提醒 |
常见示例
bash
查看收件箱(限制10封)
bunx fastmail list_emails {limit: 10}
搜索邮件
bunx fastmail search_emails {query: invoice}
获取特定邮件内容
bunx fastmail get
email {emailid: xxx}
获取邮件线程/会话
bunx fastmail get
thread {emailid: xxx}
批量操作
bunx fastmail bulk
moveemails {email
ids: [id1, id2], targetmailbox_id: archive}
bunx fastmail bulk
deleteemails {email_ids: [id1, id2, id3]}
创建重复事件(每天一次,持续10天)
bunx fastmail create
recurringevent \
{title: Standup, start: 2024-01-01T09:00:00, end: 2024-01-01T09:30:00, recurrence: daily, recurrence_count: 10}
日历邀请
bunx fastmail list_invitations
bunx fastmail respond
toinvitation {event_id: xxx, response: accept}
决策树
需要管理邮件?
- - 列出/搜索 → listemails 或 searchemails
- 阅读内容 → getemail
- 查看会话 → getthread
- 发送/回复 → sendemail 或 replyemail
- 整理 → moveemail、setlabels、deleteemail
- 批量操作 → bulkmoveemails、bulksetlabels、bulkdelete_emails
需要管理日历?
- - 查看 → listcalendars 或 listevents
- 创建 → createevent 或 createrecurringevent
- 修改 → updateevent
- 删除 → deleteevent
- 邀请 → listinvitations、respondtoinvitation
需要提醒?
- - 添加到现有事件 → addeventreminder
- 创建事件+提醒 → createeventwithreminder(更快)
- 管理 → listeventreminders、removeevent_reminder
输出格式
所有工具返回JSON:
json
{
success: true,
data: { / 工具特定响应 / },
timestamp: 2024-01-15T10:00:00+07:00
}
环境变量
| 变量 | 用途 | 必需 |
|---|
| FASTMAILAPITOKEN | 通过JMAP发送邮件 | 是(用于邮件) |
| FASTMAIL_USERNAME |
通过CalDAV使用日历 | 是(用于日历) |
| FASTMAIL_PASSWORD | 日历应用密码 | 是(用于日历) |
| FASTMAIL_TIMEZONE | 日历时区(IANA格式) | 否(自动检测) |
设置:
bash
export FASTMAILAPITOKEN=your-api-token
export FASTMAIL_USERNAME=your-email@fastmail.com
export FASTMAIL_PASSWORD=your-app-password
可选:覆盖时区(默认为系统本地时区)
export FASTMAIL
TIMEZONE=America/NewYork # 或 Asia/Bangkok、Europe/London 等
时区支持
⏰ 可配置的日历时区
- - 默认: 自动检测系统的本地时区
- 覆盖: 设置 FASTMAILTIMEZONE 环境变量
- 使用IANA时区标识符(例如 America/NewYork、Asia/Bangkok、Europe/London)
- 输入时间假定为配置的时区
- 输出时间显示为配置的时区
- 内部存储为UTC
- 自动处理夏令时(DST)
另请参阅
- - 详细参考: .opencode/skills/fastmail/references/TOOLS.md
- 完整指南: .opencode/skills/fastmail/README.md
- 设置帮助: Fastmail设置 → 隐私与安全 → 集成