A Chrome extension that uses AI to block short-form video doom scrolling on macOS.
Sentinel runs silently in the background. When you open YouTube, it intercepts the video title and asks Claude whether it's worth your time. Mindless content gets blocked. Coding tutorials, lectures, and anything educational gets through. On X.com, it enforces a 5-minute daily scroll limit that gradually slows you down before locking you out entirely.
| Platform | What's blocked | What's allowed |
|---|---|---|
| YouTube | Shorts, non-work videos (AI-judged) | Tutorials, coding, lectures, documentaries |
| TikTok | Everything | — |
| Reels | Photos, profiles | |
| X / Twitter | Video feed tab, doom-scroll mode | Normal browsing (with 5-min limit) |
| Time on X.com | Behaviour |
|---|---|
| 0 – 2 min | Normal |
| 2 – 5 min | Scroll progressively slows. A bar shows time remaining |
| 5 min | Full stop. Lockout overlay with countdown |
| +2 hours | Timer resets |
You open a YouTube video
↓
content.js extracts the title + shows "Evaluating..." overlay
↓
background.js calls http://127.0.0.1:54321/judge?title=...
↓
native/server.js (always running via macOS LaunchAgent)
→ runs: claude --model claude-haiku-4-5-20251001 -p "ALLOW or BLOCK?"
↓
Claude Haiku replies in ~1 second
↓
ALLOW → overlay fades, video plays
BLOCK → Sentinel blocked page
No API key needed. Sentinel uses your existing Claude Code installation and its credentials.
- macOS
- Google Chrome
- Node.js (v18+)
- Claude Code installed and authenticated (
claudein your PATH)
git clone https://github.com/shawkatdidar/sentinel.git
cd sentinel
bash native/install.shThe install script will:
- Install npm dependencies and build the extension
- Generate the extension icons
- Create and load a macOS LaunchAgent so the judge server starts on every login
- Print instructions to load the extension in Chrome
- Open
chrome://extensions - Enable Developer mode (top right toggle)
- Click Load unpacked → select the
dist/folder inside this repo - Done — Sentinel is active
Edit the PROMPT function in native/server.js to change what gets blocked or allowed. The default prompt:
- ALLOW: coding, programming, AI/ML, data science, math, science, DevOps, productivity, finance, business, documentaries, lectures, professional skills
- BLOCK: reality TV, celebrity gossip, pranks, reaction videos, vlogs, sports highlights, music videos, cooking shows, comedy skits
Restart the server after editing:
launchctl unload ~/Library/LaunchAgents/com.sentinel.judge.plist
launchctl load ~/Library/LaunchAgents/com.sentinel.judge.plisttail -f ~/path/to/sentinel/native/sentinel.logsentinel/
├── manifest.json Chrome extension manifest (MV3)
├── src/
│ ├── background.ts Service worker — proxies judge requests
│ ├── content.ts Injected into YouTube/X/Instagram — overlays + scroll limiter
│ └── blocked.ts Blocked page logic
├── public/
│ └── blocked.html The "Sentinel blocked this" page
├── rules/
│ └── rules.json declarativeNetRequest rules (Shorts, TikTok, Reels)
├── native/
│ ├── server.js Local HTTP judge server (calls claude CLI)
│ └── install.sh One-command setup
└── scripts/
└── generate-icons.js Generates extension icons (no native deps)
launchctl unload ~/Library/LaunchAgents/com.sentinel.judge.plist
rm ~/Library/LaunchAgents/com.sentinel.judge.plistThen remove the extension from chrome://extensions.