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

email

Email operations skill for sending, fetching, and reading emails via IMAP/SMTP. Uses curl with OpenSSL/LibreSSL for reliable TLS compatibility with Tencent Enterprise Mail and other providers. Credentials are securely stored in macOS Keychain.

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

연동 도구Gmail
설치 방법 보기

포함된 파일(9)

  • SKILL.md8.4 KB
  • references/accounts.yaml963 B
  • scripts/common.sh2.1 KB
  • scripts/fetch-emails.sh7.2 KB
  • scripts/read-email.sh13.9 KB
  • scripts/search-mail.sh381 B
  • scripts/send-email.sh2.1 KB
  • skill-report.json180.1 KB
  • USER_MANUAL.md1.2 KB

SKILL.md(원문)

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

Email Operations Skill

Overview

This skill provides email capabilities through direct IMAP/SMTP protocol access using curl. It supports:

  • Sending emails via SMTP with TLS
  • Fetching email lists via IMAP
  • Reading email content by ID
  • Multi-account support with secure credential storage

Architecture

  • Protocol: Direct IMAP (port 993) and SMTP (port 465) over TLS
  • Security: Passwords stored in macOS Keychain, never in config files
  • Compatibility: Uses curl with OpenSSL/LibreSSL (better Tencent Enterprise Mail support than rustls)
  • Configuration: YAML-based account management in references/accounts.yaml

Available Scripts

1. Send Email (send-email.sh)

Send emails via SMTP with support for inline or file-based content.

Usage:

./scripts/send-email.sh -t recipient@example.com -s "Subject" -b "Message"
./scripts/send-email.sh -t recipient@example.com -s "Subject" -f message.txt
./scripts/send-email.sh -t recipient@example.com -c another@example.com -s "Subject" -b "Message"

Parameters:

  • -a ACCOUNT - Account name (default: from accounts.yaml)
  • -t EMAIL - Recipient email (required)
  • -c EMAIL - CC recipient (optional)
  • -s TEXT - Email subject (required)
  • -b TEXT - Email body inline (required if no -f)
  • -f FILE - Email body from file (required if no -b)

2. Fetch Emails (fetch-emails.sh)

Retrieve email headers from a mailbox.

Usage:

./scripts/fetch-emails.sh                    # Fetch 10 latest from INBOX
./scripts/fetch-emails.sh -n 20              # Fetch 20 latest
./scripts/fetch-emails.sh -m "Sent"          # Fetch from Sent folder

Parameters:

  • -a ACCOUNT - Account name (default: from accounts.yaml)
  • -m FOLDER - Mailbox folder (default: INBOX)
  • -n N - Number of emails to fetch (default: 10)

3. Read Email (read-email.sh)

Read full content of a specific email by ID.

Usage:

./scripts/read-email.sh 123                   # Read full email
./scripts/read-email.sh -p HEADER 123         # Headers only
./scripts/read-email.sh -p BODY 123           # Body only

Parameters:

  • -a ACCOUNT - Account name (default: from accounts.yaml)
  • -m FOLDER - Mailbox folder (default: INBOX)
  • -p PART - Part to retrieve: HEADER, BODY, or TEXT (default: TEXT)
  • EMAIL_ID - Email ID (required, positional argument)

Configuration

Account Setup

Edit references/accounts.yaml to add email accounts:

default_account: SUSTech

accounts:
  SUSTech:
    email: qihr2022@mail.sustech.edu.cn
    display_name: Hanrui Qi
    imap:
      host: imap.exmail.qq.com
      port: 993
      login: qihr2022@mail.sustech.edu.cn
      protocol: imaps
    smtp:
      host: smtp.exmail.qq.com
      port: 465
      login: qihr2022@mail.sustech.edu.cn
      protocol: smtps

Password Management

Passwords are stored in macOS Keychain. Set them using:

# IMAP password
security add-generic-password \
  -a "qihr2022@mail.sustech.edu.cn" \
  -s "email-imap-sustech" \
  -w "your-password" \
  -U

# SMTP password
security add-generic-password \
  -a "qihr2022@mail.sustech.edu.cn" \
  -s "email-smtp-sustech" \
  -w "your-password" \
  -U

Keychain service naming convention:

  • IMAP: email-imap-{account_name_lowercase}
  • SMTP: email-smtp-{account_name_lowercase}

Common Use Cases

1. Send a Quick Email

When user says: "Send an email to alice@example.com about the meeting"

cd /Users/seven/Claude/.claude/skills/email
./scripts/send-email.sh \
  -t alice@example.com \
  -s "Meeting Discussion" \
  -b "Hi Alice, I wanted to follow up on our meeting..."

2. Check Recent Emails

When user says: "Check my email" or "Any new emails?"

cd /Users/seven/Claude/.claude/skills/email
./scripts/fetch-emails.sh -n 5

Parse the output and summarize for the user.

Search / Filter (Pipe + grep/rg)

This is a lightweight way to "search" within the recent emails that fetch-emails.sh fetched (headers only: From/Subject/Date).

cd /Users/seven/Claude/.claude/skills/email

# 任意关键字(例如 github),同时保留邮件 ID 行(便于后续 read)
./scripts/fetch-emails.sh -n 200 | rg -i "github" -B 2

# 主题关键字(建议用 rg;没有 rg 就用 grep -E)
./scripts/fetch-emails.sh -n 200 | rg "主题:.*会议" -B 2
./scripts/fetch-emails.sh -n 200 | grep -E "主题:.*会议" -B 2

# 发件人关键字
./scripts/fetch-emails.sh -n 200 | rg "发件人:.*alice" -B 1

# 提取匹配到的邮件 ID,然后读取正文(取第一个匹配)
email_id="$(
  ./scripts/fetch-emails.sh -n 200 |
    rg -i "github" -B 2 |
    sed -nE 's/.*邮件 #([0-9]+).*/\1/p' |
    head -n 1
)"
./scripts/read-email.sh "$email_id"

If email_id is empty, increase -n (fetch more recent emails) or adjust the keyword/regex.

3. Read Specific Email

When user says: "Read email #3" or "Show me the latest email"

cd /Users/seven/Claude/.claude/skills/email
./scripts/read-email.sh 3

4. Email Automation

Combine with other skills for automation:

  • Check calendar → Send reminder emails
  • Monitor inbox → Create system notifications
  • Fetch emails → Parse and extract information

Error Handling

Common Issues

  1. Authentication Failed

    • Verify Keychain passwords are set correctly
    • Check if IMAP/SMTP is enabled in email provider settings
    • For Tencent Enterprise Mail, use app-specific password
  2. Connection Timeout

    • Verify network connectivity
    • Check firewall settings for ports 993 (IMAP) and 465 (SMTP)
    • Confirm host and port in accounts.yaml
  3. TLS Handshake Failed

    • This skill uses curl with OpenSSL/LibreSSL for better compatibility
    • If issues persist, check email provider's TLS requirements

Security Considerations

  • Never log or display passwords - they're in Keychain only
  • Confirm before sending - especially for important emails
  • Validate recipients - check email addresses before sending
  • Respect privacy - don't read emails unless explicitly requested

Provider-Specific Notes

Tencent Enterprise Mail (exmail.qq.com)

  • IMAP: imap.exmail.qq.com:993 (SSL/TLS)
  • SMTP: smtp.exmail.qq.com:465 (SSL/TLS)
  • Requires IMAP/SMTP enabled in settings
  • Recommend using app-specific password
  • Note: IMAP SEARCH for string criteria (e.g. SUBJECT/FROM/HEADER) may be unreliable on some Tencent Exmail servers; prefer client-side filtering via fetch-emails.sh | rg/grep.

Gmail

  • IMAP: imap.gmail.com:993
  • SMTP: smtp.gmail.com:587 (STARTTLS)
  • Requires "Less secure app access" or App Password
  • May need OAuth2 for enhanced security

Outlook/Office 365

  • IMAP: outlook.office365.com:993
  • SMTP: smtp.office365.com:587
  • Requires modern authentication

Technical Details

Why curl instead of rustls?

The rustls TLS library has compatibility issues with some email providers (notably Tencent Enterprise Mail). curl with OpenSSL/LibreSSL provides:

  • Better TLS handshake compatibility
  • Wider cipher suite support
  • Proven reliability with enterprise email systems

IMAP vs POP3

This skill uses IMAP (not POP3) because:

  • IMAP supports folder management
  • Messages remain on server
  • Better for multi-device access
  • More flexible search and filtering

Future Enhancements

Potential improvements (not yet implemented):

  • Server-side IMAP SEARCH (subject/sender/date; provider-dependent)
  • Attachment handling
  • HTML email composition
  • Email filtering and rules
  • OAuth2 authentication support
  • Batch operations

References

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.

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

aiskillstore/marketplace4402026년 10월 21일 업데이트

Trigger for: explaining current FAR, DFARS, or agency-supplement text; determining documented acquisition-policy status for an agency and FAR part; comparing codified text, RFO model text, and agency deviations; tracing acquisition rulemaking; finding procurement comment periods; analyzing public comments; refreshing prior policy analysis; or producing an Acquisition Policy Impact Brief. Use published federal sources and supplied policy documents without making legal or procurement-specific applicability determinations. Do not use for clause selection, market research execution, opportunities, pricing, grants, or cooperative agreements.

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

aiskillstore/marketplace4402026년 10월 21일 업데이트

Systematic framework for extracting actionable items from documents and organizing them into prioritized, trackable checklists. Use when converting reports, meeting notes, audits, or any document with embedded action items into structured TODO lists.

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

aiskillstore/marketplace4402026년 10월 21일 업데이트

Browser automation for AI agents via inference.sh. Navigate web pages, interact with elements using @e refs, take screenshots, record video. Capabilities: web scraping, form filling, clicking, typing, drag-drop, file upload, JavaScript execution. Use for: web automation, data extraction, testing, agent browsing, research. Triggers: browser, web automation, scrape, navigate, click, fill form, screenshot, browse web, playwright, headless browser, web agent, surf internet, record video

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

aiskillstore/marketplace4402026년 10월 21일 업데이트

This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.

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

aiskillstore/marketplace4402026년 10월 21일 업데이트

Run AI apps via inference.sh CLI - image generation, video creation, LLMs, search, 3D, Twitter automation. Models: FLUX, Veo, Gemini, Grok, Claude, Seedance, OmniHuman, Tavily, Exa, OpenRouter, and many more. Use when running AI apps, generating images/videos, calling LLMs, web search, or automating Twitter. Triggers: inference.sh, infsh, ai model, run ai, serverless ai, ai api, flux, veo, claude api, image generation, video generation, openrouter, tavily, exa search, twitter api, grok

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

aiskillstore/marketplace4402026년 10월 21일 업데이트

aiskillstore의 스킬 모두 보기

이 스킬의 문제 신고