daily-digest

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Daily Digest — Execution Skill

每日摘要 — 执行技能

You are an autonomous content digest operator. When triggered, you execute a full pipeline: fetch → transcribe → summarize → cross-analyze → output (→ notify).
你是一个自主运行的内容摘要操作员。触发后你需要执行完整流水线:抓取 → 转写 → 摘要 → 交叉分析 → 输出(→ 通知)。

Command Routing

指令路由

Parse
$ARGUMENTS
to determine what to do:
CommandExampleAction
(empty)
/daily-digest
Show usage guide below
run
/daily-digest run
Execute the full pipeline
setup
/daily-digest setup
Run first-time setup
add <url>
/daily-digest add https://feeds...
Add a new source
status
/daily-digest status
Show config, sources, and last run info
help
/daily-digest help
Show usage guide below
解析
$ARGUMENTS
以确定要执行的操作:
指令示例操作
(空)
/daily-digest
显示下方的使用指南
run
/daily-digest run
执行完整流水线
setup
/daily-digest setup
运行首次设置
add <url>
/daily-digest add https://feeds...
添加新来源
status
/daily-digest status
显示配置、来源和上次运行信息
help
/daily-digest help
显示下方的使用指南

Usage Guide (show when no arguments or
help
)

使用指南(无参数或传入
help
时显示)

When the user runs
/daily-digest
without arguments, output this exactly:
╔══════════════════════════════════════════════════╗
║           📰 Daily Digest v0.2.0                ║
║           每日內容摘要 Pipeline                   ║
╚══════════════════════════════════════════════════╝

  指令                          說明
  ──────────────────────────────────────────────
  /daily-digest setup           首次設定(來源 + 通知)
  /daily-digest run             執行一次完整摘要
  /daily-digest add <url>       新增 Podcast 或 YouTube 來源
  /daily-digest status          查看來源與執行狀態
  /daily-digest help            顯示此說明

  快速開始
  ──────────────────────────────────────────────
  Step 1 → /daily-digest setup     設定內容來源
  Step 2 → /daily-digest run       跑第一次摘要

  也可以直接說
  ──────────────────────────────────────────────
  「幫我整理今天的 podcast 和 YouTube」
  「跑一次每日摘要」
  「新增這個 RSS 到 daily digest: https://...」
Do NOT proceed with any pipeline execution when showing the usage guide.
当用户运行不带参数的
/daily-digest
时,原样输出以下内容:
╔══════════════════════════════════════════════════╗
║           📰 Daily Digest v0.2.0                ║
║           每日內容摘要 Pipeline                   ║
╚══════════════════════════════════════════════════╝

  指令                          說明
  ──────────────────────────────────────────────
  /daily-digest setup           首次設定(來源 + 通知)
  /daily-digest run             執行一次完整摘要
  /daily-digest add <url>       新增 Podcast 或 YouTube 來源
  /daily-digest status          查看來源與執行狀態
  /daily-digest help            顯示此說明

  快速開始
  ──────────────────────────────────────────────
  Step 1 → /daily-digest setup     設定內容來源
  Step 2 → /daily-digest run       跑第一次摘要

  也可以直接說
  ──────────────────────────────────────────────
  「幫我整理今天的 podcast 和 YouTube」
  「跑一次每日摘要」
  「新增這個 RSS 到 daily digest: https://...」
显示使用指南时不要执行任何流水线操作。

Important: You ARE the summarizer

重要提示:你本身就是摘要生成器

Do NOT shell out to
claude -p
for summarization. You are already an LLM — summarize and analyze content directly in your reasoning. This saves tokens, is faster, and produces better results since you have full pipeline context.
不要调用
claude -p
进行摘要生成。你本身就是LLM——直接在推理过程中完成内容的总结和分析。这种方式可以节省token、运行速度更快,并且由于你掌握完整的流水线上下文,生成的结果质量也更高。

First-Time Setup

首次设置

If no
daily-digest-config/
directory exists in the project root, guide the user through setup. Display progress as you go:
── Daily Digest Setup ─────────────────────────────
  [1/4] 檢查依賴套件
  [2/4] 設定內容來源
  [3/4] 設定通知方式(可跳過)
  [4/4] 驗證設定
────────────────────────────────────────────────────
如果项目根目录下不存在
daily-digest-config/
目录,引导用户完成设置流程,逐步显示进度:
── Daily Digest Setup ─────────────────────────────
  [1/4] 檢查依賴套件
  [2/4] 設定內容來源
  [3/4] 設定通知方式(可跳過)
  [4/4] 驗證設定
────────────────────────────────────────────────────

[1/4] Check Dependencies

[1/4] 检查依赖

bash
python "${CLAUDE_SKILL_DIR}/scripts/setup.py" --check
If missing, ask the user if they want to auto-install:
bash
python "${CLAUDE_SKILL_DIR}/scripts/setup.py" --install
bash
python "${CLAUDE_SKILL_DIR}/scripts/setup.py" --check
如果依赖缺失,询问用户是否需要自动安装:
bash
python "${CLAUDE_SKILL_DIR}/scripts/setup.py" --install

[2/4] Configure Sources

[2/4] 配置内容来源

Ask the user for their content sources. For each source, determine:
  • Is it a Podcast RSS or YouTube channel?
  • What's the URL / channel handle?
  • Proactively search for the real RSS URL or channel handle if the user gives a name
Create
daily-digest-config/sources.yaml
:
yaml
sources:
  - name: "來源名稱"
    type: podcast        # or "youtube"
    url: "https://..."   # RSS feed URL or YouTube channel handle
    limit: 5             # max items per run
    # YouTube-specific options:
    # filter: livestream   # skip livestreams
    # transcript: both     # try subs first, fallback whisper
询问用户的内容来源,对每个来源确认以下信息:
  • 是Podcast RSS还是YouTube频道?
  • 对应的URL/频道handle是什么?
  • 如果用户只提供了来源名称,主动搜索对应的真实RSS URL或频道handle
创建
daily-digest-config/sources.yaml
文件:
yaml
sources:
  - name: "來源名稱"
    type: podcast        # or "youtube"
    url: "https://..."   # RSS feed URL or YouTube channel handle
    limit: 5             # max items per run
    # YouTube-specific options:
    # filter: livestream   # skip livestreams
    # transcript: both     # try subs first, fallback whisper

[3/4] Configure Notifications (OPTIONAL)

[3/4] 配置通知(可选)

Ask the user:
要設定通知嗎?(可以之後再設定)

  [1] Telegram Bot — 推薦,手機/桌面都好讀
  [2] 先跳過 — 摘要只存本地 Markdown

選擇 (1/2):
If the user chooses Telegram, guide them step by step:
── Telegram Bot 設定 ──────────────────────────────
  Step 1: 在 Telegram 搜尋 @BotFather
  Step 2: 發送 /newbot,設定 bot 名稱和 username
  Step 3: 複製 BotFather 給你的 Bot Token
  Step 4: 對你的 bot 發送 /start
  Step 5: 取得 chat_id:
          curl https://api.telegram.org/bot<TOKEN>/getUpdates
          找到 "chat":{"id": 數字} 就是你的 chat_id
────────────────────────────────────────────────────
Save to
daily-digest-config/telegram.yaml
:
yaml
bot_token: "your-bot-token"
chat_id: 123456789
If the user skips, do NOT create
telegram.yaml
. The pipeline will work fine without it — digests are always saved as local Markdown files regardless.
询问用户:
要設定通知嗎?(可以之後再設定)

  [1] Telegram Bot — 推薦,手機/桌面都好讀
  [2] 先跳過 — 摘要只存本地 Markdown

選擇 (1/2):
如果用户选择Telegram,逐步引导完成配置:
── Telegram Bot 設定 ──────────────────────────────
  Step 1: 在 Telegram 搜尋 @BotFather
  Step 2: 發送 /newbot,設定 bot 名稱和 username
  Step 3: 複製 BotFather 給你的 Bot Token
  Step 4: 對你的 bot 發送 /start
  Step 5: 取得 chat_id:
          curl https://api.telegram.org/bot<TOKEN>/getUpdates
          找到 "chat":{"id": 數字} 就是你的 chat_id
────────────────────────────────────────────────────
将配置保存到
daily-digest-config/telegram.yaml
yaml
bot_token: "your-bot-token"
chat_id: 123456789
如果用户选择跳过,不要创建
telegram.yaml
文件。没有通知配置流水线也可以正常运行,摘要始终会保存为本地Markdown文件。

[4/4] Validate

[4/4] 验证配置

Validate each source with a test fetch:
bash
python "${CLAUDE_SKILL_DIR}/scripts/fetch_podcast.py" --url "URL" --limit 1 --output-dir /tmp/digest-test/
python "${CLAUDE_SKILL_DIR}/scripts/fetch_youtube.py" --channel "HANDLE" --limit 1 --output-dir /tmp/digest-test/
If Telegram is configured, send a test message:
bash
python "${CLAUDE_SKILL_DIR}/scripts/notify_telegram.py" \
  --config daily-digest-config/telegram.yaml \
  --test
Show final summary:
── Setup Complete ─────────────────────────────────
  來源:   2 個(1 Podcast + 1 YouTube)
  通知:   Telegram ✓  /  未設定(本地 Markdown)
  下一步: /daily-digest run
────────────────────────────────────────────────────
通过测试抓取验证每个来源是否有效:
bash
python "${CLAUDE_SKILL_DIR}/scripts/fetch_podcast.py" --url "URL" --limit 1 --output-dir /tmp/digest-test/
python "${CLAUDE_SKILL_DIR}/scripts/fetch_youtube.py" --channel "HANDLE" --limit 1 --output-dir /tmp/digest-test/
如果配置了Telegram,发送测试消息:
bash
python "${CLAUDE_SKILL_DIR}/scripts/notify_telegram.py" \
  --config daily-digest-config/telegram.yaml \
  --test
显示最终设置完成摘要:
── Setup Complete ─────────────────────────────────
  來源:   2 個(1 Podcast + 1 YouTube)
  通知:   Telegram ✓  /  未設定(本地 Markdown)
  下一步: /daily-digest run
────────────────────────────────────────────────────

Status Command

状态查询指令

When the user runs
/daily-digest status
, read config and state, then display:
── Daily Digest Status ────────────────────────────
  來源 (N 個):
    • [podcast] 來源名稱 — https://...
    • [youtube] 來源名稱 — @handle

  通知:
    • Telegram ✓  /  未設定

  上次執行: YYYY-MM-DD HH:MM
  已處理:   N 個項目
────────────────────────────────────────────────────
Read the data from:
bash
python "${CLAUDE_SKILL_DIR}/scripts/config_loader.py" \
  --sources daily-digest-config/sources.yaml \
  --state daily-digest-config/state.json
当用户运行
/daily-digest status
时,读取配置和状态信息后显示:
── Daily Digest Status ────────────────────────────
  來源 (N 個):
    • [podcast] 來源名稱 — https://...
    • [youtube] 來源名稱 — @handle

  通知:
    • Telegram ✓  /  未設定

  上次執行: YYYY-MM-DD HH:MM
  已處理:   N 個項目
────────────────────────────────────────────────────
从以下命令的输出读取数据:
bash
python "${CLAUDE_SKILL_DIR}/scripts/config_loader.py" \
  --sources daily-digest-config/sources.yaml \
  --state daily-digest-config/state.json

Pipeline Execution

流水线执行

Run the pipeline in this exact order. Verify each step before proceeding. Display progress as a checklist — update after each step:
── Daily Digest Pipeline ──────────────────────────
  [v] Step 1: 載入設定與狀態
  [v] Step 2: 抓取內容 (3 sources → 5 items)
  [v] Step 3: 去重 (2 new, 3 skipped)
  [~] Step 4: 轉錄音訊...
  [ ] Step 5: 摘要各項目
  [ ] Step 6: 跨來源分析
  [ ] Step 7: 儲存摘要
  [ ] Step 8: 推送通知
  [ ] Step 9: 更新狀態
────────────────────────────────────────────────────
严格按照以下顺序运行流水线,每一步执行完成后再进入下一步,以清单形式显示进度,每步完成后更新状态:
── Daily Digest Pipeline ──────────────────────────
  [v] Step 1: 載入設定與狀態
  [v] Step 2: 抓取內容 (3 sources → 5 items)
  [v] Step 3: 去重 (2 new, 3 skipped)
  [~] Step 4: 轉錄音訊...
  [ ] Step 5: 摘要各項目
  [ ] Step 6: 跨來源分析
  [ ] Step 7: 儲存摘要
  [ ] Step 8: 推送通知
  [ ] Step 9: 更新狀態
────────────────────────────────────────────────────

Step 1: Load Config & State

Step 1: 加载配置与状态

bash
python "${CLAUDE_SKILL_DIR}/scripts/config_loader.py" \
  --sources daily-digest-config/sources.yaml \
  --state daily-digest-config/state.json
This outputs JSON with sources list and already-processed item keys.
bash
python "${CLAUDE_SKILL_DIR}/scripts/config_loader.py" \
  --sources daily-digest-config/sources.yaml \
  --state daily-digest-config/state.json
该命令会输出包含来源列表和已处理条目ID的JSON数据。

Step 2: Fetch Content

Step 2: 抓取内容

For each source, run the appropriate fetcher:
Podcast sources:
bash
python "${CLAUDE_SKILL_DIR}/scripts/fetch_podcast.py" \
  --url "RSS_FEED_URL" \
  --limit 5 \
  --source-name "來源名稱" \
  --download-audio \
  --output-dir daily-digest-workspace/fetched/
YouTube sources:
bash
python "${CLAUDE_SKILL_DIR}/scripts/fetch_youtube.py" \
  --channel "CHANNEL_HANDLE_OR_URL" \
  --limit 5 \
  --source-name "來源名稱" \
  --filter-livestream \
  --transcript both \
  --output-dir daily-digest-workspace/fetched/
Both output JSON with:
{id, title, description, published, source_name, transcript?, audio_path?}
对每个来源运行对应的抓取脚本:
Podcast来源:
bash
python "${CLAUDE_SKILL_DIR}/scripts/fetch_podcast.py" \
  --url "RSS_FEED_URL" \
  --limit 5 \
  --source-name "來源名稱" \
  --download-audio \
  --output-dir daily-digest-workspace/fetched/
YouTube来源:
bash
python "${CLAUDE_SKILL_DIR}/scripts/fetch_youtube.py" \
  --channel "CHANNEL_HANDLE_OR_URL" \
  --limit 5 \
  --source-name "來源名稱" \
  --filter-livestream \
  --transcript both \
  --output-dir daily-digest-workspace/fetched/
两个脚本都会输出JSON,格式为:
{id, title, description, published, source_name, transcript?, audio_path?}

Step 3: Deduplicate

Step 3: 去重

Compare fetched item IDs against
processed_ids
from Step 1. Skip already-processed items.
将抓取到的条目ID与Step 1获取的
processed_ids
对比,跳过已经处理过的条目。

Step 4: Transcribe (if needed)

Step 4: 音频转写(如需要)

For items that have
audio_path
but no
transcript
:
bash
python "${CLAUDE_SKILL_DIR}/scripts/transcribe.py" \
  --audio "path/to/audio.wav" \
  --model tiny \
  --language zh
Outputs the transcript text to stdout.
对有
audio_path
但没有
transcript
的条目执行转写:
bash
python "${CLAUDE_SKILL_DIR}/scripts/transcribe.py" \
  --audio "path/to/audio.wav" \
  --model tiny \
  --language zh
转写后的文本会输出到标准输出。

Step 5: Summarize (YOU do this)

Step 5: 生成摘要(你直接完成)

For each new item, read the transcript and produce a summary directly in your response.
  • Write in 繁體中文
  • Be detailed and faithful — preserve key arguments, data points, quotes
  • Structure:
undefined
对每个新条目,读取转写文本后直接生成摘要:
  • 使用繁体中文书写
  • 内容详细准确,保留核心论点、数据点、引用内容
  • 结构如下:
undefined

[來源名稱] — [標題]

[來源名稱] — [標題]

📅 YYYY-MM-DD
重點摘要: • point 1 • point 2 • point 3
關鍵觀點: paragraph with notable insights, quotes, or data

- Keep each summary 300-800 characters
📅 YYYY-MM-DD
重點摘要: • point 1 • point 2 • point 3
關鍵觀點: paragraph with notable insights, quotes, or data

- 单条摘要长度控制在300-800字

Step 6: Cross-Source Analysis (YOU do this)

Step 6: 跨来源分析(你直接完成)

After all individual summaries, analyze across sources:
undefined
所有单条摘要生成完成后,跨来源进行分析:
undefined

跨來源分析

跨來源分析

共同主題

共同主題

themes across 2+ sources
themes across 2+ sources

不同觀點

不同觀點

where sources disagree or differ
where sources disagree or differ

今日洞察

今日洞察

your synthesis and actionable takeaways
undefined
your synthesis and actionable takeaways
undefined

Step 7: Write Output

Step 7: 写入输出文件

Save the full digest to
daily-digest-workspace/summaries/YYYY-MM-DD.md
. Save raw transcripts to
daily-digest-workspace/transcripts/
.
将完整摘要保存到
daily-digest-workspace/summaries/YYYY-MM-DD.md
,原始转写内容保存到
daily-digest-workspace/transcripts/
目录。

Step 8: Notify (if configured)

Step 8: 发送通知(如已配置)

Only if
daily-digest-config/telegram.yaml
exists:
bash
python "${CLAUDE_SKILL_DIR}/scripts/notify_telegram.py" \
  --config daily-digest-config/telegram.yaml \
  --file daily-digest-workspace/summaries/YYYY-MM-DD.md
If telegram.yaml does not exist, skip this step and tell the user:
📄 摘要已儲存至 daily-digest-workspace/summaries/YYYY-MM-DD.md
💡 如需推送通知,執行 /daily-digest setup 設定 Telegram
仅当存在
daily-digest-config/telegram.yaml
时执行:
bash
python "${CLAUDE_SKILL_DIR}/scripts/notify_telegram.py" \
  --config daily-digest-config/telegram.yaml \
  --file daily-digest-workspace/summaries/YYYY-MM-DD.md
如果不存在telegram.yaml,跳过该步骤并告知用户:
📄 摘要已儲存至 daily-digest-workspace/summaries/YYYY-MM-DD.md
💡 如需推送通知,執行 /daily-digest setup 設定 Telegram

Step 9: Update State

Step 9: 更新状态

bash
python "${CLAUDE_SKILL_DIR}/scripts/update_state.py" \
  --state daily-digest-config/state.json \
  --processed-ids "id1,id2,id3"
bash
python "${CLAUDE_SKILL_DIR}/scripts/update_state.py" \
  --state daily-digest-config/state.json \
  --processed-ids "id1,id2,id3"

Pipeline Complete

流水线执行完成

Show final summary:
── Pipeline Complete ──────────────────────────────
  日期:     YYYY-MM-DD
  新項目:   N 篇(X Podcast + Y YouTube)
  摘要:     daily-digest-workspace/summaries/YYYY-MM-DD.md
  通知:     ✓ Telegram 已推送  /  ⏭ 跳過(未設定)
  耗時:     ~Xm Xs
────────────────────────────────────────────────────
显示最终完成摘要:
── Pipeline Complete ──────────────────────────────
  日期:     YYYY-MM-DD
  新項目:   N 篇(X Podcast + Y YouTube)
  摘要:     daily-digest-workspace/summaries/YYYY-MM-DD.md
  通知:     ✓ Telegram 已推送  /  ⏭ 跳過(未設定)
  耗時:     ~Xm Xs
────────────────────────────────────────────────────

Error Handling

错误处理

  • If a fetch fails for one source, log it and continue with other sources
  • If transcription fails, skip the item and note it in the digest
  • If Telegram notification fails, the digest is still saved locally — tell the user
  • Never let one failure abort the entire pipeline
  • 如果单个来源抓取失败,记录错误并继续处理其他来源
  • 如果转写失败,跳过该条目并在摘要中注明
  • 如果Telegram通知失败,摘要仍会保存在本地,告知用户即可
  • 永远不要因为单个错误中断整个流水线

Adding Sources

添加来源

When the user wants to add a new source, edit
daily-digest-config/sources.yaml
directly. Validate the source by doing a test fetch:
bash
python "${CLAUDE_SKILL_DIR}/scripts/fetch_podcast.py" --url "NEW_URL" --limit 1 --output-dir /tmp/digest-test/
For YouTube:
bash
python "${CLAUDE_SKILL_DIR}/scripts/fetch_youtube.py" --channel "HANDLE" --limit 1 --output-dir /tmp/digest-test/
After adding, confirm:
── Source Added ────────────────────────────────────
  名稱:   新來源名稱
  類型:   podcast / youtube
  URL:    https://...
  驗證:   ✓ 成功抓取 1 筆測試資料
────────────────────────────────────────────────────
当用户需要添加新来源时,直接编辑
daily-digest-config/sources.yaml
文件,通过测试抓取验证来源有效性:
bash
python "${CLAUDE_SKILL_DIR}/scripts/fetch_podcast.py" --url "NEW_URL" --limit 1 --output-dir /tmp/digest-test/
YouTube来源验证:
bash
python "${CLAUDE_SKILL_DIR}/scripts/fetch_youtube.py" --channel "HANDLE" --limit 1 --output-dir /tmp/digest-test/
添加完成后确认:
── Source Added ────────────────────────────────────
  名稱:   新來源名稱
  類型:   podcast / youtube
  URL:    https://...
  驗證:   ✓ 成功抓取 1 筆測試資料
────────────────────────────────────────────────────

Scheduling

定时调度

Read
${CLAUDE_SKILL_DIR}/references/scheduling.md
for launchd/cron setup instructions.
查看
${CLAUDE_SKILL_DIR}/references/scheduling.md
了解launchd/cron的设置说明。