Never lose a conversation again. Save, copy, download, and port your AI context across sessions, accounts, and any platform — Claude, ChatGPT, Gemini, or DeepSeek.
Previously known as Claude Context Exporter — now expanded to support all major AI platforms.
██████╗ ██████╗ ███╗ ██╗████████╗███████╗██╗ ██╗████████╗
██╔════╝██╔═══██╗████╗ ██║╚══██╔══╝██╔════╝╚██╗██╔╝╚══██╔══╝
██║ ██║ ██║██╔██╗ ██║ ██║ █████╗ ╚███╔╝ ██║
██║ ██║ ██║██║╚██╗██║ ██║ ██╔══╝ ██╔██╗ ██║
╚██████╗╚██████╔╝██║ ╚████║ ██║ ███████╗██╔╝ ██╗ ██║
╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═╝
███████╗██╗ ██╗███╗ ██╗ ██████╗
██╔════╝╚██╗ ██╔╝████╗ ██║██╔════╝
███████╗ ╚████╔╝ ██╔██╗ ██║██║
╚════██║ ╚██╔╝ ██║╚██╗██║██║
███████║ ██║ ██║ ╚████║╚██████╗
╚══════╝ ╚═╝ ╚═╝ ╚═══╝ ╚═════╝
- The Problem
- The Solution
- Features
- Preview
- Architecture
- Installation
- How to Use
- Setting Up Gemini API for Compression
- One-Click Cross-Platform Injection
- Exporting & Porting Context to Other AIs
- Compression Pipeline
- File Structure
- Roadmap
- Contributing
- License
You've spent 2 hours on a deep technical session with an AI. You've:
- Debugged a gnarly auth flow
- Designed a full database schema together
- Made 12 architectural decisions
- Written 400 lines of code collaboratively
Then — BAM. You hit your usage limit. Or your account gets switched. Or you want to continue on ChatGPT because Claude is down.
Everything is gone. The context, the decisions, the nuance. You have to start from scratch and re-explain everything to a fresh AI that has no idea what you've been building.
This is the problem Context Sync was built to solve.
┌──────────────────────────────────────────────────────────────────────────────┐
│ │
│ Claude / ChatGPT / Gemini / DeepSeek ──▶ 🦞 Context Sync ──▶ Capsule │
│ │
│ Capsule ──▶ One click ──▶ Any AI (auto-injected & auto-submitted) │
│ │
└──────────────────────────────────────────────────────────────────────────────┘
Context Sync is a Chrome extension that:
- Silently watches your conversations on Claude, ChatGPT, Gemini, and DeepSeek using DOM observers
- Automatically saves every message as you chat — no manual action needed
- Injects a native Export button into every supported AI's toolbar — open a panel, pick a target AI, and your context is auto-injected and auto-submitted
- Lets you Copy the conversation to clipboard as plain text in one click
- Lets you Download the conversation as a portable JSON capsule in one click
- Shows all conversations in a unified popup with colour-coded source badges and per-card export/delete controls
No cloud servers. No sign-up. Everything runs locally in your browser.
| Feature | Status |
|---|---|
| Auto-scrape active AI tab on popup open | ✅ Live |
| Conversations from all 4 AIs in one list | ✅ Live |
| Colour-coded source badges (Claude · ChatGPT · Gemini · DeepSeek) | ✅ Live |
| AI name labels on every message bubble | ✅ Live |
| Search across all saved conversations | ✅ Live |
| Per-card download as JSON | ✅ Live |
| Per-card delete with fade animation | ✅ Live |
| Export all conversations as one JSON | ✅ Live |
| Clear all conversations | ✅ Live |
| Conversation count in stats bar | ✅ Live |
| Feature | Status |
|---|---|
| Native Export button injected into Claude toolbar | ✅ Live |
| Native Export button injected into ChatGPT toolbar | ✅ Live |
| Native Export button injected into Gemini toolbar | ✅ Live |
| Native Export button injected into DeepSeek toolbar | ✅ Live |
| Send context to another AI (opens tab + auto-injects + auto-submits) | ✅ Live |
| Copy conversation to clipboard (plain text) | ✅ Live |
| Download conversation as JSON directly from page | ✅ Live |
| Animated panel with smooth open/close | ✅ Live |
| MutationObserver keeps button alive after SPA re-renders | ✅ Live |
| Feature | Status |
|---|---|
| Claude DOM scraper (MutationObserver + debounce) | ✅ Live |
| ChatGPT conversation scraper | ✅ Live |
| Gemini conversation scraper | ✅ Live |
| DeepSeek conversation scraper | ✅ Live |
Unified chrome.storage.local across all AIs |
✅ Live |
| Up to 50 conversations stored locally | ✅ Live |
| SPA navigation detection (no page reload needed) | ✅ Live |
| Code blocks extracted and preserved verbatim | ✅ Live |
| AI-powered compression (Gemini 2.5 Flash, optional) | ✅ Optional |
The popup shows saved conversations from all four AI platforms in one place. Each card displays the conversation title, date, source AI badge (CLAUDE · CHATGPT · GEMINI · DEEPSEEK), a message count toggle, and per-card download/delete buttons.
Clicking the Export button injected into the AI's toolbar opens this panel. Pick a destination AI to auto-inject the context, or use the Copy / Download buttons at the bottom to grab the conversation instantly.
┌───────────────────────────────────────────────────────────────────────┐
│ Chrome Extension (MV3) │
│ │
│ ┌──────────────────┐ ┌──────────────────┐ ┌────────────────┐ │
│ │ Content Scripts │ │ Background │ │ Popup UI │ │
│ │ │ │ Service Worker │ │ │ │
│ │ content.js │───▶│ (orchestrator) │◀───│ popup.html │ │
│ │ (claude.ai) │ │ │ │ popup.js │ │
│ │ │ │ • Gemini API │ │ popup.css │ │
│ │ injectors/ │ │ • Message router │ │ │ │
│ │ ├ chatgpt.js │ │ • scrapeActiveTab│ └────────────────┘ │
│ │ ├ gemini.js │ └────────┬─────────┘ │
│ │ └ deepseek.js │ │ │
│ └──────────────────┘ ▼ │
│ ┌─────────────────┐ │
│ │ Compression │ │
│ │ Pipeline │ │
│ │ (Gemini 2.5) │ │
│ └────────┬────────┘ │
│ │ │
│ ┌──────────────┴──────────────┐ │
│ ▼ ▼ │
│ chrome.storage.local (IndexedDB │
│ (unified index, 50 convos) coming soon) │
└───────────────────────────────────────────────────────────────────────┘
content.js — Runs on every claude.ai page. Sets up a MutationObserver that watches the DOM for changes. When a new message appears, it triggers a debounced save (1.5 s delay to avoid saving mid-stream). Scrapes both user messages ([data-testid="user-message"]) and assistant responses (.font-claude-response), preserving code blocks. Injects the Export button with a panel offering send-to-AI, Copy, and Download.
injectors/chatgpt.js — Runs on chatgpt.com. Scrapes via [data-message-author-role]. Injects the Export button into ChatGPT's composer toolbar. On injection, fills the ProseMirror editor via execCommand + insertText and auto-clicks Send. Also exposes Copy and Download.
injectors/gemini.js — Runs on gemini.google.com. Scrapes from Angular's user-query-content and model-response elements. Injects the Export button near the toolbox drawer. Injects into the Quill editor by setting innerHTML and firing the full Angular event chain, then auto-submits. Triple-fires context check (0 ms / 1.5 s / 3 s) to survive Angular hydration delays. Exposes Copy and Download.
injectors/deepseek.js — Runs on chat.deepseek.com. Scrapes and saves DeepSeek conversations. Injects the Export button styled to match DeepSeek's native design. Handles context injection into the textarea and auto-submit. Exposes Copy and Download.
background.js — The service worker. Holds the Gemini API key securely (never in content scripts). Handles compression requests. Listens for scrapeActiveTab from the popup and routes scrapeNow to the correct content script.
popup.js / popup.html / popup.css — The extension popup. On open, auto-scrapes the active AI tab. Renders all saved conversations from all four platforms in one unified list, with colour-coded source badges, search, expand/collapse, per-card JSON export, and delete.
Since this extension is not yet on the Chrome Web Store, install it in Developer Mode:
git clone https://github.com/Vineetpandey0/context-sync.git
cd context-syncGo to chrome://extensions in your browser.
Toggle Developer Mode on (top right corner).
Click "Load unpacked" and select the folder containing manifest.json.
You should see the 🦞 lobster icon appear in your Chrome toolbar. If it's hidden, click the puzzle piece icon and pin it.
The extension works out of the box without any configuration. It saves your raw conversations without AI compression.
Navigate to claude.ai, chatgpt.com, gemini.google.com, or chat.deepseek.com. The extension activates automatically.
Just use the AI as you normally would. The extension silently captures every message in the background.
Click the 🦞 icon in your toolbar. The popup auto-scrapes the active tab and immediately shows all saved conversations, sorted by most recent, with colour-coded source badges.
Each card shows:
- Title — inferred from your first message
- Source badge — CLAUDE / CHATGPT / GEMINI / DEEPSEEK
- Date & time saved
- Message count (tap to expand and read messages, with AI name on each bubble)
- Download — saves the conversation as a JSON capsule
- Delete — removes the conversation with a smooth fade
Use the search bar to find any conversation by title or message content — across all platforms.
Click "Export all" in the footer to download every saved conversation as a single JSON file.
Compression is optional. The extension saves full conversations without it.
Gemini 2.5 Flash is fast and has a generous free tier. The compression runs in the background service worker — your API key never touches a content script or any AI page.
- Go to Google AI Studio
- Sign in with your Google account
- Click "Create API Key" and copy it
// Before:
const GEMINI_API_KEY = "";
// After:
const GEMINI_API_KEY = "AIzaSy...yourkey...";Go to chrome://extensions → find Context Sync → click the refresh (↺) icon.
- Code blocks are extracted first and never compressed — preserved 100%
- User messages are compressed to preserve intent
- Assistant messages are compressed technically and losslessly
- Short messages (< 120 chars) are skipped — not worth a round-trip
- Processing is parallel (
Promise.all) for speed
Privacy: With a key active, message text is sent to Google's Gemini API. Leave the key blank to keep everything 100% local.
Every supported AI has a native Export button injected directly into its toolbar by the extension.
- Open any conversation on Claude, ChatGPT, Gemini, or DeepSeek
- Click the Export button in the toolbar
- A panel opens:
┌─────────────────────────────┐
│ SEND CONTEXT TO │
├─────────────────────────────┤
│ ◆ Gemini Open & inject │
│ ● ChatGPT Open & inject │
│ ○ DeepSeek Open & inject │
├─────────────────────────────┤
│ [ 📋 Copy ] [ ⬇ Download ] │
└─────────────────────────────┘
- Click a target AI — a new tab opens, the context is typed into the input, and the Send button is automatically clicked. The AI receives full context and responds immediately.
- Click Copy — the conversation is formatted as plain text and written to your clipboard
- Click Download — the conversation is saved as a
.jsoncapsule to your computer
| Platform | Injection method | Auto-submit |
|---|---|---|
| Claude | chrome.storage.local pending key + execCommand |
✅ Yes |
| ChatGPT | ProseMirror execCommand + insertText |
✅ Yes |
| Gemini | Quill innerHTML + Angular event chain (triple-fire) |
✅ Yes |
| DeepSeek | Native textarea setter + React synthetic events | ✅ Yes |
Each injector uses multiple fallback selectors and a MutationObserver to survive SPA re-renders.
| From ↓ / To → | Claude | ChatGPT | Gemini | DeepSeek |
|---|---|---|---|---|
| Claude | — | ✅ | ✅ | ✅ |
| ChatGPT | ✅ | — | ✅ | ✅ |
| Gemini | ✅ | ✅ | — | ✅ |
| DeepSeek | ✅ | ✅ | ✅ | — |
Every exported conversation follows this schema:
{
"id": "conv_1712345678_a3f2k",
"title": "Building a React auth system with JWT...",
"url": "https://claude.ai/chat/...",
"savedAt": "2026-04-05T10:22:00.000Z",
"source": "claude",
"version": 1,
"messages": [
{
"type": "user",
"content": "How do I implement refresh token rotation?",
"format": "text",
"timestamp": "2026-04-05T10:00:00.000Z",
"compressed": false
},
{
"type": "assistant",
"content": "Refresh token rotation works by...\n\n```javascript\nconst rotate = async (token) => { ... }\n```",
"format": "text",
"timestamp": "2026-04-05T10:00:00.000Z",
"compressed": true
}
]
}The source field (claude, chatgpt, gemini, deepseek) drives the badge colour in the popup.
For AIs not supported natively, paste this into a new chat:
Here is the full context of a previous conversation. Please read it carefully
and continue helping me as if you were already familiar with everything discussed.
[paste the JSON here]
Continuing from where we left off: [your next question]
| AI | Context Window | Works with export? |
|---|---|---|
| Claude 3.5 Sonnet | 200k tokens | ✅ Excellent |
| GPT-4o | 128k tokens | ✅ Great |
| Gemini 1.5 Pro | 1M tokens | ✅ Best for large exports |
| DeepSeek V3 | 128k tokens | ✅ Good |
| Mistral Large | 128k tokens | ✅ Good |
| Llama 3 (local) | 8k–128k tokens |
Status: Actively improved. Current pipeline uses Gemini 2.5 Flash. A fully local pipeline is in development.
Raw Conversation
│
▼
1. CODE BLOCK EXTRACTION
- All ``` blocks extracted with placeholders
- Code is NEVER sent to any model — preserved verbatim
│
▼
2. MESSAGE FILTERING
- Keep last 5 user messages
- Keep last 5 assistant messages
- Maintain original interleaved order
│
▼
3. PER-MESSAGE COMPRESSION (Gemini 2.5 Flash, parallel)
- Skip messages < 120 characters
- User messages: preserve intent, remove filler
- Assistant: technical lossless compression
│
▼
4. CODE BLOCK RESTORATION
- Placeholders replaced with original code
- Stored in chrome.storage.local
- TF-IDF sentence scoring for assistant explanations
- Type tagging (
question,code,explanation,decision) - Rolling window manager (10 sessions, tiered compression)
- Local NLP compression — zero API calls, zero data leaving your machine
- Token counter — real-time estimate vs. target AI's context window
Context-Sync/
├── manifest.json ← MV3 config, host permissions for all 4 AIs
├── background.js ← Service worker: Gemini API, routing, scrapeActiveTab
├── content.js ← Claude scraper + Export button + Copy/Download
├── injectors/
│ ├── chatgpt.js ← ChatGPT scraper + Export panel + Copy/Download
│ ├── gemini.js ← Gemini scraper + Export panel + Copy/Download
│ └── deepseek.js ← DeepSeek scraper + Export panel + Copy/Download
├── popup/
│ ├── popup.html ← Popup markup
│ ├── popup.js ← Unified list, source badges, search, export, delete
│ └── popup.css ← Dark grayscale theme, Inter font
├── assets/
│ ├── Preview.png ← Popup screenshot
│ └── InjectedUI.png ← Injected Export panel screenshot
├── icons/
│ ├── icon16.png
│ ├── icon48.png
│ └── icon128.png
└── README.md
| File | Constant | Default | Description |
|---|---|---|---|
content.js |
MAX_CONVERSATIONS |
50 |
Max conversations stored locally |
content.js |
DEBOUNCE_MS |
1500 |
ms to wait before saving after DOM change |
background.js |
GEMINI_API_KEY |
"" |
Your Gemini API key (leave blank to skip compression) |
| Host | Purpose |
|---|---|
https://claude.ai/* |
Scraping + Export button injection |
https://generativelanguage.googleapis.com/* |
Gemini compression API |
https://gemini.google.com/* |
Scraping + Export button injection |
https://chatgpt.com/* |
Scraping + Export button injection |
https://chat.deepseek.com/* |
Scraping + Export button injection |
- Storage size indicator in popup stats bar
- Visual compression ratio stats (e.g. "48k → 6k tokens, 87% reduction")
- Fallback selector config exposed in settings (for when AI sites update their DOM)
- Session fingerprinting to detect and deduplicate identical sessions
- IndexedDB upgrade for 100+ conversation projects
- Tag-based organisation (group conversations by project across AIs)
- Per-conversation compression toggle in the popup
- Local NLP compression — browser-native pipeline, zero API calls, zero data leaving your machine
- Downloads manager — view, rename, re-download exported JSON capsules from inside the popup
- Rolling 10-session context window — automatic tiered compression for older sessions
- Universal "Context Capsule" standard readable by all major LLMs
- Cross-device sync via optional encrypted cloud backup
- Firefox support (MV2/MV3 port)
- Context analytics dashboard
Pull requests are welcome! Here's how to get started:
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Test by loading the unpacked extension in Chrome
- Commit:
git commit -m 'Add: my feature' - Push:
git push origin feature/my-feature - Open a Pull Request
- DOM selector resilience — all four AI sites update their DOM; hardening selectors and adding fallbacks is ongoing
- Compression heuristics — better sentence scoring for explanation messages
- Firefox port — MV3 APIs; a Firefox-compatible port would help many users
- Local NLP — a browser-native compression pipeline with zero external API calls
- New platforms — Perplexity, Mistral, Grok, or any major AI chat interface
MIT License — see LICENSE for details.
Q: Does this send my conversations to any server?
A: Only if you add a Gemini API key for compression. Without it, everything stays 100% local in chrome.storage.local. The cross-platform injection pipeline uses local storage as a relay — no external calls.
Q: The Export button doesn't appear in the toolbar.
A: The injectors retry up to 30 times (every 500 ms) and watch via MutationObserver. Try refreshing the page. If it consistently fails, the host site may have updated its DOM — please open an issue.
Q: Context was injected but the AI didn't auto-submit.
A: Injectors wait up to 4 s for the Send button to become enabled. If it times out, a banner appears asking you to press Send manually.
Q: What happens when an AI site changes its DOM?
A: Each injector has multiple fallback selectors. We'll push fixes as sites update. If you notice a break, open an issue with the platform name.
Q: How much storage does this use?
A: Chrome's chrome.storage.local allows 5 MB by default. 50 conversations from all four AIs combined sit comfortably under 2 MB.
Q: Can I use this with Claude's Projects feature?
A: Yes. The extension detects any conversation URL pattern including project UUIDs.
Q: I want to send context to Mistral / Perplexity — can I?
A: Not natively yet, but use the Copy button in the Export panel and paste into any AI with a simple prompt like "Here's context from a previous conversation: [paste]. Continue from here."
Built with 🦞 and frustration by developers who kept hitting AI context limits.
Stop losing context. Start syncing it.

