Install
openclaw skills install @xiao2769433/save-claude-notesSave the latest/current Claude Code Q&A to a local Markdown note. Use for /save-claude-notes, 保存笔记, save note, or configuring the notes directory.
openclaw skills install @xiao2769433/save-claude-notesSave the most recent substantive user question and assistant answer as Markdown.
Prefer --latest; it reads the latest Q&A from the Claude Code transcript so long answers are not repeated in tool input.
--latest discovers transcripts from ~/.claude/projects using the current working directory. If discovery fails or captures the wrong turn, retry with SAVE_NOTE_CWD="PROJECT_PATH" or --transcript PATH before falling back to explicit content input.
User says:
/save-claude-notes
Run:
~/.claude/skills/save-claude-notes/scripts/save-claude-notes.sh --latest
This appends to <notesDir>/YYYY-MM-DD.md, where notesDir comes from ~/.claude/save-claude-notes/config.json or defaults to ~/claude-notes.
.md fileUser says a target ending in .md, for example:
/save-claude-notes 保存到 D:\xiao\WuKong\空.md
Run:
~/.claude/skills/save-claude-notes/scripts/save-claude-notes.sh --latest --output-file "D:/xiao/WuKong/空.md"
Treat .md paths as exact files; do not ask whether it is a directory. The script currently accepts any non-empty path, but prefer .md / .markdown files to avoid writing notes into non-note files.
User says a target directory, for example:
/save-claude-notes 保存到 D:\xiao\WuKong\
Run:
~/.claude/skills/save-claude-notes/scripts/save-claude-notes.sh --latest --notes-dir "D:/xiao/WuKong"
This appends to D:/xiao/WuKong/YYYY-MM-DD.md and does not change the default config.
Use only one Q&A source mode per save; do not combine --latest with explicit question/answer inputs.
If --latest fails or selects the wrong Q&A, try in this order:
SAVE_NOTE_CWD="PROJECT_PATH" ... --latest--latest --transcript PATH--question-file PATH --answer-file PATH for long contentstdin JSON repeats the full Q&A in tool input, so it costs more tokens for long answers.
Only when the user asks to change the default directory, write this JSON to ~/.claude/save-claude-notes/config.json:
{"notesDir":"TARGET_DIRECTORY"}
Do not modify the config for one-off saves.
SAVE_NOTE_ALLOW_SECRETS=1.README.md; avoid loading them unless needed.