An inbox-style interface for Hacker News with AI-powered summaries, inspired by Superhuman.
✅ Two-Panel Layout
- Left sidebar with filters and story list
- Main panel with story details and comments
✅ Smart Filters
- Minimum points threshold (0-500)
- Minimum comment count (0-200)
- Time range (24h, 3d, 7d, all time)
- Real-time story count
✅ Keyboard Shortcuts (Superhuman-style)
j/k- Navigate up/down through storiesEnter- Open selected storyo- Open article in new tabe- Mark as readr- Refresh story list?- Show keyboard shortcuts
✅ Comment Tree
- Nested comment structure (preserves HN threading)
- Collapsible threads (click [-] to collapse)
- Shows author, time, and text
- Proper indentation for nested replies
✅ Read/Unread Tracking
- Visual indicator for read stories
- Persists across sessions
✅ AI Summaries (using Claude API)
- Article content summary (2-3 sentences via Jina AI Reader)
- Discussion summary (2-3 sentences)
- 3-5 "interesting comments" with explanations
- Clickable links to jump to comments in tree
- Comment highlighting when clicked from summary
- Smart caching to avoid regenerating summaries
- Loading states while generating
🔜 Enhanced Features
- Article content caching
- Offline support for read stories
- Export summaries
- Search within discussions
Create three PNG icons in the icons/ directory:
icon16.png- 16x16 pixelsicon48.png- 48x48 pixelsicon128.png- 128x128 pixels
You can use a simple orange bookmark or inbox icon to match the HN theme.
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode" (top right toggle)
- Click "Load unpacked"
- Select the
hn_browserdirectory - The extension should now be installed!
- Get your API key from Anthropic Console
- Click the HN Inbox extension icon in Chrome toolbar
- Paste your Claude API key (starts with
sk-ant-) - Click "Save Settings"
Note: AI summaries will only work after you add your API key. See AI_SUMMARY_SETUP.md for detailed setup instructions and cost information.
- Navigate to news.ycombinator.com
- The page will be replaced with the HN Inbox interface
- Use the filters in the left sidebar to narrow down stories
- Use keyboard shortcuts to navigate:
- Press
?to see all shortcuts - Use
j/kto navigate stories - Press
Enterto view a story - Press
oto open the article
- Press
hn_browser/
├── manifest.json # Extension manifest (Manifest V3)
├── background.js # Service worker for API calls
├── content.js # Main content script (replaces HN UI)
├── styles.css # UI styles
├── popup.html # Settings popup UI
├── popup.js # Settings popup logic
├── icons/ # Extension icons
│ ├── icon16.png
│ ├── icon48.png
│ └── icon128.png
└── README.md # This file
content.js
- Replaces the HN page with custom UI
- Manages state (stories, filters, selection)
- Handles keyboard shortcuts
- Renders story list and comment tree
- Tracks read/unread status
background.js
- Service worker for API calls
- Fetches stories and comments from HN API
- Will handle Claude API calls for summaries
- Will fetch article content via Jina AI Reader
Storage
readStories- Array of read story IDssummaryCache- Cached AI summariesapiKey- Claude API key
- Top stories:
https://hacker-news.firebaseio.com/v0/topstories.json - Story details:
https://hacker-news.firebaseio.com/v0/item/{id}.json - Comment details:
https://hacker-news.firebaseio.com/v0/item/{id}.json
Comments are rendered recursively:
- Fetch comment by ID from HN API
- Create comment element with proper indentation (depth × 20px)
- Add collapse/expand functionality
- Recursively render child comments (replies)
- Attach to parent's reply container
- Implement Claude API integration in background.js
- Fetch article content using Jina AI Reader API
- Generate summaries for:
- Article content
- HN discussion
- Interesting comments
- Cache summaries to avoid regeneration
- Add loading states
- Comment highlighting and scrolling
- Better error handling
- Retry logic for failed requests
- Progress indicators for long operations
- Accessibility improvements
- Search within stories
- Custom filters (by domain, author)
- Save stories for later
- Export summaries
- Dark mode
- Make changes to the code
- Go to
chrome://extensions/ - Click the refresh icon on the HN Inbox extension
- Navigate to news.ycombinator.com to test
- Open Chrome DevTools (F12) on news.ycombinator.com to debug content.js
- Go to
chrome://extensions/and click "service worker" to debug background.js - Check console for errors and logs
- Claude API: Get from Anthropic Console
- Used for generating AI summaries
- Stored securely in Chrome storage
- Never exposed in page context
- API key is stored in Chrome's local storage (sandboxed per extension)
- API calls are made from background service worker (not page context)
- Content Security Policy enforced by Manifest V3
- No data sent to third parties except Claude API and Jina Reader
MIT License - feel free to modify and distribute!
Contributions welcome! Some ideas:
- Add more keyboard shortcuts
- Improve filter options
- Better comment rendering
- Mobile-responsive design
- Dark mode
- Different AI providers
Built with ❤️ for the HN community