شعار Gen Email

Gen Email

المجتمع
octo-patch
gen-email

Send the daily MorningAI digest as HTML email via SMTP to a configured recipient list.

نظرة عامة

الناشرocto-patch
المستودعMorningAI
اسم المهارةgen-email
النجوم
32
التفريعات
3
الملفات المرفقة
2
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 2

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها octo-patch على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Gen Email في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/octo-patch/MorningAI/tree/main/skills/gen-email
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/octo-patch/MorningAI.git /tmp/MorningAI
mkdir -p .claude/skills
cp -r /tmp/MorningAI/skills/gen-email .claude/skills/gen-email
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Gen Email في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Gen Email تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Gen Email بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Objective

Distribute the daily AI news digest as multipart HTML email to a configured recipient list via SMTP. Reads the same data_{DATE}.json as gen-message (already scored, deduped, cross-source verified) and produces:

  1. HTML email body — email_{DATE}.html (also used as the email body)
  2. Plain text fallback — email_{DATE}.txt (multipart/alternative pairing)
  3. Send manifest — email_{DATE}_manifest.json (per-recipient send status)

This is the first true automated push channel in the pipeline — gen-message / gen-social only generate files for manual sharing, while gen-email actually delivers to inboxes.

Factual integrity inherited from gen-message: every item must have a source_url. Items with score ≥ 7 must additionally satisfy verified == true. Drop items lacking a credible source.


Configuration

VariableRequiredDefaultDescription
EMAIL_ENABLED—falseMaster switch — when unset/false, the step is silently skipped
EMAIL_RECIPIENTS✓—Comma-separated list, e.g. alice@x.com,bob@y.com
EMAIL_RECIPIENTS_FILE—.claude/recipients.jsonOptional JSON file — overrides env list when present
EMAIL_SMTP_HOST✓—SMTP server, e.g. smtp.gmail.com, smtp.qq.com
EMAIL_SMTP_PORT—587Port (587=STARTTLS, 465=SSL, 25=plain)
EMAIL_SMTP_TLS—starttlsstarttls / ssl / none
EMAIL_SMTP_USER✓—SMTP auth username
EMAIL_SMTP_PASSWORD✓—SMTP password (Gmail: use App Password, not account password)
EMAIL_FROM—EMAIL_SMTP_USERDisplay sender, e.g. MorningAI <noreply@x.com>
EMAIL_REPLY_TO——Reply-To header
EMAIL_SUBJECT_TEMPLATE—MorningAI {date} · {n} updatesSubject template, supports {date} {n} {lang}
EMAIL_LANG—follows --langEmail language: zh / en / ja
EMAIL_MIN_SCORE—5Min importance score to include
EMAIL_MAX_ITEMS—10Max items in the digest
EMAIL_ATTACH_IMAGE—trueAttach message_{DATE}.png if it exists
EMAIL_RATE_LIMIT_DELAY—1Seconds to sleep between recipients (anti-throttling)
EMAIL_LIST_UNSUBSCRIBE——Unsubscribe target, e.g. mailto:admin@x.com?subject=Unsubscribe
EMAIL_DRY_RUN—falseIf true, generate email_*.html/email_*.txt locally and do not send
EMAIL_KOL_ENABLED—trueRender a separate "KOL Voices" section after the main items. Set false to suppress entirely
EMAIL_KOL_MIN_SCORE—4Min importance for KOL items (independent of EMAIL_MIN_SCORE because KOL voices are scored 4-7 by design)
EMAIL_KOL_MAX_ITEMS—5Max KOL items to include in the section
EMAIL_KOL_SHOW_EMPTY—trueWhen no KOL items qualify, still render the section header with a "today was quiet" empty-state line. Set false to omit the section on quiet days

Recipients JSON format (EMAIL_RECIPIENTS_FILE)

json
[
  {"email": "alice@example.com", "name": "Alice", "lang": "zh", "min_score": 6, "active": true},
  {"email": "bob@example.com"},
  {"email": "paused@example.com", "active": false}
]

Per-recipient lang and min_score override the global defaults. Inactive entries are skipped.


Content Selection Rules

Same as gen-message (see skills/gen-message/SKILL.md for full spec):

  1. Load data_{DATE}.json from CWD.
  2. Filter: importance >= min_score (per-recipient or global), source_url present, verified == true for score ≥ 7.
  3. Skip items with is_kol_voice == true — they render in the dedicated KOL section, not mixed into the main feed.
  4. Apply category balance: product ≤ 4, model ≤ 3, benchmark ≤ 2, financing ≤ 2; overflow filled by score.
  5. Sort by importance desc, cap at EMAIL_MAX_ITEMS.

KOL Voices Section

A separate block rendered after the main items, mirroring the ## KOL Voices section in report_{DATE}.md and the dedicated KOL channel in gen-social. Independent commentary deserves its own visual lane — without it, KOL takes either get suppressed by the 7+ verification gate (KOL voices are scored 4-7 by design) or appear interleaved with vendor announcements.

KOL filter rules:

  1. Only items with is_kol_voice == true.
  2. importance >= EMAIL_KOL_MIN_SCORE (default 4, lower than the main EMAIL_MIN_SCORE).
  3. Must have source_url.
  4. No 7+ verification gate — matches gen-infographic's KOL handling: KOL voices are commentary, not vendor announcements that need cross-source verification.
  5. Sorted by importance desc, capped at EMAIL_KOL_MAX_ITEMS.

When zero KOL items qualify, the section is still rendered with a "today's KOL voices were quiet" line if EMAIL_KOL_SHOW_EMPTY=true (the default), so subscribers see the section is alive even on quiet days. Set EMAIL_KOL_SHOW_EMPTY=false to omit the section entirely on quiet days, or EMAIL_KOL_ENABLED=false to suppress it permanently.


Workflow Summary

The send_email.py script handles all of the following automatically:

  1. Read config, exit silently if EMAIL_ENABLED != true.
  2. Validate required config (EMAIL_SMTP_HOST / EMAIL_SMTP_USER / EMAIL_SMTP_PASSWORD / recipients) — exit with clear error if missing.
  3. Load data_{DATE}.json and apply selection rules.
  4. Load recipients from EMAIL_RECIPIENTS_FILE (if exists) or EMAIL_RECIPIENTS.
  5. Render preview using global EMAIL_LANG → write email_{DATE}.html and email_{DATE}.txt.
  6. If EMAIL_DRY_RUN=true, exit after writing previews (no SMTP traffic).
  7. Otherwise send to each recipient (re-render in their preferred language), sleeping EMAIL_RATE_LIMIT_DELAY seconds between sends.
  8. Write email_{DATE}_manifest.json with per-recipient status (sent / failed) and error text.

Invocation

The orchestrator (skills/morning-ai/SKILL.md Step 7) runs:

bash
python3 skills/gen-email/scripts/send_email.py --date {YYYY-MM-DD}

Optional flags:

  • --date YYYY-MM-DD — override the date (default: today UTC+8)
  • --data PATH — override the data file path (default: data_{DATE}.json in CWD)
  • --lang zh|en|ja — override EMAIL_LANG
  • --dry-run — equivalent to EMAIL_DRY_RUN=true

Compliance & Anti-Spam

  • List-Unsubscribe header (RFC 2369) is automatically added when EMAIL_LIST_UNSUBSCRIBE is set. Major clients (Gmail, Outlook, Apple Mail) display a one-click unsubscribe button.
  • Plain-text fallback is always included (multipart/alternative). Improves deliverability for clients that strip HTML.
  • Rate limiting (EMAIL_RATE_LIMIT_DELAY) prevents tripping SMTP provider throttles (Gmail caps free accounts at ~100 sends/day, with short bursts blocked).
  • Per-recipient send (no BCC) — protects subscriber privacy, allows per-recipient personalization (language), and avoids "looks like spam blast" heuristics.

When a recipient asks to unsubscribe, the admin manually removes them from EMAIL_RECIPIENTS or recipients.json. Self-service unsubscribe requires a hosted backend (out of scope for this skill).


Common SMTP Configurations

See docs/email-setup.md for full details. Quick reference:

ProviderHostPortTLSNotes
Gmailsmtp.gmail.com587STARTTLSRequires App Password (turn on 2FA → generate App Password)
QQ Mailsmtp.qq.com465SSLUse authorization code, not login password
Outlooksmtp.office365.com587STARTTLSAccount password or App Password
Alibaba Cloud Enterprise Mailsmtp.qiye.aliyun.com465SSLAccount password

Example: Manifest Output

json
{
  "date": "2026-04-20",
  "subject": "MorningAI 2026-04-20 · 8 updates",
  "total": 3,
  "succeeded": 2,
  "failed": 1,
  "results": [
    {"email": "alice@example.com", "status": "sent", "message_id": "<...@morning-ai>"},
    {"email": "bob@example.com",   "status": "sent", "message_id": "<...@morning-ai>"},
    {"email": "carol@example.com", "status": "failed", "error": "smtp error: 550 mailbox unavailable"}
  ]
}

The manifest enables retry logic in future runs (skip already-sent recipients) and makes failures visible without scraping logs.

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Gen Email؟

Send the daily MorningAI digest as HTML email via SMTP to a configured recipient list.

لماذا تستخدم Gen Email على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Gen Email عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Gen Email في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/octo-patch/MorningAI/tree/main/skills/gen-email. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Gen Email؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Gen Email؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Gen Email معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Gen Email مجانية؟

نشرها octo-patch على GitHub. راجع المستودع للاطلاع على شروط الترخيص. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇