Lobsters reactions

From ahastudio/til · View interactive version

Lobsters reactions is an AI agent skill from the GitHub repository ahastudio/til. Find the Lobste.rs discussion for the article in the current TIL document and weave the key comments into the document body with precise footnote links. Use when the user wants to reflect community reactions from Lobste.rs into an existing TIL file.

How to use this skill

Skill file

Find the Lobste.rs discussion for a TIL document's source article and enrich

the document with key community reactions, each linked to the exact comment.

**This skill must actually run to completion every time it is invoked — NO

EXCEPTIONS.** Skipping the search, or assuming "this probably isn't a

Lobste.rs kind of article" without actually searching, is a defect. Every

invocation must end in one of three concrete states:

fetched and screened (comments woven in, or confirmed none worth

weaving), with the Lobste.rs 토론: line added.

ran against endpoints that returned real data — report this explicitly

("Lobste.rs 스레드 없음 확인") rather than silently omitting any mention

of Lobste.rs.

report that, and say which endpoints were tried. This is NOT the same as

"no thread exists" and must never be written up as such.

A zero-result response is not a result. Lobste.rs serves an anti-bot

challenge with HTTP 200 on several endpoints (see step 2), and a scraper

reads that as "no matches". Before concluding absence, confirm that the

endpoint you used actually returned data.

Never substitute a check of HN or GeekNews for actually searching

Lobste.rs — each platform is searched independently, because a thread

existing (or not) on one platform says nothing about whether one exists on

another.

Contents

Section titles match the headings below; search for a title to jump to it.

Usage

/lobsters-reactions
/lobsters-reactions thinking/some-article.md

currently open in the IDE, or ask the user)

Procedure

1. Identify the source URL

Read the target TIL file. Extract the source URL from the 원문: line.

2. Find the Lobste.rs discussion

If the document already has a Lobste.rs 토론: line, extract the story ID

from that URL directly and skip to step 3.

The `/search` endpoint is bot-blocked — never conclude from it (ABSOLUTE PRIORITY)

**https://lobste.rs/search and https://lobste.rs/search.json return an

anti-bot challenge page with HTTP 200, not search results.** The body starts

with <title>Making sure you're not a bot!</title>. A link-extraction script

run against that page finds zero stories and looks exactly like a genuine

"no results" — which is how a real 170-point thread with 64 comments was once

reported as "no Lobste.rs thread".

An empty result from /search is evidence that the search did not run. It is

never evidence that the thread does not exist. Do not use /search as the

basis for any conclusion.

Known endpoint status (verified):

| Endpoint | Status |

| -------------------------------------------- | ------- |

| /search, /search.json | blocked |

| /domains/<domain>[.json] | blocked |

| /newest/page/<N>.json | blocked |

| /newest.json, /hottest.json | works |

| ?page=N on /newest.json, /hottest.json | ignored |

| /page/<N>.json | works |

| /t/<single-tag>.json | works |

| /s/<short_id>.json | works |

| /rss | works |

Comma-joined tags (/t/ai,ml.json) are blocked; use one tag per request.

?page=N is silently ignored. /hottest.json?page=3 and

/newest.json?page=3 return page 1 again, with HTTP 200 and valid JSON. A

loop over page=1..5 therefore looks like it scanned five pages while it

scanned one, five times. To go deeper, use the path form /page/<N>.json

(the hottest ranking, 25 stories per page), and de-duplicate by short_id

so you can report how many distinct stories the scan actually covered.

The depth varies with traffic, so report the distinct count and the oldest

date the scan reached rather than assuming a fixed reach.

The table above describes scripted access (curl, WebFetch). Inside a

real browser session the picture differs, and that difference is usable:

| Path in Claude in Chrome | Behavior (verified) |

| ------------------------ | ------------------------------------------------ |

| /domain/<host> | 404 if that host was never posted, 200 if it was |

| /search?q=<keywords> | renders real results (N results for ...) |

| /search?q=<full URL> | login wall, not a result set |

/domain/<host> is the cleanest check that exists for a homepage- or

project-type subject, because it does not depend on how the search tokenizes

your query: the host either has a story or it does not. Fetch it from a page

already on lobste.rs (a cross-origin fetch from another site is blocked

by CORS), and read the status code.

The login wall on URL-form search is a "could not search", not an

absence. Re-run the query as title keywords instead.

Strategy A — web search restricted to the domain (primary)

Use the WebSearch tool with allowed_domains: ["lobste.rs"] and the

article title plus a distinctive term (author, product, or domain). This

returns story URLs in /s/<short_id>/<slug> form, which gives you both the

id and the slug needed for footnote anchors.

WebSearch(query: "<article title> <author or domain>",
          allowed_domains: ["lobste.rs"])

Take the /s/<short_id>/<slug> hit and go to step 2a to verify it.

Strategy B — scan the JSON listings (fallback for recent stories)

If Strategy A returns nothing usable and the article is recent, scan the

listing APIs for a story whose url matches the source URL:

UA="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"
NEEDLE='<source-domain-or-path>'
python3 - "$UA" "$NEEDLE" <<'EOF'
import json, subprocess, sys
ua, needle = sys.argv[1], sys.argv[2]
# ?page=N is ignored by the server; use the /page/<N>.json path form.
eps = ["newest.json"] + [f"page/{n}.json" for n in range(1, 16)]
seen = {}
for ep in eps:
    body = subprocess.run(["curl", "-s", "-A", ua, f"https://lobste.rs/{ep}"],
                          capture_output=True, text=True).stdout
    try:
        stories = json.loads(body)
    except ValueError:
        print("BLOCKED", ep, body[:60])   # a challenge page, not a result
        continue
    for s in stories:
        seen[s["short_id"]] = s
print("distinct stories scanned:", len(seen),
      "oldest:", min(s["created_at"] for s in seen.values()))
for s in seen.values():
    if needle in (s.get("url") or ""):
        print("HIT", s["short_id"], s["comments_url"], s["score"], s["comment_count"])
EOF

This only covers stories still in the ranked listing. Report the distinct

count and the oldest date it reached; not finding a story says nothing

about stories older than that date.

Strategy C — tag listing

If the article's topic maps to a Lobste.rs tag, scan /t/<tag>.json the same

way. One tag per request.

2a. Verify the match before using it

Fetch https://lobste.rs/s/<short_id>.json and confirm that the story's

url field equals the source URL from the TIL document. A title that merely

looks similar is not a match — the same title can appear on a different

domain, and the same article can be submitted with a tracking suffix.

The JSON also gives you comments_url, which contains the canonical slug

(e.g. https://lobste.rs/s/1ifr5f/contagion_fear). Use that slug in footnote

URLs rather than guessing it from the title.

2b. Concluding that no thread exists

You may report "Lobste.rs 스레드 없음 확인" only when both hold:

  1. Strategy A ran and returned no /s/... URL whose story url matches the

source.

  1. Strategy B (or C) ran against a working JSON endpoint — one that returned

parseable JSON, not a challenge page.

A /domain/<host> 404 read inside Claude in Chrome satisfies both conditions

on its own for a subject whose source URL is that host's own page, since it

answers the question directly rather than through a search index.

If every avenue you tried was blocked, that is a different outcome: say the

search could not be performed and why, rather than reporting absence.

Sanity check before any negative conclusion: if you used any HTML

endpoint, run one control query you know should match (e.g. a well-known

story) through the same code path. If the control also returns zero, your

extraction is broken or you are being challenged — fix that before

concluding anything.

3. Fetch comments

Fetch the story JSON from the Lobste.rs API to get comments:

https://lobste.rs/s/<story-id>.json

This returns the story object with a comments array. Each comment has:

(https://lobste.rs/s/<id>/<slug>#c_<short_id>) — use this for footnotes

For top-level comments with substantive replies, also read the first level

of child comments.

4. Select significant comments

Identify comments that add something not already in the TIL document. Criteria:

Skip: pure praise, off-topic jokes, one-liners with no substance, or content

already covered in the document.

Aim for 5–10 comments. Quality over quantity.

5. Add the Lobste.rs link to the document header

If the document does not already have a Lobste.rs 토론: line, add it

after the HN 토론: line if one exists, otherwise immediately after the

원문: line:

Lobste.rs 토론: <https://lobste.rs/s/STORY_ID/STORY_SLUG>

6. Weave reactions into the document body

For each selected comment, integrate it into the most relevant existing

section (## 분석, ## 비평, or ## 인사이트). Rules:

or add a new paragraph within an existing sub-section.

comment URL at the bottom of the file.

already the exact permalink, in the form

https://lobste.rs/s/<story-id>/<story-slug>#c_<comment-short-id>.

Never assemble this URL by hand: Lobste.rs shortens slugs in ways that are

not derivable from the title (for example The contagion of fear becomes

contagion_fear, dropping the and of), so a constructed link will be

wrong even when the id is right.

original form.

/hackernews-reactions run), append -lobsters to the key:

[^handle-lobsters].

Footnote block format (at the very end of the file, after ---):

---

[^handle]: <https://lobste.rs/s/STORY_ID/STORY_SLUG#COMMENT_SHORT_ID>

[^other-handle]: <https://lobste.rs/s/STORY_ID/STORY_SLUG#COMMENT_SHORT_ID>

Separate every footnote definition from the next with one blank line.

If footnotes already exist, append new ones to the existing block.

7. Writing rules

its own sake.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.