Save Thread

nowledge-co/community/nowledge-mem-proma-plugin/skills/save-thread

作者 nowledge-co1f4d7eb61466dbfc93ce8d7a0a806c4d4a196dd0無授權條款收錄於 2026年10月9日更新於 2026年10月9日

Save or archive the current Proma session to Nowledge Mem when the user explicitly asks, especially as a fallback when automatic hooks are unavailable.

AI 產生的概覽

在使用者明確要求時,將目前的 Proma 工作階段儲存或封存至 Nowledge Mem,作為自動鉤子無法使用時的備援方式。

功能
此技能指示代理僅在使用者明確要求時(例如「儲存此工作階段」或「封存此對話」)將目前的 Proma 工作階段儲存至 Nowledge Mem。它說明可使用 MCP 工具 mcpnowledge-memsave_thread 並傳入工作階段 ID 與選用標題,或在 MCP 無法使用時改用 Python 指令碼作為備援方案。它還指出儲存會依 UUID 去重、可重複執行且具冪等性,並建議將執行緒與蒸餾後的記憶搭配使用。
適用情境
當使用者明確要求儲存、封存、記錄或為目前工作階段建立檢查點時使用。它也適用於自動 UserPromptSubmit 與 Stop 鉤子尚未設定時的備援情境。它不用於自動擷取,自動擷取由鉤子負責。
執行需求
需要 Nowledge Mem MCP 工具 mcpnowledge-memsave_thread,或備用的 Python 3 指令碼 ~/.proma/scripts/save-to-nmem.py。它還涉及 ~/.proma/sdk-config/projects/ 或 ~/.proma/agent-sessions/ 下的 Proma 工作階段 JSONL 檔案、正在執行的 nmem 伺服器,以及 ~/.proma/logs/nm-hooks.log 記錄檔。此技能本身不附帶指令碼。

Save Thread

Save the current Proma session to Nowledge Mem on explicit user request.

When to Save

Save only when the user explicitly requests it:

  • "Save this session"
  • "Archive this conversation"
  • "Record this"
  • "Checkpoint this"

The UserPromptSubmit and Stop hooks in ~/.proma/sdk-config/.claude/settings.json handle automatic capture. This skill is for manual saves and for fallback when hooks are not configured.

Usage

Primary (MCP):

mcp__nowledge-mem__save_thread  session_id: "<current session id>"  title: "<optional custom title>"

Manual script (if MCP unavailable):

bash
echo '{"session_id":"<id>","cwd":"<project dir>"}' | python3 ~/.proma/scripts/save-to-nmem.py

Behavior

  • Proma sessions are stored as JSONL in ~/.proma/sdk-config/projects/<workspace-hash>/<session-id>.jsonl
  • Older Proma builds that write ~/.proma/agent-sessions/<id>.jsonl are still supported by the script
  • The save script deduplicates by UUID and extracts text from content blocks
  • Thread ID format: proma-{session_id}
  • Re-running is idempotent — only new messages are appended

Thread vs Memory

Thread = real session messages (for searching conversation history) Memory = distilled insights (for durable knowledge) Both are useful — save a thread AND distill key learnings.

Troubleshooting

If thread save fails, check ~/.proma/logs/nm-hooks.log for errors. Verify the nmem server is running with nmem status.

來源與署名

來源:nowledge-co/community位於nowledge-mem-proma-plugin/skills/save-thread提交1f4d7eb

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架