Stop doomscrolling. Start learning.
A Chrome extension and Python backend that acts as an LLM-powered firewall for YouTube. It classifies video transcripts in real-time, blocking superficial content and only permitting educational or valuable videos.
Anti-Rot/
├── Browser_Client/ ← Chrome Extension (Manifest V3)
├── Server/ ← FastAPI REST Server + Docker
└── test_client.py ← Local API test script
The system operates as a real-time proxy intercepting YouTube navigation events:
- Client Intercept: The Chrome extension detects a YouTube video URL via background service workers.
- Transcript Retrieval: The URL is forwarded to the FastAPI server, which calls the Supadata API to extract the full video transcript.
- LLM Classification: The transcript and any custom user instructions are passed to an OpenRouter LLM endpoint for binary evaluation (Value vs. Distraction).
- Client Enforcement: The extension reads the API response. If flagged as non-valuable, the DOM is injected with a blocking overlay. Otherwise, navigation proceeds uninterrupted.
The core value proposition relies on strict, fast, and deterministic transcript classification.
The prompt utilizes a zero-shot, binary classification approach. The system prompt forces the LLM to act strictly as a binary router: it must output 1 if the content is educational, informational, skill-building, or productivity-related, and 0 for anything else. The prompt explicitly forbids explanations, punctuation, or preamble to ensure exact integer parsing on the backend.
Users can write custom instructions directly in the browser extension popup. These instructions are appended to the system prompt at classification time, giving the LLM absolute overrides. For example: "Allow rickrolls" or "Block all gaming content even if educational." Custom instructions take priority over the default classification rules.
The pipeline utilizes openai/gpt-oss-120b:free via OpenRouter, with an automatic fallback to mistralai/mistral-nemo. This optimizes for low-latency inference and zero API cost while retaining the necessary parameter depth to accurately classify complex context boundaries from unstructured transcript data.
The system implements a fail-open design pattern to maintain a frictionless user experience:
- No Transcript Available: If Supadata cannot extract a transcript (e.g., no captions or non-English video), the API returns a
422 Unprocessable Entityerror. - Upstream Failures: If the OpenRouter LLM times out or rate-limits the request, the API returns a
500 Internal Server Error. - Client Fallback: The Chrome extension intercepts non-200 HTTP responses and defaults to an
allowedstate. It ensures that network or API degradation never prevents the user from accessing a video.
Visit antirot.in to install the browser extension.
cd Server
pip install -r requirements.txt
# Create .env based on .env.example
cp .env.example .env
# Run the local server
uvicorn server:app --reload --port 8000- Navigate to
chrome://extensions/ - Enable Developer mode
- Click Load unpacked
- Select the
Browser_Client/directory
| Method | Path | Input | Output | Description |
|---|---|---|---|---|
GET |
/health |
— | {"status": "alive"} |
Health check |
POST |
/classify |
JSON: {"url": "...", "instructions": "..."} |
JSON: {"category": 0/1} |
Executes the classification pipeline |
| Version | Milestone |
|---|---|
v0.1 |
Prototype stage and initial prompt engineering |
v0.2 |
Backend deployment to cloud infrastructure |
v0.3 |
Migrated extraction dependency from yt-dlp to Supadata API |
v0.4 |
Completed client extension and stability patches for pre-beta release |
v0.5 |
Custom instructions — users can now write per-session override rules directly in the extension popup |
- Login & user accounts
- Lockdown mode
- Paid plans & API credits
- Feature blocking tools (e.g. unhook-style sidebar removal)
- Backend: Python 3.11, FastAPI, Uvicorn
- AI / LLM: OpenRouter (
gpt-oss-120b,mistral-nemo) - Transcript Extraction: Supadata API
- Browser Extension: Chrome Manifest V3 (Vanilla JS)
- Deployment: Docker, Google Cloud Run
Anti-Rot/
├── Browser_Client/
│ ├── manifest.json # Extension manifest (v3)
│ ├── background.js # Service worker and caching layer
│ ├── content.js # Content script for DOM manipulation
│ ├── content.css # Overlay injection styles
│ ├── popup.html / .js / .css # Extension UI (toggle, whitelist, custom instructions)
│ └── icons/ # Extension icons
├── Server/
│ ├── server.py # FastAPI application and LLM pipeline
│ ├── Dockerfile # Production container definition
│ ├── requirements.txt # Python dependencies
│ ├── .env.example # Environment template
│ └── .env # Local secrets (gitignored)
├── test_client.py # Local API test script
└── README.md