Skip to content

ninjaa/linkedin-lens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LinkedIn Lens

AI-powered LinkedIn feed scanner that classifies your connections against custom goals.

LinkedIn Lens is a Chrome extension that auto-scrolls your LinkedIn feed, uses an LLM to extract and classify posts in real-time, and surfaces the people you should actually be talking to — with personalized talking points.

LinkedIn Lens sidebar showing ranked matches with confidence scores and talking points

How It Works

  1. You define "lenses" — free-text goals like "Find investors for my AI startup" or "Find donors for my friend's AI-for-good nonprofit"
  2. LinkedIn Lens scrolls your feed with randomized, human-like timing
  3. Each post's raw HTML is sent to an LLM (via OpenRouter) which extracts author info AND classifies them against your lenses in a single call
  4. Results appear in a live sidebar — ranked by confidence, with talking points for each match

The LLM-as-Parser Trick

Most LinkedIn scrapers break every time LinkedIn changes their CSS classes. LinkedIn Lens takes a different approach: it sends sanitized HTML directly to the LLM and lets the model figure out the structure. No hardcoded selectors. No regex. The LLM understands HTML natively.

LinkedIn DOM → strip noise (SVGs, buttons, styles) → send HTML to LLM → structured data + classification

One API call does both extraction and classification. Resilient by design.

Screenshots

Sidebar with matches Sidebar detail Settings
Feed with sidebar Sidebar zoom Options page

Architecture

┌─────────────────┐     ┌──────────────────┐     ┌─────────────┐
│  Content Script  │────▶│  Service Worker   │────▶│  OpenRouter  │
│  (LinkedIn tab)  │     │  (Background)     │     │  (LLM API)   │
│                  │     │                   │     │              │
│  • Find HTML     │     │  • Queue mgmt     │     │  • Extract   │
│    chunks        │     │  • Rate limiting   │     │  • Classify  │
│  • Auto-scroll   │     │  • Person merge    │     │  • Score     │
│  • Dedup         │     │  • Storage         │     │              │
└────────┬─────────┘     └──────────────────┘     └─────────────┘
         │
         ▼
┌─────────────────┐
│  Shadow DOM      │
│  Sidebar         │
│                  │
│  • Ranked cards  │
│  • Talking points│
│  • Lens filters  │
│  • Export        │
└─────────────────┘
  • Manifest V3 — service workers, not background pages
  • Persistent queue — survives service worker restarts with exponential backoff
  • Person aggregation — merges sightings across sessions by profile URL
  • Shadow DOM sidebar — CSS-isolated from LinkedIn's styles

Default Lenses

The extension ships with three example lenses (fully editable):

Lens Description
Nonprofit Supporters Donors and allies for an AI-for-good nonprofit
Startup Investors Angels and VCs for an AI startup
Design Partners Event organizers and community leads

Installation

  1. Clone this repo
  2. Open chrome://extensions in Chrome
  3. Enable Developer mode (top right toggle)
  4. Click Load unpacked and select the repo folder
  5. Go to the extension's Options page
  6. Enter your OpenRouter API key
  7. Edit your lenses (goals)
  8. Navigate to linkedin.com/feed — the sidebar will appear

Configuration

  • API Key: Your OpenRouter API key (stored locally)
  • Model: Default is google/gemini-3.1-flash-lite-preview — fast and cheap. Any OpenRouter model works.
  • Lenses: Free-text goal descriptions. The LLM interprets them — be as specific as you want.
  • Auto-scroll: 5-15 second randomized delays, 2-minute session cap, stops on manual scroll

Built With

This extension was built in a single live session using:

  • Claude Code — Anthropic's AI coding CLI
  • oh-my-claudecode — Multi-agent orchestration layer
  • Pipeline: Deep Interview → Ralplan (consensus planning) → Autopilot (parallel execution)
  • Zero lines of code typed by hand

Build Stats (from actual session logs)

Metric Value
Agents spawned 12 (7 types)
LLM API calls 154
Total tokens 13.4M (97% cache reads)
Actual output generated 111K tokens
Tool calls 163
Total cost ~$34
Build time ~2 hours
Lines typed by hand 0

Agents used: Planner ×2, Architect ×2, Critic ×2, QA Tester ×3, Explorer ×1, Code Reviewer ×1, Scientist ×1

Cost breakdown: $19 cache reads · $8 output generation · $6 cache writes

Read the full workshop report →

Privacy

  • All data stays in Chrome's local storage
  • Your API key is stored locally, never sent anywhere except OpenRouter
  • No tracking, no analytics, no external servers
  • LinkedIn HTML is stripped of noise before being sent to the LLM

License

MIT

About

AI-powered Chrome extension that scans your LinkedIn feed, classifies connections against custom goals using LLM-based DOM parsing, and surfaces the people you should be talking to.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors