Chrome extension for X usage tracking, behavioral modification, and bookmark psychology analysis.
- Sequential post counting with color-coded indicators
- Pixel scroll distance measurement
- Per-minute activity logging
- Hourly usage aggregation
- Nudge: Progressive color gradient from green to red based on threshold proximity
- Count: Uniform grey indicators
- 60-minute rolling line graph
- 24-hour bar chart
- 90-day historical archive
Automatically analyzes your Twitter/X bookmarks using Claude AI to reveal:
Persuasion Techniques - Identifies rhetorical devices used in bookmarked content:
- Social proof ("10,000 people did this")
- Authority appeals ("As an expert...")
- Scarcity/urgency ("Limited time")
- Emotional appeals (fear, aspiration, belonging)
- Storytelling and narrative structure
- Reciprocity patterns
- Contrast and anchoring
Cognitive Biases - Reveals patterns in your bookmarking behavior:
- Confirmation bias (bookmarking content that confirms existing beliefs)
- Authority bias (trusting content based on who said it)
- Bandwagon effect (bookmarking popular content)
- Availability heuristic (bookmarking recent/vivid examples)
- Survivorship bias (only seeing success stories)
Overall Patterns - Meta-analysis of what your bookmarks reveal about your thinking patterns and susceptibilities to persuasion
- Daily reset at midnight UTC
- Persistent storage across sessions
- Configurable threshold value
- Pre-rendered counters
- Automatic batch processing of bookmarks (default: 10 bookmarks)
- Clone repository
- Navigate to chrome://extensions/
- Enable Developer mode
- Click "Load unpacked"
- Select the x-productivity-extension directory
Available upon approval
- Threshold: Adjustable post limit
- Mode: Toggle between Nudge and Count
- History: Access via dedicated tab
- View Psychology: Open side panel for bookmark analyses
- Get a Claude API key from console.anthropic.com
- Open extension options or click ⚙ in side panel
- Enter your API key and click "Validate & Save"
- Configure batch size (5-20 bookmarks)
- Browse X.com normally
- View stats in extension popup
- Monitor your daily usage against your threshold
- Configure your Claude API key (see Configuration above)
- Bookmark tweets on X.com as usual
- Extension automatically captures bookmarks
- After 10 bookmarks (or 2 seconds), analysis runs automatically
- Click "View Psychology" button in popup to see insights
- Review persuasion techniques and cognitive biases in side panel
- Click ⚙ in side panel
- Click "Process Queue Now" to analyze current batch immediately
- JavaScript ES6+
- Chrome Extension Manifest V3
- SVG rendering
- chrome.storage.local API
manifest.json Extension configuration (Manifest V3)
content.js Tracking, DOM injection, and bookmark detection
background.js Service worker for Claude API integration
popup.html Main interface markup
popup.js Stats processing and display
sidepanel.html Psychology analysis interface
sidepanel.js Analysis rendering and updates
sidepanel.css Side panel styling
options.html Settings page
options.js Settings management and API validation
styles.css Content script styling
icon16.png 16x16 icon
icon48.png 48x48 icon
icon128.png 128x128 icon
Content Script (content.js)
- Detects tweet views and bookmark actions
- Extracts tweet metadata (text, author, URL, media)
- Sends bookmark data to service worker
Service Worker (background.js)
- Manages bookmark queue (batch processing)
- Calls Claude API for psychological analysis
- Stores analyses in local storage
- Handles retry logic
Side Panel (sidepanel.html/js/css)
- Displays psychological analyses
- Real-time updates via storage events
- Settings management
Options Page (options.html/js)
- API key validation and storage
- Batch processing configuration
- Data management (clear bookmarks/analyses)
User bookmarks tweet
→ Content script detects bookmark (MutationObserver on aria-label)
→ Extract tweet data (text, author, URL, timestamp)
→ Send to background.js
→ Add to queue
→ When 10 bookmarks OR 2s timeout
→ Call Claude API with batch
→ Parse JSON response (persuasion techniques, biases, patterns)
→ Store analysis in chrome.storage.local
→ Side panel updates automatically
Local Storage: All usage tracking data stored locally in browser via chrome.storage.local
API Key: Stored unencrypted in local storage. Treat like a password. Never share.
Data Transmission: Bookmark content sent ONLY to Anthropic Claude API for analysis. No other external services.
No Tracking: No analytics, no telemetry, no user behavior tracking beyond local usage metrics.
Open Source: All code is visible and auditable.
-
Installation
- Load extension in Chrome
- No console errors on load
- Icons display correctly
-
Basic Tracking
- Navigate to x.com
- Verify post counters appear
- Check popup shows accurate counts
-
Bookmark Detection
- Bookmark a tweet with social proof language
- Check browser console for "[Content] Bookmark detected" log
- Verify bookmark stored (check chrome.storage in DevTools)
-
API Configuration
- Open options page
- Enter API key
- Click "Validate & Save"
- Verify success message
-
Batch Processing
- Bookmark 10 tweets with varied content
- Check console for "[Background] Processing batch" log
- Verify API call succeeds
-
Side Panel Display
- Open side panel via "View Psychology" button
- Verify analyses display
- Check persuasion techniques section
- Check cognitive biases section
- Verify overall patterns section
- Click tweet links to verify they work
-
Real-time Updates
- Keep side panel open
- Bookmark more tweets
- Verify side panel updates automatically
-
Manual Processing
- Bookmark 3-5 tweets
- Open side panel settings
- Click "Process Queue Now"
- Verify processing triggers
-
Performance
- Browse X.com normally
- Check for any slowdown
- Monitor CPU/memory in Task Manager
-
Edge Cases
- Bookmark tweet with no text (image only)
- Bookmark retweet
- Bookmark quote tweet
- Test on both twitter.com and x.com
Content Script:
[Content] Bookmark detected: {id, text, author, url...}
[Content] Bookmark psychology analyzer initialized
Background Worker:
[Background] Twitter Bookmark Psychology Analyzer initialized
[Background] New bookmark captured: {id, text...}
[Background] Queue size: 1/10
[Background] Processing batch of 10 bookmarks
[Background] Calling Claude API...
[Background] Claude API response: {...}
[Background] Analysis stored successfully
Side Panel:
[SidePanel] Storage changed, reloading analyses
Bookmarks not detected:
- Check browser console for errors
- Verify MutationObserver is running
- X.com may have changed their DOM structure - check button selectors
API calls failing:
- Verify API key is correct (starts with
sk-ant-) - Check API key has sufficient credits
- Review Network tab for API response errors
- Check CORS/host permissions in manifest
Side panel not updating:
- Check storage change listeners
- Verify analyses are being stored
- Refresh side panel
No analyses appearing:
- Verify API key is configured
- Check batch actually processed
- Look for parsing errors in console
Claude API pricing (as of Feb 2025):
- Claude 3.5 Sonnet: ~$3 per million input tokens, ~$15 per million output tokens
- Average analysis: ~500 input tokens (10 tweets) + 500 output tokens
- Cost per batch: ~$0.01
- 100 batches (1000 bookmarks): ~$1
Configure batch size in options to control costs.
- Bias tracking dashboard over time
- Persuasion technique frequency charts
- Counter-arguments generator
- Debiasing content suggestions
- Thread detection and analysis
- Multi-modal analysis (images/videos)
- Export psychological profile reports
- Educational mode with bias/technique explanations
MIT
Visual design influenced by visualizevalue.com