How limiajayi/claude-bookmark-extension works
Claude Bookmarks is a Chrome extension for saving prompt-and-response pairs from Claude chats to local storage, then searching and managing them in a popup. On a chat page, the content script watches for messages, adds a button, waits for streaming to finish, extracts the adjacent prompt and response, and saves or removes the pair. The popup loads stored bookmarks, filters them, and offers copy, open-chat, and delete actions. The graph follows documented and excerpted calls; unsampled capabilities are not inferred beyond the README.
Main entry points: main.ts Popup interface · content.ts Content script · extract.ts Pair extraction · storage.ts Bookmark access
Components 15
Chat capture
- Content script
entrypoints/content.ts - Bookmark button
entrypoints/content.ts - Stream completion
utils/settle.ts
Pair processing
- Pair extraction
utils/extract.ts - Claude selectors
utils/selectors.ts - Text cleanup
utils/text.ts - Pair hashing
utils/hash.ts
Bookmark storage
- Bookmark access
utils/storage.ts - Local extension storage
Popup management
- Popup interface
entrypoints/popup/main.ts - Bookmark search
utils/search.ts
Other components
- User
- Claude chat page
- System clipboard
- Web browser
Connections 20
- Claude chat page → Content script: mutates DOM
entrypoints/content.ts - Content script → Claude chat page: injects buttons
entrypoints/content.ts - User → Bookmark button: clicks
entrypoints/content.ts - Content script → Stream completion: waits for completion
entrypoints/content.ts - Bookmark button → Pair extraction: reads pair
entrypoints/content.ts - Content script → Pair extraction: checks messages
entrypoints/content.ts - Content script → Claude selectors: queries messages
entrypoints/content.ts - Pair extraction → Claude selectors: selects message parts
utils/extract.ts - Pair extraction → Text cleanup: reads message text
utils/extract.ts - Text cleanup → Claude selectors: skips page furniture
utils/text.ts - Stream completion → Claude selectors: checks stream state
utils/settle.ts - Bookmark button → Pair hashing: identifies pair
entrypoints/content.ts - Bookmark button → Bookmark access: checks, saves, removes
entrypoints/content.ts - Bookmark access → Local extension storage: reads and writes
utils/storage.ts - User → Popup interface: uses
entrypoints/popup/main.ts - Popup interface → Bookmark access: loads and deletes
entrypoints/popup/main.ts - Bookmark access → Popup interface: returns bookmarks
entrypoints/popup/main.ts - Popup interface → Bookmark search: filters bookmarks
entrypoints/popup/main.ts - Popup interface → System clipboard: copies text
entrypoints/popup/main.ts - Popup interface → Web browser: opens chat link
entrypoints/popup/main.ts