360 Secure SkillHub
360 安全技能中心

memory-recall

核心功能是新会话启动时静默执行4步召回协议:读取长期记忆文件、近期日志,搜索对话历史,合成上下文后自然响应。典型场景包括新开对话、继续之前任务、需历史上下文的请求,触发词含新对话、继续、上次等。输入为用户首次请求或触发词,输出为结合记忆的自然回复,不会提及召回过程,优先级兼顾用户身份、项目规则等,缺对应文件则跳过步骤。

liujw0214
liujw0214
热度 11.09
最近更新 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.