{"slug":"daily-news-digest","title":"daily-news-digest","summary":"定时抓取 RSS 源，用 LLM 生成中文新闻摘要，遵循 STATE.md 状态管理和 Maker/Checker 验证","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-10-22T21:02:54.558981Z","repo":{"url":"https://github.com/Komagon/hermes-production-patterns","stars":17,"forks":1,"license":"MIT","updatedAt":"2026-10-26T06:49:39Z"},"bodyHtml":"<hr>\n<p>maturity: experimental\nname: daily-news-digest\ndescription: 定时抓取 RSS 源，用 LLM 生成中文新闻摘要，遵循 STATE.md 状态管理和 Maker/Checker 验证\nversion: 1.0.0\ntriggers:</p>\n<ul>\n<li>\"run daily digest\"</li>\n<li>\"fetch today's news\"</li>\n<li>\"生成今日摘要\"\ntools:</li>\n<li>terminal</li>\n<li>read_file</li>\n<li>write_file</li>\n<li>web_extract\nmutating: true</li>\n</ul>\n<hr>\n<h1>Daily News Digest</h1>\n<blockquote>\n<p>实时演示 <a href=\"../../conventions/\">conventions/</a> 中全部四条工程公约的完整集成：</p>\n<ul>\n<li><strong><a href=\"../../conventions/state-file-pattern.md\">state-file-pattern</a></strong> — STATE.md 跨运行状态</li>\n<li><strong><a href=\"../../conventions/control-flow-separation.md\">control-flow-separation</a></strong> — 抓取用代码 / 摘要用 LLM</li>\n<li><strong><a href=\"../../conventions/maker-checker.md\">maker-checker</a></strong> — Checker 五维验证摘要质量</li>\n<li><strong><a href=\"../../conventions/error-compact-pattern.md\">error-compact-pattern</a></strong> — 错误不炸上下文</li>\n</ul>\n</blockquote>\n<h2>工作流</h2>\n<h3>Step 1: 读取状态（确定性）✅</h3>\n<p>从 <code>STATE.md</code> 读取上次运行状态和 idempotency keys。</p>\n<h3>Step 2: 抓取 RSS（确定性）✅</h3>\n<pre><code># 零 LLM 成本。只处理上次运行后新增的文章。\nimport feedparser\n\nfor url in RSS_SOURCES:\n    feed = feedparser.parse(url)\n    new = [entry for entry in feed.entries\n           if entry.id not in state.get(\"idempotency_keys\", [])]\n</code></pre>\n<h3>Step 3: LLM 摘要（概率性）❌</h3>\n<pre><code># 每日限 5 篇，控制 token 开销。\nfor article in new[:5]:\n    summary = await llm.complete(\n        f\"按三点总结，每条不超过20字：\\n标题：{article.title}\\n{article.description}\"\n    )\n</code></pre>\n<h3>Step 4: Checker 验证（概率性）❌</h3>\n<p>独立 Agent 对摘要做五维评分，≥ 40/50 PASS。</p>\n<h3>Step 5: 更新状态（确定性）✅</h3>\n<pre><code>state[\"progress\"][\"articles_summarized\"] += len(passed)\nstate[\"idempotency_keys\"].extend([a.id for a in processed])\natomic_write(\"STATE.md\", state)  # 原子写入 + 文件锁\n</code></pre>\n<h2>错误处理</h2>\n<pre><code># 按 error-compact-pattern 压缩错误\ntry:\n    feed = feedparser.parse(url)\nexcept Exception as e:\n    compact = f\"[STEP_FAILED] fetch_rss@{now}\\n  Error: {type(e).__name__} - {str(e)[:80]}\\n  Recoverable: YES (retry with backoff)\"\n    context.append(compact)\n</code></pre>\n<h2>输出格式</h2>\n<pre><code># 新闻摘要 {YYYY-MM-DD}\n\n## \uD83D\uDCF0 {article.title}\n- {point 1}\n- {point 2}\n- {point 3}\n</code></pre>\n","files":[{"path":"SKILL.md","sizeBytes":2338,"isText":true},{"path":"STATE.md","sizeBytes":687,"isText":true},{"path":"test_example.py","sizeBytes":2176,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-10-22T21:03:05.506276Z","sha256":"449AC9A4EFAD414C61DF14CBB9334F5A766F2C0D25BE6F7DC2B47943845D586A","sizeBytes":3145},"review":null,"source":{"repositoryUrl":"https://github.com/Komagon/hermes-production-patterns","path":"examples/daily-news-digest","license":"MIT","commit":"caaf447ef9ccab17ae2e1ef77386d1095bbbc70e","subtreeSha":"2A18365C82FE190DA9F80E4FC707AE2701A38A8E2B96016F5DF77CAAF9AE28DA","lastSyncedAt":"2026-11-12T21:44:02.793037Z"},"reviewedAt":"2026-10-22T21:04:02.331864Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/Komagon/hermes-production-patterns/tree/main/examples/daily-news-digest"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install komagon-hermes-production-patterns@llmmart"},{"target":"git","command":"git clone https://github.com/Komagon/hermes-production-patterns.git"}]}