A Chrome extension that detects Reddit bots and astroturfing using a tiered analysis pipeline — fast heuristics first, then optional deep analysis with a local LLM via Ollama.
Built for HooHacks 2026.
- Automatic scanning on Reddit threads — badges appear next to usernames as comments are analyzed
- Tiered detection
- Tier 0 — Known bots, suspended/banned/deleted accounts
- Tier 1 — Heuristic scoring from account metadata and comment patterns
- Tier 2 — Local LLM analysis for bot behavior and AI-written content detection
- Profile deep analysis — Run a full LLM pass on up to 50 recent comments from any user profile
- Insights dashboard — Subreddit-level integrity stats and signal breakdowns
- Bot comment actions — Show badges, auto-minimize suspicious comments, or disable the extension
-
Clone or download this repository.
-
Install Ollama (required for Tier 2 / deep analysis):
- Download from ollama.com/download
- Pull a model:
ollama pull llama3.2
- Make sure Ollama is running (it starts automatically after install).
-
Load the extension:
- Open
chrome://extensions - Enable Developer mode (top right)
- Click Load unpacked
- Select this project folder (
AstroGuard)
- Open
-
Configure (optional but recommended):
- Click the AstroGuard icon in your toolbar
- Under Local LLM (Ollama), confirm the endpoint (
http://127.0.0.1:11434) and model (llama3.2), then click Test - For higher Reddit rate limits, add a Reddit app Client ID and click Login (see below)
-
Use it — Open any Reddit thread. AstroGuard scans comment authors automatically and shows colored badges next to usernames.
Authenticated requests give you a higher Reddit API rate limit.
- Go to reddit.com/prefs/apps
- Create an app — type: installed app
- Set the redirect URI to the value shown in the AstroGuard popup settings
- Paste the Client ID into the extension and click Login
Reddit page → content script finds usernames
↓
Background worker fetches account + comment data
↓
Tier 1 heuristics (account age, karma, comment patterns)
↓
Score ≥ 40%? → Tier 2 local LLM via Ollama
↓
Badge + optional minimize + insights persistence
Heuristic signals include young accounts, karma imbalances, repetitive posting, and suspicious comment patterns. When the heuristic score crosses the threshold (or you trigger Deep Analysis manually), AstroGuard sends account metadata and recent comments to your local Ollama model, which returns a bot likelihood score and AI-content detection score.
| File | Purpose |
|---|---|
manifest.json |
Extension configuration (Manifest V3) |
background.js |
Reddit API, heuristics, Ollama LLM, caching, insights DB |
content.js / content.css |
Injected UI on Reddit — badges, cards, profile panel |
popup.html / popup.js |
Extension popup — scan results and settings |
insights.html / insights.js |
Full-page analytics dashboard |
logo.png / icon128.png |
Branding (sourced from AstroGuard Logo 1.png) |
- Reddit OAuth tokens and scan data are stored locally in
chrome.storage - Tier 2 analysis sends comment text to your local Ollama instance only — nothing is sent to a cloud API
- No telemetry or external analytics
- Heuristic-only users (score below 40%) won't trigger LLM analysis unless you use Deep Analysis
- Ollama must be running locally for Tier 2 features
- Reddit rate limits apply without OAuth login
- Not published on the Chrome Web Store — load unpacked for now
No build step required. The extension is vanilla JavaScript.
npm install # optional — chrome-types for IDE autocomplete onlyAfter making changes, go to chrome://extensions and click the refresh icon on AstroGuard.
Personal portfolio project. Use and adapt as you like.
