Skip to content
Back to skills

Hn Digest

ASecurity

Fetch top Hacker News stories, pause for human editorial approval, and publish a curated Markdown digest using examples/hn_digest/actions.py.

  • 12 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 3, 2026
ai-agentspythonbashapi

Works with

  • api

Security analysis

A100/100

Scanned October 3, 2026

npx -y skills add google/lightflow --skill hn_digest --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Hn Digest?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Hn Digest
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/google-hn-digest/badge)](https://www.skillsdirectory.com/skills/google-hn-digest)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: hn-digest
description: Fetch top Hacker News stories, pause for human editorial approval, and publish a curated Markdown digest using examples/hn_digest/actions.py.
---

# Hacker News Curated Digest (`hn_digest`)

Executes the 3-stage Hacker News curation workflow using the Python helper
functions in `examples/hn_digest/actions.py`.

## Workflow Stages & Rules

1.  **Stage 1 — Fetch Top Stories (`fetch_top_stories`)**:

    -   Call `actions.fetch_top_stories(payload)` with `{"offline": True,
        "limit": 3}` (or live API if `offline=False`).
    -   Returns `(out_dict, msg)` where `out_dict` contains `{"stories": [...],
        "count": int, "top_title": str, "top_score": int, "source": str}`.
    -   Persist `out_dict` under `payload["outputs"]["fetch_top_stories"]` so
        `fetch_top_stories` is **not** called again in Stage 3.
    -   Example invocation:

        ```bash
        python3 -B -c "import json, sys; sys.path.insert(0, 'examples/hn_digest'); import actions; out, msg = actions.fetch_top_stories({'offline': True, 'limit': 3}); print(json.dumps({'outputs': {'fetch_top_stories': out}, 'message': msg}))"
        ```

2.  **Stage 2 — Human Editorial Gate (`editorial_gate`)**:

    -   **MANDATORY GATE**: Stop after Stage 1 and present `top_title`,
        `top_score`, and `count` to the human editor.
    -   Wait for their explicit approval and optional `editor_note` +
        `output_path` before executing Stage 3. Never auto-approve.

3.  **Stage 3 — Publish Digest (`publish_digest`)**:

    -   **Condition**: Run only if the editor approved Stage 2. Do **not**
        re-run `fetch_top_stories`.
    -   Call `actions.publish_digest(payload)` where `payload` contains:
        -   `"outputs": {"fetch_top_stories": <stage_1_out>, "editorial_gate":
            {"editor_note": "<note>", "output_path": "<path>"}}`
    -   Writes the curated Markdown file atomically to `output_path` and returns
        `({"digest_path": str, "story_count": int, "simulated": bool}, msg)`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.