Foreword¶
Developing agents in DeepSeek Harness (DSH) often involves a common scenario: tools like Claude Code, Codex, and Cursor have accumulated extensive dialogues, but switching to DSH requires starting from scratch. Manually copying and pasting risks losing tool calls, thought processes, and context structures; exporting only text prevents “continuing the conversation” in DSH.
dsh-chat-import addresses this migration scenario: it reads sessions from the local storage of over a dozen external Agent tools, converts them into resolvable sessions in DSH; and when needed, it can also export, incrementally write back, or package backups. Below, we introduce its positioning, capabilities, and usage.
What This Is¶
dsh-chat-import is a DSH community plugin, maintained by Nwflower, with the npm package name dsh-chat-import, current version 0.7.0, licensed under MIT. It is categorized under “Memory” in the SkillHub Plugin Directory, with approximately 102 stars on its GitHub repository.
The plugin focuses on two core extensions: reading session files from external sources (read-only, without modifying source files) to generate new sessions in DSH that can be grouped by workspace; and conversely, supporting the serialization of DSH sessions back into formats like Claude Code, Codex, Kimi, etc., or restoring them across machines via interchange bundles.
Runtime requirements: Node.js ≥ 22.13; targeting dsh 0.1.x (the README specifies testing on 0.1.0-rc.6 / 0.1.0-rc.7).
Core Features¶
Multi-Source Import¶
Supports importing from 17+ external Agent sources, with each conversation becoming an independent DSH session. Import tools include import_claude, import_codex, import_chatgpt, import_cursor, import_gemini, import_reasonix, import_opencode, import_mimocode, import_zcode, import_grokbuild, import_openclaw, import_pi, import_hermes, import_kimi, import_qoder, import_workbuddy, import_dsh, and the universal entry point import_local_jsonl. The README lists a total of 18 import_* tools.
Full-fidelity continuation means: tool calls and results, thought processes, titles, model names, and timestamps are preserved as much as possible; sessions are grouped into corresponding workspaces based on the source cwd.
Discovery and Batch Processing¶
scan_discover() allows read-only previews of importable content. The “Import Sessions” panel in the sidebar enables browsing by workspace with multi-select support; /import-all can batch import.
Export and Sync¶
export_claude/export_codex/export_kimi: Serialize DSH sessions back to the respective formats, reporting any lossy items.export_bundle/restore_bundle: Portable interchange bundles with SHA-256 fingerprints, restorable across machines.sync_to_claude: Incrementally append new turns from a DSH session to the Claude Code file, with guards to avoid silent overwrites.- “Sync” page in the panel: Optionally enables bidirectional incremental sync (external → DSH, DSH → external), disabled by default; sub-agent dialogs default to bidirectional filtering;
excludeDirsallows excluding specific workspace directories per direction.
Asset and Configuration Migration¶
import_agents: Converts agents, prompts, skills, and instructions from Pi, OpenCode, Claude, and Codex into DSH skills.import_mcp//mcp-status: Reads MCP server configurations from Claude / Codex and generates reviewable DSH MCP client YAML snippets.import_settings//settings-suggest: Converts Claude settings / Codex configs into DSH migration suggestions (read-only)./resume-claude//resume-codex: Uses external transcripts as untrusted history to generate handover summaries injected into the current session.
Audit and Protection¶
verify_session,doctor, or CLIdsh-chat-import doctor: Structural audit and migration health checks.- Import tools support
expectedHash,restamp, and context budget protection; skips if source is unchanged, appends only if source grows. - The “Plugins” section in the settings page allows configuring default presets for imported sessions; “Import System Prompt” is disabled by default; when enabled, it injects system / developer prompts from the source transcript as context.
Supported Sources¶
The table below is excerpted from README.zh-CN.md. Storage paths vary by platform; please verify the actual directory on your local machine before importing.
| Source | Typical Storage Location | Import Tool |
|---|---|---|
| Claude Code | ~/.claude/projects/<slug>/<sessionId>.jsonl |
import_claude |
| Codex / ChatGPT CLI | ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl |
import_codex |
| ChatGPT Web Export | conversations.json in the export package |
import_chatgpt |
| Cursor | ~/.cursor/projects/<slug>/agent-transcripts/<id>/<id>.jsonl |
import_cursor |
| Gemini CLI | ~/.gemini/history/<slot>/chats/session-*.json |
import_gemini |
| Reasonix | ~/.reasonix/sessions/ etc. |
import_reasonix |
| OpenCode | ~/.local/share/opencode/opencode.db |
import_opencode |
| ZCode | ~/.zcode/cli/db/db.sqlite |
import_zcode |
| Grok Build | ~/.grok/sessions/<id>/ |
import_grokbuild |
| OpenClaw | ~/.openclaw/agents/<agent>/sessions/*.jsonl |
import_openclaw |
| Pi Coding Agent | ~/.pi/agent/sessions/ |
import_pi |
| Hermes | ~/.hermes/ |
import_hermes |
| Kimi CLI / Kimi Code | ~/.kimi/sessions/ etc. |
import_kimi |
| Qoder CLI | ~/.qoder/projects/ |
import_qoder |
| WorkBuddy | ~/.workbuddy/projects/ |
import_workbuddy |
| DSH Session Logs | ~/.dsh/sessions/ |
import_dsh |
| Any Local JSONL | Any .jsonl file or directory |
import_local_jsonl |
Parts of the source format that cannot be preserved are marked in the import report. Boundary behaviors for each source are detailed in docs/USAGE.zh-CN.md within the repository.
Installation and Activation¶
Install the npm package via the DSH plugin command:
dsh plugin --profile web add dsh-chat-import
For local development, you can use a symlink to the source directory:
dsh plugin --profile web add -w link:/path/to/dsh-chat-import
To uninstall, remove the import-claude insert line from the profile’s bundles and restart DSH; imported sessions are not automatically deleted by the plugin.
Typical Usage¶
After installation, call import_* tools in any DSH session. All import tools share the path semantics: a single file imports a single session, while a directory recursively scans for batch imports.
Import a Claude Code project directory:
import_claude({ path: "~/.claude/projects" })
Import a ChatGPT web export:
import_chatgpt({ path: "~/Downloads/chatgpt-export/conversations.json" })
Import local JSONL (with optional format specification):
import_local_jsonl({ path: "D:\downloads\session.jsonl" })
Common parameters include: preview (zero side-effect preview), force (save a full new copy), sessionId (override target id), expectedHash (SHA-256 verification), restamp (timestamp translation), workspaceMode / workspaceDir (workspace grouping control).
Typical continuation flow:
- Call
import_*to complete the import. - Refresh the session list and open the imported session.
- Continue the conversation from where the source record left off.
Optional: Use scan_discover() for previews; multi-select import via the sidebar panel; batch import with /import-all; configure bidirectional sync on the panel’s “Sync” page.
Key Behaviors¶
- Read-only import: Source transcripts and database are not modified; DSH-side history is append-only.
- Idempotent and incremental: Skips if source is unchanged; appends only new turns if source grows; truncation is detected and reported.
- Automatic grouping: Sessions are grouped into workspaces based on source
cwd. - Environment change declaration: Each imported session injects a collapsed line before the first turn, declaring migration to DSH, with tools and permissions based on the current session.
- Loud failures: Malformed lines, lossy formats, and lossy export items are explicitly reported; persisted sessions automatically undergo structural self-checks.
- Sandbox: Reading source files outside the workspace or writing export targets outside the workspace requires sandbox permissions for the corresponding paths.
Use Cases and Notes¶
Suitable for the following scenarios:
- Migrating from tools like Claude Code, Codex, or Cursor to DSH while preserving tool calls and context structures.
- Need to hand over sessions between DSH and external tools, or perform portable backups and cross-machine restoration.
- Aim to migrate external agents, MCP, and settings into the DSH ecosystem.
Please note before use:
- The plugin runs with the permissions of the current DSH process and reads the session directories of local Agent tools; before installation, review the GitHub source code and MIT license to confirm acceptance of its read/write scope.
- SkillHub is an independent community directory, with no official affiliation to DeepSeek / High-Flyer; the DSH ecosystem follows the “everything is a plugin” philosophy, and this plugin is a community-maintained migration tool, not a built-in DSH capability.
- Bidirectional sync is disabled by default; before enabling write-back, it is recommended to first use
previeworscan_discover()to confirm the scope.
Links¶
- SkillHub Directory Page: https://www.skillhub.cn/plugins/Nwflower/dsh-chat-import
- GitHub Repository: https://github.com/Nwflower/dsh-chat-import
dsh-chat-import consolidates scattered sessions from various Agent tools into resolvable DSH sessions, and allows reverse export or packaging when needed. If you are migrating from another Agent environment to DSH, or need to hand over context between two sets of tools, you can follow the steps above to install and try import_* once.