用 Planet 保存 Claude Code 会话 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Livid
245.42D
521.76D
V2EX    Planet

用 Planet 保存 Claude Code 会话

  •  1
     
  •   Livid
    PRO
    1 天前 1077 次点击

    有时候,当你在 Claude Code 里完成了一些复杂的事情,你可能想把这个 session 总结保存下来,稍后可以浏览或者分享。

    你可以用下面的这个提示词让 Claude Code 来创建一个 skill 将会话保存到 Planet:

    Create a Claude Code skill called `/save-session` that saves the current session summary as a Planet article. One planet per project, one article per session. If the article already exists, update it. Planet API docs: https://raw.githubusercontent.com/Planetable/Planet/refs/heads/main/Technotes/API.md 

    然后你可以用这种方式来告诉 Claude Code 如何映射:

    planet server url: http://127.0.0.1:8086 planet uuid for this project: 6A10E06A-C77E-4D43-B96F-4F870ACF7005 

    Planet UUID 可以右键 Copy UUID 获得。

    然后就可以在需要的时候将会话总结保存进 Planet 稍后浏览或者分享了。


    或者也可以用这里已经创建好的 skill 文件:

    https://github.com/Planetable/Planet/tree/main/tools/claude-code-skill

    8 条回复    2026-04-06 22:13:54 +08:00
    cairnechen
        1
    cairnechen  
       19 小时 11 分钟前
    啊? save-session 是按照 Claude Code 自己存 session memory 的方式保存的吗?还可以这样?
    我这两天看源码,还准备自己写 skill 来按照它的方式保存 memory 然后在别的电脑或者 codex 继续工作来着

    session memory 在 src\services\SessionMemory\prompts.ts

    # Session Title
    _A short and distinctive 5-10 word descriptive title for the session. Super info dense, no filler_

    # Current State
    _What is actively being worked on right now? Pending tasks not yet completed. Immediate next steps._

    # Task specification
    _What did the user ask to build? Any design decisions or other explanatory context_

    # Files and Functions
    _What are the important files? In short, what do they contain and why are they relevant?_

    # Workflow
    _What bash commands are usually run and in what order? How to interpret their output if not obvious?_

    # Errors & Corrections
    _Errors encountered and how they were fixed. What did the user correct? What approaches failed and should not be tried again?_

    # Codebase and System Documentation
    _What are the important system components? How do they work/fit together?_

    # Learnings
    _What has worked well? What has not? What to avoid? Do not duplicate items from other sections_

    # Key results
    _If the user asked a specific output such as an answer to a question, a table, or other document, repeat the exact result here_

    # Worklog
    _Step by step, what was attempted, done? Very terse summary for each step_
    Livid
        2
    Livid  
    MOD
    OP
    PRO
       19 小时 6 分钟前
    shoaly
        3
    shoaly  
       19 小时 5 分钟前
    更合适的方式是, 开一个工具, 直接将本地所有 session 中的对话整理出来, 同步到某个地方(obsidian 都行), 这样就能随时搜索之前聊了什么, 有时候项目久了, 是需要回头看看某一次说过什么, 机器回过什么的. 现在 cc 做不到跨项目, 跨 session 的搜索
    Tink
        4
    Tink  
    PRO
       12 小时 59 分钟前 via Android
    @shoaly 这个有很多现成的工具,比如 tg_cli ,可以直接查 tg 聊天记录,还有 lossless_claw ,用 sqlite 存每一次对话
    shoaly
        5
    shoaly  
       12 小时 43 分钟前
    @Tink #4 我在说 整理的是 claude code 的所有对话, 不用显示的 /save-session , tg 在这个场景是起的什么作用呢?
    Tink
        6
    Tink  
    PRO
       12 小时 29 分钟前 via iPhone
    @shoaly 就是现在不是有很多 tg 控制 cc 的方案嘛,然后就刚好利用 tg 把 cc 的 session 不压缩保存到聊天记录里面,便于后续查之前的执行过程
    shmilypeter
        7
    shmilypeter  
       8 小时 12 分钟前
    一些值得保存的 session 我一般会让其总结一下生成一个 html 文件,方便阅读和归档。

    感谢 OP 提供 skills
    ronman
        8
    ronman  
       6 小时 16 分钟前
    @shoaly 同步到 obsidian 有什么的现成的工具吗
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     813 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 24ms UTC 20:30 PVG 04:30 LAX 13:30 JFK 16:30
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86