Ingest newsletter
Skill allanbian1017/skills/skills/personal/ingest-newsletter
抓取未讀電子報並產出 Markdown 摘要報表(On-Demand Newsletter Summary)。使用 gws-gmail 技能讀取所有標記為 `label:newsletter is:unread` 的未讀信件,以批次方式逐封分析並依設定之輸出語言(預設為英文)產出 Markdown 摘要,儲存至 `./reports/Newsletter_YYYY_MM_DD/` 目錄,最後將信件標記為已讀並封存。當使用者說「幫我整理電子報」、「摘要電子報」、「處理未讀電子報」、「newsletter summary」、「讀取電子報」、「newsletter 摘要」,或任何需要從 Gmail 擷取並摘要電子報的情境,請務必使用此技能。From its SKILL.md
npx -y skills add allanbian1017/skills --skill ingest-newsletterAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 3 commands, including `gws gmail users messages list --params '{"userId": "me", "q": "label:newsletter is:unread", "maxResults": 10}'` and 2 more.
SKILL.md
3.8 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it
ingest-newsletter
抓取未讀電子報、產出 Markdown 摘要、更新信件狀態。此流程需「反覆迭代」直到所有未讀信件皆被處理完畢。
前置需求:確認已可使用
gwsCLI(透過gws-gmail技能)。如需驗證或全域旗標,先閱讀../gws-shared/SKILL.md。
參數
| 參數 | 必填 | 說明 |
|---|---|---|
MESSAGE_ID | 選填 | 由 daily-workflow 傳入。若提供,跳過步驟 1,直接以此 ID 處理單封信件。 |
SuggestionOutputPath | 選填 | 由 daily-workflow 傳入。若提供,傳遞至 suggestion_log.md 以寫入指定路徑。 |
步驟 1:讀取未讀的電子報(批次處理)
⚠️ 若已由呼叫者提供
MESSAGE_ID,跳過此步驟,直接進入步驟 2。
搜尋條件:label:newsletter is:unread。每次抓取最新的 10 封。
gws gmail users messages list --params '{"userId": "me", "q": "label:newsletter is:unread", "maxResults": 10}'
⚠️ 若沒有找到任何未讀信件,跳至「步驟 3」產出最終摘要。
步驟 2:分析與摘要模式
2-1. 讀取信件標頭與內文
gws gmail +read --id [MESSAGE_ID] --headers --html
標頭完整性檢查:From 與 Subject 為必要欄位。若被截斷,重新嘗試確保完整擷取。
2-2. 執行摘要
📄 Read
../content-summary/references/summarise.md
針對每封信件獨立產生完整摘要。同一批次多封信件必須逐一處理,不可合併。
2-3. 摘要輸出格式
📄 Read
../content-summary/references/output_template.md
2-4. 寫入報表檔案
📄 Read
../content-summary/references/filename_rules.md
每封電子報獨立寫入一個 Markdown 檔案。確認檔案寫入成功後再繼續。
2-4b. 產生 AI 分析並追加至待審清單
📄 Read
../content-summary/references/ai_analysis.md
📄 Follow
../content-summary/references/suggestion_log.md
{SourceType} = Newsletter
若 SuggestionOutputPath 已提供,傳遞至 suggestion_log.md。
2-5. 標記為已讀並封存
gws gmail users messages modify --params '{"userId": "me", "id": "[MESSAGE_ID]"}' --json '{"removeLabelIds": ["UNREAD", "INBOX"]}'
⚠️ 確認摘要檔案已成功產出後才標記為已讀。
2-6. 繼續下一批次
⚠️ 若由呼叫者提供
MESSAGE_ID(單封模式),處理完成後直接結束,不重複步驟 1。
重複「步驟 1」直到無未讀信件。
步驟 3:最終報告
任務完成後,在對話框中報告:
- 本次共處理幾封電子報
- 結果檔案所在路徑(
./reports/Newsletter_YYYY_MM_DD/)
💡 GWS CLI 指令速查
| 操作 | 指令 |
|---|---|
| 搜尋未讀電子報 ID | gws gmail users messages list --params '{"userId": "me", "q": "label:newsletter is:unread", "maxResults": 10}' |
| 讀取信件內文與標頭 | gws gmail +read --id [MESSAGE_ID] --headers |
| 標記已讀並封存 | gws gmail users messages modify --params '{"userId": "me", "id": "[MESSAGE_ID]"}' --json '{"removeLabelIds": ["UNREAD", "INBOX"]}' |
What ships with it: 1 file
8.5 KB alongside SKILL.md
- README.md8.5 KB
Gives 0 of the 12 instructions most marketing audience skills give in ~1.3k tokens
Counted across 690 of the 894 authors here whose files we hold, read 2026-08-07
- Apply Poppins font to headingsin 41 of 690, across 6 files
- Apply Lora font to body textin 41 of 690, across 6 files
- Use Arial fallback for headingsin 39 of 690, across 4 files
- Use Georgia fallback for body textin 39 of 690, across 4 files
- Maintain text hierarchy and formattingin 39 of 690, across 4 files
- Use accent colors for non-text shapesin 38 of 690, across 3 files
- Use RGB values for precise color matchingin 38 of 690, across 3 files
- Use brand colors for primary text and backgroundsin 36 of 690, across 1 file
- Read product marketing context file before asking questions, starting, or auditingin 35 of 690, across 23 files
- Use active voice instead of passive voicein 26 of 690, across 10 files
- Implement or generate appropriate JSON-LD structured datain 24 of 690, across 17 files
- Prioritize clarity over clevernessin 22 of 690, across 8 files
Said here and by no other author read
- fetch unread newsletters in batches of ten
- read each message with headers
- write each summary to a separate markdown file
- repeat until no unread newsletters remain
- report processed count and folder path
- process each message individually without merging
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.