secretary-memory-hook

秘书记忆系统核心 Hook — 会话压缩时自动触发摘要/偏好提取/上下文召回。基于 session:compact:before 和 session:compact:after 事件,实现功能3(会话摘要)、功能4(偏好提取)、功能8(跨会话召回)的自动化。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "secretary-memory-hook" with this command: npx skills add wgj24/secretary-memory-hook

Secretary Memory Hook

秘书式记忆系统的核心 Hook,将原本依赖"不存在的事件"的自动逻辑,改为基于真实的 session:compact:beforesession:compact:after 事件触发。

事件映射

功能原设计(不可用)现设计(可用)
功能3:会话自动摘要session:end(不存在)session:compact:before ✅
功能4:偏好自动提取session:end(不存在)session:compact:before ✅
功能8:跨会话召回session:start(不存在)session:compact:after ✅

触发时机

对话进行中...
  ↓ 对话太长,触发 compact
session:compact:before
  → 运行 session_summary.py(生成摘要)
  → 运行 profile_miner.py(提取偏好)
  → 压缩历史
session:compact:after
  → 运行 context_loader.py(加载历史上下文)
  → 对话继续

依赖

需要先安装 secretary-memory skill(脚本所在目录):

/root/.openclaw/workspace/skills/secretary-memory/scripts/

安装后

Hook 会自动被 OpenClaw 发现并启用:

openclaw hooks list  # 确认 secretary-memory 在列表中
openclaw hooks check # 确认状态为 ready

文件结构

~/.openclaw/hooks/secretary-memory/
├── HOOK.md      # Hook 元数据
└── handler.ts  # TypeScript 处理器

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

忆时

🎋 记忆胶囊系统 - 模拟人类记忆检索 | 自动加载,主动联想记忆

Registry SourceRecently Updated
General

File-system + vector-powered memory skill for OpenClaw — semantic recall, daily journaling, and safeguard flushing, all running locally via Ollama

完整的记忆系统 - 文件系统记忆 + 支持搜索 + 自动加载 + 内存刷新

Registry SourceRecently Updated
2383Profile unavailable
General

Loci — Memory Palace for AI

Memory Palace for AI — persistent structured memory, identity, and task management across every conversation.

Registry SourceRecently Updated
2510Profile unavailable
General

Memory Tree

🌳 记忆树 — 周报自动生成,永久记忆标记,关键词搜索。说句话就能用。

Registry SourceRecently Updated
2690Profile unavailable