CommunityWriting & Editinggithub.com

Komagon/hermes-production-patterns

Hermes Production Patterns — A collection of production-grade engineering patterns for the Hermes Agent. Built and tested in real 7×24 environments, it prevents silent cron failures, reduces manual review overhead, and maintains state across runs. As of 2026-08, it's synchronized with the latest Hermes capabilities: Monitor-native monitoring (token burn only on change), delegate Checker, and capability×pattern mapping.

What is hermes-production-patterns?

The 'Hermes Production Patterns' skill provides a comprehensive set of battle-tested, production-ready engineering patterns for developers using the Hermes AI agent. It addresses common pain points like undetected cron failures, reliance on manual quality reviews, and lack of persistent state across agent runs. The skill is built upon four core conventions: state-file-pattern (keeping state across runs via STATE.md), control-flow-separation (using deterministic code for fetching and probabilistic LLM calls for summarization), maker-checker (a separate Agent validates summaries using a five-dimensional scoring system), and error-compact-pattern (compressing errors to prevent context explosion). The included 'Daily News Digest' serves as a fully integrated live demonstration of all four conventions working together in a real 7×24 environment. The skill supports platforms like Hermes Agent and is designed to improve reliability, reduce token waste, and maintain output quality in automated workflows.

Works with~Claude Code~Codex CLI~Cursor
npx skills add Komagon/hermes-production-patterns

Installed? Explore more Writing & Editing skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Daily News Digest

Live demonstration of the complete integration of all four engineering conventions from conventions/:

Workflow

Step 1: Read State (Deterministic) ✅

Read the last run state and idempotency keys from STATE.md.

Step 2: Fetch RSS (Deterministic) ✅

# Zero LLM cost. Only process articles added since the last run.
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 Summary (Probabilistic) ❌

# Limited to 5 articles per day to control token overhead.
for article in new[:5]:
    summary = await llm.complete(
        f"Summarize in three points, each no more than 20 words:\nTitle: {article.title}\n{article.description}"
    )

Step 4: Checker Verification (Probabilistic) ❌

An independent Agent performs five-dimensional scoring of the summaries. Score ≥ 40/50 is PASS.

Step 5: Update State (Deterministic) ✅

state["progress"]["articles_summarized"] += len(passed)
state["idempotency_keys"].extend([a.id for a in processed])
atomic_write("STATE.md", state)  # Atomic write + file lock

Error Handling

# Compress errors according to 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)

Output Format

# News Digest {YYYY-MM-DD}

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

Related Skills