The problem
Claude.ai has no native session export. Conversations vanish when context fills up. If you're deep in a debugging session or multi-day project and hit the limit, you lose continuity. Copy-pasting manually is tedious and lossy.
What clodcapture does
A Chrome Extension (Manifest V3) that runs silently in the background, capturing every claude.ai conversation as you work. Zero setup, zero login, all data stays local.
Core pipeline
- Auto-capture on navigation - Content script patches
history.pushState/replaceStateand listens forpopstate. Every time you open or switch a chat, it fires a capture via the service worker. - Cookie-based auth fetch - Reads your existing claude.ai session cookies to call the conversation API. No API key needed for capture.
- IndexedDB storage ("brainjar") - Full raw JSON stored locally. Index metadata (name, message count, timestamps) kept in
chrome.storage.localfor fast listing. - Background sync - 30-minute alarm cycle captures all conversations automatically.
Export modes
| Mode | What it does |
|---|---|
| Copy | Distills to clean {title, messages[]} JSON, copies to clipboard |
| Grab | Downloads raw API response as timestamped JSON |
| Sync All | Batch-exports every captured chat to Downloads/clodcapture/ |
| GitHub Push | Pushes to a configured owner/repo with commit messages. Auto-push on capture optional. |
clawd-continue
The session resumption feature. When you want to continue a captured conversation in a new chat:
- Distills the raw capture into a clean session format (roles + text only)
- If an Anthropic API key is configured: sends to Claude Sonnet with a specialized system prompt that produces an intelligence report (entity extraction, arc mapping, current state, next step) - not a message-by-message recap
- If no API key: generates a fallback prompt with the session JSON embedded
- Injects the result directly into the active claude.ai composer via
ClipboardEventdispatch
Context usage gauge
- With API key: exact token count via
/v1/messages/count_tokensagainst a 200k window - Without API key: character-based estimation (
chars / 3.5) - Rendered as a dashed ring gauge in the popup
Architecture
manifest.json MV3, service_worker, content_scripts on claude.ai
|
+-- background.js 364 lines. IndexedDB ops, auth fetch, capture/sync/export
| pipeline, GitHub push, context counting, alarm scheduler
|
+-- content.js 61 lines. History API patching, auto-capture triggers,
| composer injection for clawd-continue
|
+-- popup.js 429 lines. Full UI render, button handlers, settings panel,
| progress animations, chat list management
|
+-- popup.html 268 lines. Glassmorphism shell, DM Sans typography,
| custom CSS animations, responsive layout
|
+-- spider.js 36 lines. Interactive canvas spider web animation.
| Click to make the spider bounce on its web.
|
+-- intercept.js 1 line. Token data relay from MAIN worldTotal: ~1160 lines. Zero dependencies. No build step. No framework.
Permissions and why
| Permission | Reason |
|---|---|
storage + unlimitedStorage | IndexedDB + chrome.storage for captures |
tabs | Detect active claude.ai tab, read URL for chat ID |
cookies | Cookie-based auth to fetch conversations without requiring API key |
downloads | Export JSON files to Downloads/ |
clipboardWrite/Read | Copy distilled sessions, paste into composer |
scripting | Inject content script for clawd-continue composer loading |
alarms | 30-minute background sync cycle |
Host permissions scoped to claude.ai and api.anthropic.com (token counting) and api.github.com (backup).
Design
- Color:
#D97757terracotta throughout - progress bars, badges, gauge, spider, status dots - UI: Dark glassmorphism shell with
backdrop-blur, subtle gradients, spring animations (cubic-bezier(.34,1.56,.64,1)) - Progress: Custom dashed SVG progress bars that grow segment-by-segment
- Spider: Interactive canvas animation in the popup header - the spider sits on a web and bounces when clicked
- Typography: DM Sans 400/500/700
Status
Published on the Chrome Web Store. Currently pending review.