agentsclimarketplace

Ti hnparse

Skill eph5xx/tweakidea/skills/ti-hnparse

Python scripts for fetching a single HN post (hnparse.py) and searching HN posts via Algolia (hnsearch.py)From its SKILL.md

Install
npx -y skills add eph5xx/tweakidea --skill ti-hnparse

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

2 things to look at

  • runs commandsInstructs the agent to run 3 commands, including `uv run <path-to>/hnparse.py <hn-url-or-id> [-o <output-directory>]` and 2 more.
  • fetches URLsInstructs the agent to fetch 1 URL, including https://hn.algolia.com/api/v1/search.

SKILL.md

2.0 KB, 503 tokens by cl100k_base, as published. Nobody here has run it

Contains two standalone Python scripts that talk to the free Algolia Hacker News API:

  • hnparse.py — fetch one HN post (article + full comment tree) and write structured markdown.
  • hnsearch.py — search/list HN posts by query and time range; emits JSON to stdout.

hnparse.py usage

uv run <path-to>/hnparse.py <hn-url-or-id> [-o <output-directory>]
  • Uses uv run inline script metadata for dependencies (playwright, httpx, trafilatura)
  • Fetches post metadata and comment tree from Algolia HN API
  • Extracts linked article via Playwright headless browser (falls back to plain HTTP)
  • Writes content.md to the output directory
  • Default output: ~/.tweakidea/hn/hn-{item_id}/content.md
  • Prints the absolute path of the output file to stdout (last line)
  • All progress messages go to stderr

For better article extraction from JS-heavy sites, run uv run playwright install chromium once. Without it, the script falls back to plain HTTP which works fine for most sites.

hnsearch.py usage

uv run <path-to>/hnsearch.py --query "<freeform>" --days <N> \
  [--tags story|show_hn|ask_hn|front_page|poll] \
  [--min-points N] [--limit N]
  • Single dependency: httpx (no Playwright / trafilatura needed)
  • Queries https://hn.algolia.com/api/v1/search (popularity-sorted)
  • --query required; --days required (0 = no time filter / all-time)
  • --tags defaults to story (excludes comments); allowed: story, show_hn, ask_hn, front_page, poll; multiple tags comma-separated
  • --min-points defaults to 10; --limit defaults to 20 (max 50)
  • Prints a JSON array of hits to stdout. Each hit has: id, title, url, points, num_comments, author, created_at_i, relative_age, hn_url.
  • Progress and errors go to stderr. Exits non-zero on HTTP failure.

What ships with it: 2 files

13.1 KB alongside SKILL.md, 2 of them executable

Keep looking

Skills are one crate of 325,949. 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.