agentleFS
mthlimthli/skills/hackernews/SKILL.md

hackernews

Skill19 starsChanged 3 months agoMITView on GitHub

View Hacker News from inside Claude Code — top stories and other feeds (new/best/Ask/Show/jobs), the comment thread for any story, and keyword search. Use whenever the user wants to read or browse Hacker News, including when they just say "HN", name a feed, or follow up with "read the comments", "show more", or "open #3" while browsing.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every command takes --json if you need structured data instead of Markdown (e.g.

    line 34
  2. Very specific:

    If the user asked a question *about* the stories (e.g.

    line 71
  3. Very specific:

    Ask HN / Show HN text posts have no external URL, so the title links to the HN item and the post body shows at the top of its comments view.

    line 79

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Hacker News

Browse Hacker News in the terminal. A bundled Python script (scripts/hn.py, standard library only — no install) does the fetching and formats results as Markdown; your job is to map what the user asked for to the right command, run it, and present the output.

<SKILL_DIR> below is the directory containing this SKILL.md — substitute its absolute path when running.

Commands

# List a feed (default: top, 10 stories). Feeds: top, new, best, ask, show, job
python3 <SKILL_DIR>/scripts/hn.py list [feed] -n <count>

# Show a story's comment thread (needs the numeric id from a listing)
python3 <SKILL_DIR>/scripts/hn.py comments <id> -n <top-level> -d <max-depth>

# Search stories via Algolia (--sort date for newest-first instead of relevance)
python3 <SKILL_DIR>/scripts/hn.py search "<query>" -n <count> [--sort date]

Every command takes --json if you need structured data instead of Markdown (e.g. the user wants you to filter, rank, or summarize rather than just list).

Mapping requests to commands

The default — bare /hackernews, "what's on HN", "top stories" — is list with the default top feed and 10 stories. Honor an explicit count ("top 25", "show me 30") with -n. Map feed words directly: "new" / "newest" → new, "best" → best, "Ask HN" → ask, "Show HN" → show, "jobs" / "who's hiring" → job.

"Read the comments on #3" / "open that thread" / "what are people saying about the SpaceX one" → comments <id>, using the id shown in the listing you just produced (each line ends with `id <n>`). If the user names a story by topic rather than rank, pick the matching id from the most recent listing.

Superlative-across-the-front-page requests — "which story has the most comments", "the top discussion right now", "the highest-ranked one" — need a wider pull than the 10-story default, or you'll pick the max of the wrong set. The HN front page is ~30 stories, so list <feed> -n 30 first, choose the extremum from those 30, then act (e.g. comments <id>). Keep ordinary browsing at the 10-story default; only widen when the user's request hinges on a "most/highest/biggest" comparison.

"Search HN for Rust async" / "has HN discussed <X>" → search. Use --sort date when they want what's recent ("latest HN posts about …") rather than the most-upvoted all-time.

Presenting results

The script already emits clean, link-rich Markdown. Relay it to the user largely as-is — don't re-fetch each item or rewrite every line; that wastes time and adds nothing. A short framing line is welcome ("Here's the HN front page right now —"), and so is a one-line offer of the natural next step ("Want me to pull the comments on any of these?"). Keep the clickable links and the id markers intact so follow-ups work.

If the user asked a question about the stories (e.g. "anything about AI infra?", "summarize the top discussion") rather than just to see them, go ahead and read/summarize — fetch comments or use --json as needed, then answer.

Notes

  • Stories carry an article link and a discussion link (the HN comment page); keep both — readers often want one or the other.
  • Ask HN / Show HN text posts have no external URL, so the title links to the HN item and the post body shows at the top of its comments view.
  • Comment fetching defaults to a focused view (8 top-level threads, depth 2, 30 nodes total) — enough to read the room without burying the user in a 300-reply megathread. When they want more ("go deeper", "show all comments", "the full thread"), widen with -n (more top-level), -d (deeper nesting), and --limit (raise the node budget, e.g. --limit 150).
  • Hacker News data is public and read-only here; the script never posts, votes, or logs in.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.