@shaykec/extension
v0.1.5
Published
Socrates Chrome Extension — context-aware learning companion (Manifest V3)
Readme
@shaykec/extension
Chrome extension (Manifest V3) for Socrates -- adds web capture, context-aware learning suggestions, and real-time canvas companion functionality.
Three Roles
1. Canvas Companion
WebSocket connection to the bridge server for real-time bidirectional communication. The extension popup shows connection status, current lesson, and quick actions (Open Canvas, Dashboard, Pause).
2. "Teach Me This" (Web Capture)
- Highlight text on any webpage, right-click, select "Teach me this"
- Sends selected text + URL + context to the bridge server
- Claude Code creates an instant Socratic lesson on the highlighted content
- Also supports "Quiz me on this" for instant quiz generation
3. Context-Aware Suggestions
- Reads page title and meta tags (never full page content -- privacy-first)
- Matches against module trigger keywords locally (no AI calls)
- Shows a subtle notification when a matching module exists
- Dismiss suppresses the topic for 24 hours
Key Files
manifest.json-- Permissions: activeTab, contextMenus, storagesrc/background.js-- WebSocket connection, message routing, context matchingsrc/content.js-- Page metadata extraction, text selection, notification UIsrc/popup/-- Extension popup (status, lesson info, quick actions)
Installation
- Build:
npm run build(no build step needed -- vanilla JS) - Open
chrome://extensions/ - Enable Developer Mode
- Click "Load unpacked" and select the
packages/extension/directory
Dependencies
None -- vanilla JavaScript using Manifest V3 APIs.
See the root README for full documentation.
