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 从公开仓库中收录这些内容。

举报或申请下架