import-claude-session

Imports external Claude Code session jsonl transcripts into the local editor's Agents view.

Updated May 13, 2026
One-click install
npx skills add https://github.com/lovebirdsx/universe-editor --skill import-claude-session-lovebirdsx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: import-claude-session
Source: https://github.com/lovebirdsx/universe-editor/tree/main/.claude/skills/import-claude-session
Command: npx skills add https://github.com/lovebirdsx/universe-editor --skill import-claude-session-lovebirdsx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Claude Code session transcripts (.jsonl) produced on another machine cannot be loaded by the local universe-editor Agents view, because the file location, inline cwd fields, and timestamps must match the local workspace. This Skill converts and installs those external session files so the editor can list and resume them. ## Core Features & Use Cases - Session Conversion: Rewrites inline cwd fields to the target workspace, updates gitBranch, and validates uuid/parentUuid chain integrity. - History Visibility Fix: Bumps the last message timestamp to now so the imported session survives the editor's MAX_ENTRIES=100 eviction and appears at the top of the list. - Use Case: A colleague shares a Claude Code session jsonl from their machine; run the script with the file and your local workspace path, then refresh the Agents view to resume the full conversation. ## Quick Start Import the attached Claude session jsonl into my current workspace so the editor's Agents view can load and resume it.

Frequently Asked Questions about import-claude-session

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I import a Claude Code session jsonl from another machine?

Run the import-session.mjs script with the source jsonl path and the target workspace absolute path. It rewrites inline cwd fields, writes the file to ~/.claude/projects/<slug>/<sessionId>.jsonl, and the editor's Agents view picks it up after a refresh.

Why doesn't my imported Claude session appear in the editor?

The editor history keeps only 100 entries sorted by lastUsedAt, taken from the last message timestamp. If the imported session is older than the oldest existing entry it is evicted immediately, so the script bumps the last message timestamp to now by default.

Does the import script require any npm dependencies?

No, the script uses only Node.js standard library modules (fs, os, path, child_process). It optionally calls the git CLI to detect the target workspace's current branch, but works without it.

What jsonl format does a Claude Code session file require?

Each line is one JSON object; user and assistant message lines must have a string uuid and an intact parentUuid chain with parents appearing before children. Non-message lines like system, attachment, and summary are tolerated and ignored.

Can I overwrite an existing session with the same sessionId?

Yes, but the script refuses to overwrite an existing target file by default. Pass the --force flag to allow overwriting a session file that already exists in the target slug directory.