- Home
- Skills
- Agents & Orchestration
- Session Importer
Session Importer
by rADICor RNA
- Legacy — ~/.cline/data/tasks/ / — the pre-sidebar flat task store (ui_messages.json, api_conversation_history.json).
Free
Session Importer
Example session with this skill installed
I just switched from the VS Code extension to the Cline desktop app and my old tasks are missing. Can you scan my system and import them into the desktop sidebar?
- Read your context and instructions
- Compiled the session importer
I have scanned your system for stranded Cline sessions. I found 12 sessions in your VS Code global storage and 5 legacy tasks that are not currently indexed in your desktop app. ## Session Import Audit | Source | Path | Sessions Found | Status | | :--- | :--- | :--- | :--- | | **Editor (VS Code)** | `~/Library/Application Support/Code/User/globalStorage/...` | 12 | Importable | | **Legacy Tasks** | `~/.cline/data/tasks/` | 5 | Importable | | **Native Desktop** | `~/.cline/data/sessions/` | 24 | Already Indexed | ### Proposed Changes - **Backups:** A snapshot of `sessions.db` and `session-search.db` will be created in `~/.cline/backups/import-202405201030/`. - **Normalization:** 17 sessions will be converted to `SessionRecord` format, filtering out API transport logs. - **Indexing:** 17 metadata entries and approximately 142 messages will be added to the FTS5 search index. **Next steps** 1. Run `python -m session_importer import --dry-run` to see the specific session IDs that will be moved. 2. Run `python -m session_importer import` to finalize the migration. 3. Restart the Cline desktop app to refresh the sidebar.
Connects securely to your tools. The creator never sees your data.
About this skill
# session-importer Recover Cline conversations stranded outside the desktop sidebar and import them so they can be searched and resumed. ## The problem Cline stores sessions in more than one place on macOS, and only one of them reaches the desktop sidebar: - Native — ~/.cline/data/sessions/<id>/ — already indexed, visible in the sidebar. - Legacy — ~/.cline/data/tasks/<id>/ — the pre-sidebar flat task store (ui_messages.json, api_conversation_history.json). Never reaches the sidebar. - Editor — ~/Library/Application Support/{Code, VSCodium, Cursor, Windsurf}/User/globalStorage/saoudrizwan.claude-dev/tasks/<id>/ — sessions from the Cline extension inside VS Code and its forks. Never reaches the sidebar. If you used Cline in an editor and later moved to the desktop app, or switched editors, your old conversations are still on disk — but invisible. This skill finds them, normalizes them into one format, and imports them into the desktop store so the sidebar can search and resume them. ## When to use it - You switched from the Cline editor extension to the Cline desktop app and your old sessions are gone from the sidebar. - You switched editors (VS Code to Cursor, Cursor to Windsurf, etc.) and want the sessions from the old editor back. - You want a read-only report of what is indexed versus what is importable, before changing anything. - You are setting up a new machine and want to carry your Cline history with you. - You want to share sessions from one client to another — for example, move a conversation you had in VS Code's Cline extension into Cursor, or the other way round. Because every session is first normalized into one common format, the same record can be written into any client's store. ## How to use it Requires macOS, Python 3.12, and Cline installed. No dependencies beyond the Python standard library. Read-only report: python -m session_importer scan (add -v to list every importable session) Show what an import would do, without writing anything: python -m session_importer import --dry-run Convert and register the pending sessions: python -m session_importer import What the import does, per session: 1. Writes <id>.json (metadata) and <id>.messages.json (messages) into ~/.cline/data/sessions/<id>/. 2. Inserts a row into sessions.db. 3. Populates the FTS5 search index in session-search.db (one metadata document plus one document per message), so the session is searchable in the sidebar. Safety guarantees: - Scan is read-only. It opens the databases read-only and never writes. - Dry-run writes nothing. import --dry-run reports exactly what would happen. - Backups first. Before any write, both databases are copied to ~/.cline/backups/import-<timestamp>/. - Atomic writes. JSON files are written via a temp file plus rename, so a crash never leaves a torn file. - Idempotent. Re-running the import skips sessions that are already indexed and directories that already exist. Safe to run twice. ## What it normalizes Every source format is converted into one SessionRecord: session id, source, provider, model, working directory, start time, prompt, title (first meaningful line of the prompt), messages, and usage totals (input, output, cache read, cache write tokens). Transport chatter in the UI stream (api_req_started, api_req_finished, completion_result, etc.) is filtered out — only real conversational text is kept. The original path and format are recorded in the metadata, so an imported session always says where it came from. ## Adapting this skill to your preferred client This skill ships with the Cline-on-macOS importer working out of the box. If your client is not Cline on macOS, ask your agent to adapt this skill to your preferred client. The adaptation keeps the same shape and the same safety guarantees — only the storage locations and formats change. To adapt it, your agent should: 1. Find where the client stores sessions. Look for its session/history directories and any index database. Start with the client's application-support folder and its extension storage. 2. Map the client's format onto SessionRecord. Write a loader in scanner.py that reads the client's session files and returns a SessionRecord with the same fields: session id, model, working directory, start time, prompt, title, and messages. Reuse text_of, truncate_title, and strip_mode_wrapper from model.py for the text handling. 3. Point paths.py at the new locations. Replace the Cline store roots with the client's. Keep the environment-variable overrides (CLINE_IMPORTER_HOME, CLINE_IMPORTER_EDITOR_ROOTS) so the adapted version stays testable. 4. Keep the importer unchanged. importer.py writes the normalized record into the desktop store — it does not care which client the record came from. The safety guarantees (read-only scan, dry-run, backups, atomic writes, idempotence) must survive the adaptation unchanged. 5. Verify with scan first. Run the read-only scan against the new client and confirm the importable count looks right before running import --dry-run, and the dry-run before the real import. The pattern is: one normalized record, many loaders. A new client is a new loader, not a new tool. The same normalization is what makes sharing work: a session read from one client is already in the common format, so writing it into another client's store is the same write step with a different target — the importer does not care which client the record came from, or which client it is going to.
Requires macOS and Python 3.12. Only supports Cline-style session structures out of the box. Requires manual path configuration for non-standard editor installations.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 5 days ago
- Free with an Agensi account
- Software
Python
Permissions
What's inside
Frequently Asked Questions
New in Agents & Orchestration
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.