A Chrome extension that tests your attention and retention while scrolling Twitter/X.
Built entirely with AI agents. 100% vibe coded.
XQuiz monitors the tweets you scroll past on Twitter/X and periodically generates quiz questions to test how much you're actually absorbing. It uses Google's Gemini AI to create questions based on the content you've read.
- Automatic tweet collection - Tracks tweets as you scroll through your feed
- AI-generated quizzes - Creates multiple choice, true/false, and fill-in-the-blank questions
- Progress tracking - Monitors your score, accuracy percentage, and answer streaks
- Shareable scorecards - Generate and share your retention stats
- Configurable - Adjust how many tweets trigger a quiz
- Video-free mode - Optional toggle to hide videos from your feed when you want fewer distractions
- Quiz history - Review your most recent quiz questions and clear them whenever you like
- Custom attention timer - Pick how long a tweet must stay visible before it counts as “read”
- Track specific pages - Decide whether quizzes should monitor only the home feed or additional sections like user profiles
- Your Gemini API key is stored only in Chrome's local storage (never synced to the cloud) and is only accessible from trusted extension surfaces.
- Background message handlers validate the sender, preventing other extensions from querying your settings or stats.
- Clone this repository
- Open Chrome and navigate to
chrome://extensions - Enable "Developer mode" (toggle in top right)
- Click "Load unpacked" and select the project folder
- Click the XQuiz icon to open the side panel
- Click the settings gear icon
- Enter your Gemini API key
- Adjust tweets-per-quiz if desired (default: 5)
- Navigate to twitter.com or x.com
- Open the XQuiz side panel by clicking the extension icon
- Scroll through your feed as normal
- When enough tweets are collected, a quiz will appear
- Answer questions and track your retention!
xquiz/
├── manifest.json # Extension configuration
├── src/
│ ├── background/
│ │ └── service-worker.js # Quiz generation, stats, API calls
│ ├── content/
│ │ └── content.js # Tweet collection from page
│ ├── sidepanel/
│ │ ├── index.html # Side panel UI
│ │ ├── styles.css # Styling
│ │ └── sidepanel.js # Panel logic and interactions
│ └── shared/
│ └── constants.js # Shared constants
└── icons/ # Extension icons
- Chrome browser (Manifest V3)
- Gemini API key

