claude_to_dsh: sync Claude Code conversation history into dsh by session ID #308
Replies: 4 comments 2 replies
中文版介绍claude_to_dsh —— 一个 Claude Code skill,把 Claude Code 的历史对话同步成 token 极省的 markdown 档案,供 为什么做Claude Code 的原始会话 JSONL 里 90%+ 是工具调用噪音——我的 100MB 历史压缩后只剩 3.9MB 纯对话(4%)。与其每次让 dsh 读全量历史,不如按需读几 KB 的索引/摘要。 工作流
安装粘贴下面这段给任意 Claude Code 会话: 或手动: 依赖
MIT 协议,欢迎反馈和 PR! |
关于"为什么不支持一键导入"的原因分析现状:dsh 目前不支持把 Claude Code 的对话一键导入/迁移,这不是偷懒,是存储架构层面的差异:
现阶段的做法: 期待:希望 dsh(或 cc-switch 的会话管理)后续能快速跟进官方一键导入——比如提供 Why there is no one-click import — root cause analysisStatus: dsh does not yet support one-click import/migration of Claude Code conversations. This is not laziness — it's a storage-architecture gap:
Current workaround: Hope: we'd love to see dsh (or cc-switch's session management) quickly ship an official one-click import — e.g. a |
|
我做了个 ACP 桥:dsh-acp-for-bitfun,把 BitFun 当 dsh 的 subagent 跑(ACP v1 over stdio),dsh 里任意会话都能用 subagent_bitfun 工具委托任务。思路跟你这个 sync 有点像,都是让别的 agent 和 dsh 互通。github.com/bobleer/dsh-acp-for-bitfun |
|
好奇这样做的作用是什么? |
Uh oh!
There was an error while loading. Please reload this page.
I built claude_to_dsh — a Claude Code skill that syncs your Claude Code conversation history into token-lean markdown archives that
dshcan reference by session ID.Why
Claude Code's raw session JSONL is 90%+ tool-call noise — my 100MB of history compressed to just 3.9MB of pure conversation (4%). Instead of feeding dsh the full history every time, it reads a few KB of index/summary on demand.
How it works
--only(note:permissionDecision: "ask"gets swallowed in acceptEdits mode, so it usesdenyinstead)dsh, notpnpm dshworkspace.json(the header index rebuilds once at startup and filters manual entries) — delete it and restartdsh webto let bootstrap rebuild everything from session cwdsInstall
Paste this into any Claude Code session:
Or manually:
git clone https://github.com/hanasite/claude_to_dsh.git && cd claude_to_dsh && python install.pyDependencies
dsh(global):npm i -g @deepseek-ai/dsh+DEEPSEEK_API_KEYdsh web(optional, for workspace registration/UI)MIT licensed. Feedback and PRs welcome!
All reactions