본문으로 건너뛰기
cccskills
무료GitHub에 공개

apple-mail

Apple Mail.app integration for macOS. Read inbox, search emails, send emails, reply, and manage messages with fast direct access (no enumeration).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Gmail
설치 방법 보기

포함된 파일(15)

  • SKILL.md5.9 KB
  • .clawhub/origin.json142 B
  • scripts/mail-accounts.sh627 B
  • scripts/mail-delete.sh3.0 KB
  • scripts/mail-fast-search.sh1.6 KB
  • scripts/mail-list.sh1.8 KB
  • scripts/mail-mailboxes.sh1.2 KB
  • scripts/mail-mark-read.sh3.1 KB
  • scripts/mail-mark-unread.sh3.1 KB
  • scripts/mail-read-emlx.py5.0 KB
  • scripts/mail-read.sh4.4 KB
  • scripts/mail-refresh.sh3.4 KB
  • scripts/mail-reply.sh1.4 KB
  • scripts/mail-search.sh2.0 KB
  • scripts/mail-send.sh2.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Apple Mail

Interact with Mail.app via AppleScript and SQLite. Run scripts from: cd {baseDir}

Commands

CommandUsage
Refreshscripts/mail-refresh.sh [account] [wait_seconds]
List recentscripts/mail-list.sh [mailbox] [account] [limit]
Searchscripts/mail-search.sh "query" [mailbox] [limit]
Fast searchscripts/mail-fast-search.sh "query" [limit]
Read emailscripts/mail-read.sh <message-id> [message-id...]
Deletescripts/mail-delete.sh <message-id> [message-id...]
Mark readscripts/mail-mark-read.sh <message-id> [message-id...]
Mark unreadscripts/mail-mark-unread.sh <message-id> [message-id...]
Sendscripts/mail-send.sh "to@email.com" "Subject" "Body" [from-account] [attachment] ¹
Replyscripts/mail-reply.sh <message-id> "body" [reply-all]
List accountsscripts/mail-accounts.sh
List mailboxesscripts/mail-mailboxes.sh [account]

Refreshing Mail

Force Mail.app to check for new messages:

scripts/mail-refresh.sh                    # All accounts, wait up to 10s
scripts/mail-refresh.sh Google             # Specific account only
scripts/mail-refresh.sh "" 5               # All accounts, max 5 seconds
scripts/mail-refresh.sh Google 0           # Google account, no wait

Smart sync detection:

  • Script monitors database message count
  • Returns early when sync completes (no changes for 2s)
  • Reports new message count: Sync complete in 2s (+3 messages)

Notes:

  • Mail.app must be running (script will error if not)
  • mail-list.sh does NOT auto-refresh — call mail-refresh.sh first if you need fresh data

Output Format

List/search returns: ID | ReadStatus | Date | Sender | Subject

  • ● = unread, blank = read

Gmail Mailboxes

⚠️ Gmail special folders need [Gmail]/ prefix:

Shows asUse
Spam[Gmail]/Spam
Sent Mail[Gmail]/Sent Mail
All Mail[Gmail]/All Mail
Trash[Gmail]/Trash

Custom labels work without prefix.

Fast Search (SQLite)

✨ Now safe even if Mail.app is running — copies database to temp file first.

scripts/mail-fast-search.sh "query" [limit]  # ~50ms vs minutes

Previously required Mail.app to be quit. Now works anytime by copying the database to a temp file before querying.

Performance Notes

Speed by operation:

OperationSpeedNotes
mail-fast-search.sh~50msSQLite query, fastest
mail-accounts.sh<1sSimple AppleScript
mail-list.sh1-3sAppleScript, direct mailbox access
mail-send.sh1-2sCreates and sends message
mail-read.sh~2sPosition-optimized lookup
mail-delete.sh~0.5sPosition-optimized lookup
mail-mark-*.sh~1.5sPosition-optimized lookup

Optimization technique: SQLite provides account UUID and approximate message position. AppleScript jumps directly to that position instead of iterating from the start.

Batch operations supported:

  • mail-read.sh 123 456 789 - Read multiple (separator between each)
  • mail-delete.sh 123 456 789 - Delete multiple
  • mail-mark-read.sh 123 456 - Mark multiple as read
  • mail-mark-unread.sh 123 456 - Mark multiple as unread

⚠️ No auto-refresh: Scripts read cached data. Call mail-refresh.sh first if you need latest emails.

Managing Emails

Delete emails:

scripts/mail-delete.sh 12345                    # Delete one
scripts/mail-delete.sh 12345 12346 12347        # Delete multiple

Mark as read/unread:

scripts/mail-mark-read.sh 12345 12346           # Mark as read
scripts/mail-mark-unread.sh 12345               # Mark as unread

Bulk operations example:

# Find spam emails
scripts/mail-fast-search.sh "spam" 50 > spam.txt

# Extract IDs and delete them
grep "^[0-9]" spam.txt | cut -d'|' -f1 | xargs scripts/mail-delete.sh

Reading Email Bodies

scripts/mail-read.sh 12345              # Single email
scripts/mail-read.sh 12345 12346 12347  # Multiple emails (separated output)

Uses position-optimized lookup (~2s per message). Multiple emails are separated by ======== with a summary at the end.

Errors

ErrorCause
Mail.app is not runningOpen Mail.app before running scripts
Account not foundInvalid account — check mail-accounts.sh
Message not foundInvalid/deleted ID — get fresh from mail-list.sh
Can't get mailboxInvalid name — check mail-mailboxes.sh
Mail database not foundSQLite DB missing — check ~/Library/Mail/V{9,10,11}/MailData/

Technical Details

Database: ~/Library/Mail/V{9,10,11}/MailData/Envelope Index

Message lookup method (optimized):

  1. Query SQLite for account UUID, mailbox path, and approximate position
  2. AppleScript accesses the specific account directly (no iteration)
  3. Search starts at the approximate position (±5 messages buffer)
  4. Falls back to full mailbox search only if position hint fails

Safety:

  • Fast search copies database to temp file before querying
  • Safe to use even if Mail.app is running
  • Delete/read/mark operations query live database but access is minimal

Notes

  • Message IDs are internal, get fresh ones from list/search
  • Confirm recipient before sending
  • AppleScript search is slow but comprehensive; SQLite is fast for metadata
  • Delete/mark operations support bulk actions (pass multiple IDs)
  • Always refresh before listing if you need the absolute latest emails

¹ Known limitation: Mail.app adds a leading blank line to sent emails. This is an AppleScript/Mail.app behavior that cannot be bypassed.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

1password

무료

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

danstrem2/clawdbot-skill-master-pack22026년 2월 1일 업데이트

Expert in building 3D experiences for the web - Three.js, React Three Fiber, Spline, WebGL, and interactive 3D scenes. Covers product configurators, 3D portfolios, immersive websites, and bringing depth to web experiences. Use when: 3D website, three.js, WebGL, react three fiber, 3D experience.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

danstrem2/clawdbot-skill-master-pack22026년 2월 1일 업데이트

When the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," or "hypothesis." For tracking implementation, see analytics-tracking.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

danstrem2/clawdbot-skill-master-pack22026년 2월 1일 업데이트

accli

무료

This skill should be used when interacting with Apple Calendar on macOS. Use it for listing calendars, viewing events, creating/updating/deleting calendar events, and checking availability/free-busy times. Triggers on requests like "check my calendar", "schedule a meeting", "what's on my schedule", "am I free tomorrow", or any calendar-related operations.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

danstrem2/clawdbot-skill-master-pack22026년 2월 1일 업데이트

This skill should be used when the user asks to "attack Active Directory", "exploit AD", "Kerberoasting", "DCSync", "pass-the-hash", "BloodHound enumeration", "Golden Ticket", "Silver Ticket", "AS-REP roasting", "NTLM relay", or needs guidance on Windows domain penetration testing.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

danstrem2/clawdbot-skill-master-pack22026년 2월 1일 업데이트

ActiveCampaign CRM integration for lead management, deal tracking, and email automation. Use for syncing demo leads, managing clinic sales pipeline, and triggering follow-up sequences.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

danstrem2/clawdbot-skill-master-pack22026년 2월 1일 업데이트

danstrem2의 스킬 모두 보기

이 스킬의 문제 신고