agentsclimarketplace

Daily news digest

Skill Komagon/hermes-production-patterns/examples/daily-news-digest

Hermes Production Patterns是一套面向 Hermes Agent(https://github.com/NousResearch/hermes-agent) 的生产级工程模式集。 如果你已经装好了 Hermes,但发现: - 不知道怎么写一个「靠谱」的技能(Skill)? - Cron 任务跑着跑着就跑偏了,没人发现? - Agent 输出质量不稳定,全靠肉眼审查? - 多个任务的状态全靠脑子记,一重启就断片? - 错误一出来就把上下文炸了,Agent 直接失焦? 这个项目就是为你准备的。 它不是什么「最佳实践」大合集——每一条模式都在真实的 7×24 运行环境中验证过,踩过坑,打过补丁,最终沉淀为可复用的工程公约。

Install
npx -y skills add Komagon/hermes-production-patterns --skill daily-news-digest

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing 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.

What its author says it does

Copied from the file, not written here

定时抓取 RSS 源,用 LLM 生成中文新闻摘要,遵循 STATE.md 状态管理和 Maker/Checker 验证

SKILL.md

2.2 KB, as published. Nobody here has run it

Daily News Digest

实时演示 conventions/ 中全部四条工程公约的完整集成:

工作流

Step 1: 读取状态(确定性)✅

STATE.md 读取上次运行状态和 idempotency keys。

Step 2: 抓取 RSS(确定性)✅

# 零 LLM 成本。只处理上次运行后新增的文章。
import feedparser

for url in RSS_SOURCES:
    feed = feedparser.parse(url)
    new = [entry for entry in feed.entries
           if entry.id not in state.get("idempotency_keys", [])]

Step 3: LLM 摘要(概率性)❌

# 每日限 5 篇,控制 token 开销。
for article in new[:5]:
    summary = await llm.complete(
        f"按三点总结,每条不超过20字:\n标题:{article.title}\n{article.description}"
    )

Step 4: Checker 验证(概率性)❌

独立 Agent 对摘要做五维评分,≥ 40/50 PASS。

Step 5: 更新状态(确定性)✅

state["progress"]["articles_summarized"] += len(passed)
state["idempotency_keys"].extend([a.id for a in processed])
atomic_write("STATE.md", state)  # 原子写入 + 文件锁

错误处理

# 按 error-compact-pattern 压缩错误
try:
    feed = feedparser.parse(url)
except Exception as e:
    compact = f"[STEP_FAILED] fetch_rss@{now}\n  Error: {type(e).__name__} - {str(e)[:80]}\n  Recoverable: YES (retry with backoff)"
    context.append(compact)

输出格式

# 新闻摘要 {YYYY-MM-DD}

## 📰 {article.title}
- {point 1}
- {point 2}
- {point 3}

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.