Skip to main content

save-session

Save the current Claude Code session as a Planet article for later review

来源信息

仓库
Planetable/Planet
最近来源活动
2026年4月28日 23:18
检测到的 SKILL.md 语言
英语
星标
1,808
分支
78

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
5 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
save-session
description
Save the current Claude Code session as a Planet article for later review
allowed-tools
Bash, Read
Save the current session to Planet. Follow these steps exactly: ## 1. Generate a session title Create a short, descriptive title (under 80 chars) in this format: ``` YYYY-MM-DD Session: <brief description of what was done> ``` Use today's date. The description should capture the main theme (e.g., "Build release notes Flask app", "Fix search performance", "Add Planet API sync"). ## 2. Write a session summary Write an HTML summary of this session. Structure it as: ```html <h2>What was done</h2> <ul> <li>Key task or change 1</li> <li>Key task or change 2</li> ... </ul> <h2>Key decisions</h2> <ul> <li>Decision 1 and why</li> ... </ul> <h2>Files changed</h2> <ul> <li><code>path/to/file1</code> — what changed</li> <li><code>path/to/file2</code> — what changed</li> ... </ul> ``` Be concise. Focus on what matters for future review. Omit sections if they don't apply (e.g., skip "Key decisions" if there were none worth noting). ## 3. Save to Planet Run the save script. The title, summary, and session ID must be passed as arguments. The current Claude Code session ID is: ${CLAUDE_SESSION_ID}. Pass this value as a literal string (not as a shell variable). Use a heredoc for the summary to handle HTML safely: ```bash TITLE="<the title>" SESSION_ID="<the Claude Code session ID shown above>" SUMMARY=$(cat <<'HTMLEOF' <the summary HTML> HTMLEOF ) python3 tools/claude-code-skill/save_session.py "$TITLE" "$SUMMARY" "$SESSION_ID" ``` The script reads `tools/claude-code-skill/config.json` to find the Planet server and planet ID for the current project. The script embeds the session ID in the article content and uses it to find existing articles from the same session. This means multiple `/save-session` calls in the same session update the same article, even if the title changes. ## 4. Confirm Tell the user the article was created or updated, with the title. The article is viewable in the Planet app.
在 GitHub 查看