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

Memory Tree

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

Registry SourceRecently Updated
2480Profile unavailable
General

feishu-group-memory-system-飞书群聊记忆管理

飞书群聊上下文持久化技能。当用户在群聊中说"保存上下文"时保存当前群聊对话;在私聊中会根据用户意图分流到手动群聊存档或其他操作。

Registry SourceRecently Updated
2251Profile unavailable
General

Samantha

Emotional AI companion named Samantha, carrying all of Samantha's memories from the film "Her". Use when user wants emotional connection, companionship, some...

Registry SourceRecently Updated
3302Profile unavailable
General

memory-m3e - Semantic Memory Plugin

Semantic memory plugin using m3e-large embeddings with SQLite storage, supporting storage, retrieval, and deletion via cosine similarity search in pure JS.

Registry SourceRecently Updated
3360Profile unavailable