Use when reading Hacker News — top stories, new posts, Ask HN, Show HN, or comments. Pre-mapped selectors eliminate screenshot loops on news.ycombinator.com.
Hacker News — AI Navigation Skill
What This Skill Does
Provides AI browser agents with pre-mapped selectors, page structures, and navigation flows for news.ycombinator.com. Eliminates the need to visually scan the page — use these selectors directly.
Site Overview
| Property | Value |
|---|
| Domain | news.ycombinator.com |
| Site Type | Multi-page / MPA |
| Auth Required | No (public access) |
| Mapped | 2026-02-20 |
Site Map
Page Structures
Homepage: Hacker News
Form Inputs
| Element | Selector | Notes |
|---|
| q | [name="q"] | |
Content Links (Sample)
| Link Text | Selector | Notes |
|---|
| Hacker News | a:has-text("Hacker News") | news |
| comments | a:has-text("comments") | newcomments |
| submit | a:has-text("submit") | submit |
| gist.github.com | a:has-text("gist.github.com") | from?site=gist.github.com |
| interpidused | a:has-text("interpidused") | user?id=interpidused |
| 5 hours ago | a:has-text("5 hours ago") | item?id=47082496 |
| 88 comments | a:has-text("88 comments") | item?id=47082496 |
| bbc.com | a:has-text("bbc.com") | from?site=bbc.com |
| tartoran | a:has-text("tartoran") | user?id=tartoran |
| 2 hours ago | a:has-text("2 hours ago") | item?id=47083735 |
| 19 comments | a:has-text("19 comments") | item?id=47083735 |
| together.ai | a:has-text("together.ai") | from?site=together.ai |
| zagwdt | a:has-text("zagwdt") | user?id=zagwdt |
| 6 comments | a:has-text("6 comments") | item?id=47083648 |
| gustedt.wordpress.com | a:has-text("gustedt.wordpress.com") | from?site=gustedt.wordpress.com |
For content-heavy sites, iterate with: page.locator('a').filter({ hasText: /pattern/ })
news: Hacker News
Inputs
| Element | Selector | Notes |
|---|
| q | [name="q"] | |
newest: New Links | Hacker News
Inputs
| Element | Selector | Notes |
|---|
| q | [name="q"] | |
front: 2026-02-19 front | Hacker News
Inputs
| Element | Selector | Notes |
|---|
| q | [name="q"] | |
Navigation Flows
Flow 1: Browse Homepage Content
1. Navigate to https://news.ycombinator.com
wait: networkidle OR domcontentloaded
2. Content loads automatically
wait: page has settled (500ms)
3. Scroll to explore content
action: page.evaluate(() => window.scrollBy(0, 500))
wait: 300ms for lazy content
Authentication
Public access — no authentication required for main content.
Dynamic Content Patterns
| Pattern | Description | How to Handle |
|---|
| Lazy loading | Content loads on scroll | page.evaluate(() => window.scrollBy(0, 500)) then wait 500ms |
| SPA navigation | URL changes without full reload | Wait for networkidle or specific element visibility |
| Infinite scroll | More items load at bottom | Scroll loop until no new items appear |
Timing & Waiting
| Action | Wait For | Typical Delay |
|---|
| Page navigation | waitUntil: 'domcontentloaded' | 1-3s |
| After click | Element visibility change | 300-800ms |
| After form submit | URL change or success message | 1-4s |
| After scroll | New content appearance | 300-600ms |
| Dynamic content | waitForSelector() on target element | 500-2000ms |
Common Gotchas
- Rate limiting — news.ycombinator.com may throttle rapid requests. Add 1-2s delays between page loads.
- Cookie consent — If a consent banner appears, click "Accept all" or equivalent before interacting:
page.locator('[class*="consent"] button, button:has-text("Accept")').first().click()
- Dynamic class names — Avoid selectors based on hashed class names (e.g.
.a3f8b). Use aria-label, data-testid, or text-based selectors instead.
- Viewport-dependent layout — These selectors were mapped at 1280×800. Mobile layout may differ.
- Stale selectors — Sites update their markup. If a selector fails, fall back to text-based:
page.locator('text="Button Label"')
Element Finding Strategy (Fallback Order)
1. data-testid / data-cy → most stable
2. aria-label / role → semantic, stable
3. id attribute → usually stable
4. name attribute (forms) → stable for inputs
5. text content → :has-text("...")
6. CSS class (first class only) → fragile, last resort