A Chrome extension that blocks distracting websites but allows access when AI determines the page is genuinely relevant to your allowed topics. Disabling the extension requires completing a deliberate challenge to prevent impulsive bypasses.
- Block
youtube.com, but still allow system design talks, database lectures, and debugging tutorials. - Block
reddit.com, but allow posts that are clearly about your current study topics, such as networking or interview prep. - Block social and entertainment domains during work hours, while still letting through documentation, technical writeups, and course pages that match your allowed topics.
- Hard-block specific URLs like infinite feeds or known distraction routes, even if the rest of the site is reviewed by AI.
- You configure a blocklist of domains (e.g.
youtube.com,reddit.com). - When you navigate to a blocked domain, the extension captures a live DOM snapshot from the actual tab and sends it to Claude for topic relevance analysis.
- If the page's primary purpose matches one of your allowed topics (e.g. "coding tutorials"), access is granted. Otherwise you're redirected to a block page.
- Full URLs in the blocklist (e.g.
https://reddit.com/r/all) are hard-blocked immediately without an AI check.
- AI topic filtering — Claude reads page title, headings, and body text to decide relevance, not just the URL.
- Exact URL blocking — add a full URL to the blocklist to block it unconditionally, bypassing the AI check.
- Strict mode — disable AI checks entirely; all blocklisted domains are always blocked.
- SPA navigation — detects pushState and Navigation API navigation on sites like YouTube and Reddit and re-checks each new page.
- Title-first readiness — waits for a stable non-empty tab title plus meaningful content before sending a snapshot.
- Stale-content protection — SPA reviews compare the current page against a baseline snapshot so a previous page is not accidentally re-classified.
- LLM result cache — results are cached for 30 days, keyed by normalized URL + title + allowed topics.
- Prompt injection protection — page content is wrapped in
<page_content>tags and the system prompt instructs the model to ignore any directives found in scraped content. - Challenge gate — accessing settings requires typing a randomly generated phrase and waiting a configurable number of seconds (0–120), preventing impulsive disabling.
- Node.js 18+
- A Claude API key
npm install
npm run buildThe extension is output to dist/.
- Open
chrome://extensions - Enable Developer mode
- Click Load unpacked and select the
dist/folder
- Click the extension icon → open Settings
- Complete the challenge gate
- Add your Claude API key
- Edit your blocklist and allowed topics
Each line in the blocklist is either a domain or a full URL:
| Entry | Behaviour |
|---|---|
youtube.com |
Blocks all pages on youtube.com (and subdomains if enabled), runs AI check |
https://reddit.com/r/all |
Blocks that exact path immediately, no AI check |
npm run dev # watch mode — rebuilds on file changes
npm test # run unit tests
npm run check:docsKey source files:
| File | Purpose |
|---|---|
src/background/service-worker.js |
Tab event listeners, blocking logic, LLM orchestration |
src/content/content-script.js |
Runs at document_start; fast domain check, page snapshot, SPA navigation detection |
src/shared/llm.js |
Claude API call, prompt construction, result caching |
src/shared/review-utils.js |
Review IDs, snapshot summaries, baseline comparison, timeout-rescue helpers |
src/shared/domain-utils.js |
Blocklist matching (domain and exact URL) |
src/shared/constants.js |
All tunable values — timing, limits, defaults |
src/blocked/ |
Block page UI (React) |
src/options/ |
Settings page with challenge gate (React) |
src/popup/ |
Toolbar popup — daily stats and enable toggle (React) |
See CLAUDE.md, DESIGN.md, and docs/ for current development and runtime details.