V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Livid
247.2D
541.21D
V2EX  ›  Planet

用 Planet 保存 Claude Code 会话

  •  1
     
  •   Livid ·
    PRO
    · 2 天前 · 1495 次点击

    有时候,当你在 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

    13 条回复    2026-04-07 16:12:05 +08:00
    cairnechen
        1
    cairnechen  
       2 天前
    啊? 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
       2 天前
    shoaly
        3
    shoaly  
       2 天前
    更合适的方式是, 开一个工具, 直接将本地所有 session 中的对话整理出来, 同步到某个地方(obsidian 都行), 这样就能随时搜索之前聊了什么, 有时候项目久了, 是需要回头看看某一次说过什么, 机器回过什么的. 现在 cc 做不到跨项目, 跨 session 的搜索
    Tink
        4
    Tink  
    PRO
       2 天前 via Android
    @shoaly 这个有很多现成的工具,比如 tg_cli ,可以直接查 tg 聊天记录,还有 lossless_claw ,用 sqlite 存每一次对话
    shoaly
        5
    shoaly  
       2 天前
    @Tink #4 我在说 整理的是 claude code 的所有对话, 不用显示的 /save-session , tg 在这个场景是起的什么作用呢?
    Tink
        6
    Tink  
    PRO
       2 天前 via iPhone
    @shoaly 就是现在不是有很多 tg 控制 cc 的方案嘛,然后就刚好利用 tg 把 cc 的 session 不压缩保存到聊天记录里面,便于后续查之前的执行过程
    shmilypeter
        7
    shmilypeter  
       1 天前
    一些值得保存的 session 我一般会让其总结一下生成一个 html 文件,方便阅读和归档。

    感谢 OP 提供 skills
    ronman
        8
    ronman  
       1 天前
    @shoaly 同步到 obsidian 有什么的现成的工具吗
    lemonda
        9
    lemonda  
       1 天前
    是个问题,我甚至开着 OpenCode 让它搜 Claude Code 的聊天记录。
    另一个需求是,AI 把我说的需求表达的更简练时,会看下它用了什么词儿。
    Livid
        10
    Livid  
    MOD
    OP
    PRO
       1 天前
    @lemonda 那么你可以修改初始提示词,让这个 skill 重点保存的是所有的 prompts 及对应的回复:

    ```
    Create a Claude Code skill called `/save-session` that saves the current session prompts and responses 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
    ```

    根据需求改就好。
    Livid
        11
    Livid  
    MOD
    OP
    PRO
       1 天前
    今天用 Claude Code 分析一个代码库,然后让它创建了一篇详细的分析文档发送到 Planet:

    https://k51qzi5uqu5dluwqy5gdyg2i4xsa18f70md07m5kyvshli6jisk5qs5b2ygw93.eth.sucks/DCCC1485-1CB9-45AD-AF1F-C3C4138E58A1/
    seedscoder
        12
    seedscoder  
       1 天前
    Planet 是什么?是第一张截图里面的软件吗?
    Livid
        13
    Livid  
    MOD
    OP
    PRO
       1 天前   ❤️ 1
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   4399 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 10:14 · PVG 18:14 · LAX 03:14 · JFK 06:14
    ♥ Do have faith in what you're doing.