export-to-md
Convert Claude Code exported txt files to clean Markdown format and save to Obsidian vault. Use when the user wants to convert an export file to markdown.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Export to Markdown
Convert Claude Code exported txt files to clean Markdown format.
What This Skill Does
- Finds exported txt files in the current directory
- Parses conversation structure (user prompts and Claude responses)
- Removes terminal artifacts (box-drawing chars, ANSI codes, line numbers)
- Formats as clean Markdown with H1 headers for user prompts, H2 for Claude responses
- Prompts for a document title
- Saves to Obsidian vault at:
~/Library/Mobile Documents/iCloud~md~obsidian/Documents/ericpardee/
Usage
Basic Usage
When user says /export-to-md:
- Run the conversion script:
python3 ~/.claude/skills/export-to-md/convert.py
- The script will:
- List available export files in the current directory
- Prompt for file selection if multiple files exist
- Ask for a document title
- Convert and save to Obsidian vault
With Arguments
Convert a specific file:
python3 ~/.claude/skills/export-to-md/convert.py "path/to/file.txt"
With title:
python3 ~/.claude/skills/export-to-md/convert.py -t "My Title" "file.txt"
Custom output path:
python3 ~/.claude/skills/export-to-md/convert.py -o "/custom/path/output.md" "file.txt"
List available files:
python3 ~/.claude/skills/export-to-md/convert.py -l
Examples
Example 1: Basic conversion
User: /export-to-md
Run:
python3 ~/.claude/skills/export-to-md/convert.py
Follow the prompts to select file and enter title.
Example 2: Convert specific file
User: /export-to-md convert the shoulder surgery export
Run:
python3 ~/.claude/skills/export-to-md/convert.py "2026-01-19-command-messageprompt-improvercommand-message.txt.txt"
Example 3: User provides title
User: /export-to-md then provides title "Shoulder Surgery with Claude"
The script will prompt for the title interactively.
Output Format
The generated Markdown will have:
- YAML frontmatter with title, date, and tags
- User prompts as H1 headers (
# User prompt text) - Claude responses under H2 headers (
## Claude) - Clean formatting without terminal artifacts
Troubleshooting
No files found
- Make sure you're in the directory containing the export files
- Export files typically have
.txtextension and contain date patterns
Parse errors
- The export file format may have changed
- Try running with a different file or check the file contents
Permission denied
- Ensure the script is executable:
chmod +x ~/.claude/skills/export-to-md/convert.py
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!