Install
openclaw skills install export-conversation-summaryExport current Claude Code conversation to markdown document with full dialogue context and model operations
openclaw skills install export-conversation-summaryExtract the current Claude Code conversation from internal JSONL storage and format it as a readable markdown document showing:
Use this skill when the user asks to:
The conversation is stored in ~/.claude/projects/-Users-{user}-{project_path}/ as a JSONL file.
# Find the most recent conversation file
PROJECT_DIR=$(pwd | sed 's|/||g' | sed 's| |-|g')
CONV_DIR="$HOME/.claude/projects/-Users-$(whoami)-$PROJECT_DIR"
LATEST_CONV=$(ls -t "$CONV_DIR"/*.jsonl 2>/dev/null | head -1)
Launch a general-purpose agent to:
Task prompt template:
Read and parse the JSONL conversation file at `{CONVERSATION_FILE_PATH}`.
This is a Claude Code conversation log. Each line is a JSON object representing a message.
Extract ALL user messages and assistant messages in chronological order.
For each assistant message, identify:
- Files read (Read tool)
- Files edited/written (Edit/Write tools)
- Searches performed (Grep/Glob tools)
- Commands executed (Bash tool)
- Documentation lookups (Context7, web searches)
- Skills invoked (Skill tool)
- Agents dispatched (Task tool)
- Token usage for this turn (from JSONL metadata)
- Text responses to the user
Write the extracted conversation to `{OUTPUT_PATH}` in this format:
```markdown
# {Conversation Title}
## 日期: {YYYY-MM-DD}
---
### 用户 #{N}
[user message text]
### 模型 #{N}
**操作:**
- 浏览文件: [list of files read]
- 编辑文件: [list of files edited]
- 搜索: [searches performed]
- 执行命令: [bash commands]
- 查阅资料: [documentation lookups]
**回复:**
[assistant text response]
**Token 消耗:** [tokens used in this turn]
---
After all conversation turns, add:
评分维度:
优点:
待改进:
典型案例:
评分维度:
优点:
问题:
典型案例:
给用户:
给模型:
Important:
- Skip internal/system messages
- Preserve original language (Chinese/English)
- Summarize tool operations (don't dump raw JSON)
- Include ALL rounds of conversation
- Create output directory if needed
After the agent completes:
User says: "把这轮对话保存成文档"
Agent does:
~/.claude/projects/-Users-yz-dev3-demo3/ca50434c-b83d-4f88-ac4c-6b4c722cb460.jsonldocs/2025-02-27-conversation.mddocs/2025-02-27-conversation.md (536 行)"The markdown document should include:
general-purpose agent type (has access to all tools needed)docs/{YYYY-MM-DD}-conversation.md