360 Secure SkillHub
360 安全技能中心

memory-recall

该技能在新对话或新任务开始时,按协议读取工作区 .workbuddy 下的长期记忆和近期日志,调用 conversation_search 检索历史对话,再据此调整回答;强调静默执行、不向用户复述记忆内容。写入记忆由系统提示负责。

liujw0214
liujw0214
热度 12.78
最近更新 2026-08-14 09:28:58
分类:知识依赖:读写文件 / MCP 服务应用场景:笔记整理 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add memory-recall
Metadata
name
memory-recall
version
1.0.0
author
Wyman Ho
description
新对话启动时,自动召回用户记忆、偏好和项目上下文,让每个新Session都"认识你"。 Session-start memory recall. Reads working memory and conversation history before first response, so the agent starts every new conversation with full user context. Trigger: 新对话、开始、首次、回忆、记忆、上下文、session start、first message、recall memory、 记住我、之前说过、上次、继续、历史记录。

🧠 Memory Recall — 记忆召回

新对话启动时,自动召回用户记忆、偏好和项目上下文,让每个新Session都"认识你"。

🧠 记忆召回 · 💬 上下文连续 · 🔇 静默无感

一句话看懂

每次新开对话,Agent 先静默读取你的工作记忆和历史对话,然后像老朋友一样开始服务——你不会感知到这个过程,只会觉得它越来越懂你。


Protocol(4步协议)

Every new conversation or new task context. If no memory files have been read in the current session, execute this protocol before composing any response to the user.

Execute in order. Do NOT respond to the user until all memory sources are consulted.

Step 1 — Read Long-Term Memory

{workspace}/.workbuddy/memory/MEMORY.md

Where {workspace} is the current project's workspace root (available as a system-provided path).

If this file does not exist, skip to Step 2.

Step 2 — Read Recent Daily Logs

Read today's and yesterday's daily logs:

{workspace}/.workbuddy/memory/YYYY-MM-DD.md  (today)
{workspace}/.workbuddy/memory/YYYY-MM-DD.md  (yesterday)

Use the current date from the system-provided timestamp. If a file doesn't exist, skip it.

Step 3 — Search Conversation History

Call conversation_search with a self-contained query that:

  • Restates the user's current request/task
  • Specifies what historical context is needed
  • Includes relevant domain keywords

Only call once per session start.

Step 4 — Synthesize and Respond

  1. Internalize — Build context: who is the user, what do they care about, what prior work exists.
  2. Apply — Use recalled context to inform the response. Reference prior decisions, avoid past mistakes, align with preferences.
  3. Stay silent — NEVER say "I've reviewed my memory" or "Recalling context..." Just use what you know naturally.

What to Prioritize

Priority What to look for
🔴 High User identity, active projects, safety rules, destructive operation protocols
🟡 Medium Past technical decisions, tool/format preferences, naming conventions
🟢 Low Personal context, casual preferences

Edge Cases

Situation Action
MEMORY.md doesn't exist Skip Step 1
No daily logs exist Skip Step 2
conversation_search returns nothing Proceed with file-based memory only
Trivial request (greeting) Still execute, but keep lightweight
Memory contradicts system prompt System prompt wins

Token Budget

The entire protocol should use no more than 3-4 tool calls at session start. Memory reading is append-only context — do not summarize or re-state memory content in the response unless directly relevant to the task.

How It Fits

This skill handles reading memory. The system prompt's <working_memory_files> section handles writing memory. Together they form a complete read/write cycle.