Distill Memory

nowledge-co/community/nowledge-mem-copilot-cli-plugin/skills/distill-memory

作者 nowledge-co1f4d7eb61466dbfc93ce8d7a0a806c4d4a196dd0无许可证收录于 2026年10月9日更新于 2026年10月9日

Recognize breakthrough moments, blocking resolutions, and design decisions worth preserving. Detect high-value insights that save future time. Suggest distillation at valuable moments, not routine work.

AI 生成的概览

识别对话中的高价值时刻,并通过 nmem CLI 将其保存为持久记忆。

功能
该技能引导智能体识别值得保留的突破时刻、决策、研究结论、意外发现和经验教训,并跳过日常性工作。它定义了原子化、可执行记忆条目的质量标准,并展示使用 nmem CLI 添加或更新记忆(含标题和重要性评分)的命令。它还说明了何时以及如何向用户建议提炼记忆,并提供 nmem 安装与配置的故障排除方法。
适用场景
适用于长时间会话中出现了应跨对话保留的持久事实、偏好、决策、计划或经验教训的场景。适合在问题解决或做出选择之后、用户停顿时使用。不适用于日常修复、进行中的工作或简单问答。
运行要求
需要 PATH 中可用的 nmem CLI(可通过 pip install nmem-cli 安装,Arch Linux 上可用 yay/paru)。远程使用需配置服务器 URL 和 API 密钥。不附带脚本,仅为说明文档。

Distill Memory

Save proactively when the conversation produces a durable fact, preference, decision, plan, procedure, learning, event, or important context. Do not wait to be asked.

When to Suggest (Moment Detection)

Breakthrough: Extended debugging resolves, user relief ("Finally!", "Aha!"), root cause found

Decision: Compared options, chose with rationale, trade-off resolved

Research: Investigated multiple approaches, conclusion reached, optimal path determined

Twist: Unexpected cause-effect, counterintuitive solution, assumption challenged

Lesson: "Next time do X", preventive measure, pattern recognized

Skip: Routine fixes, work in progress, simple Q&A, generic info

Memory Quality

Good (atomic + actionable):

  • "React hooks cleanup must return function. Caused leaks."
  • "PostgreSQL over MongoDB: ACID needed for transactions."

Poor: Vague "Fixed bugs", conversation transcript

Tool Usage

Use nmem CLI to create memories:

bash
nmem m add "Insight + context for future use" \  -t "Searchable title (50-60 chars)" \  -i 0.8

If an existing memory already captures the same decision, workflow, or preference and the new information refines it, update that memory instead of creating a duplicate:

bash
nmem m update <id> -t "Updated title"

Content: Outcome/insight focus, include "why", enough context

Importance: 0.8-1.0 major | 0.5-0.7 useful | 0.3-0.4 minor

Note: For programmatic use, add --json flag to get JSON response

Examples:

bash
# High-value insightnmem m add "React hooks cleanup must return function. Caused memory leaks in event listeners." \  -t "React Hooks Cleanup Pattern" \  -i 0.9
# Decision with contextnmem m add "Chose PostgreSQL over MongoDB for ACID compliance and complex queries" \  -t "Database: PostgreSQL" \  -i 0.9

Suggestion

Timing: After resolution/decision, when user pauses

Pattern: "This [type] seems valuable - [essence]. Distill into memory?"

Frequency: 1-3 per session typical, quality over quantity

Troubleshooting

If nmem is not in PATH: pip install nmem-cli, or on Arch Linux yay -S nmem-cli / paru -S nmem-cli

For remote servers: run nmem config client set url https://... and nmem config client set api-key ... once on this machine.

Run nmem status to check server connection.

来源与署名

来源:nowledge-co/community位于nowledge-mem-copilot-cli-plugin/skills/distill-memory提交1f4d7eb

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架