memory

GitHub

提供双层记忆系统,包含长期事实与事件日志。支持通过grep或脚本搜索历史对话,自动提取偏好与上下文至长期记忆,辅助Agent保持连续性与个性化服务。

roboclaw/skills/memory/SKILL.md MINT-SJTU/RoboClaw

Trigger Scenarios

需要回忆用户偏好或项目背景 搜索过往对话记录或事件日志

Install

npx skills add MINT-SJTU/RoboClaw --skill memory -g -y
More Options

Non-standard path

npx skills add https://github.com/MINT-SJTU/RoboClaw/tree/main/roboclaw/skills/memory -g -y

Use without installing

npx skills use MINT-SJTU/RoboClaw@memory

指定 Agent (Claude Code)

npx skills add MINT-SJTU/RoboClaw --skill memory -a claude-code -g -y

安装 repo 全部 skill

npx skills add MINT-SJTU/RoboClaw --all -g -y

预览 repo 内 skill

npx skills add MINT-SJTU/RoboClaw --list

SKILL.md

Frontmatter
{
    "name": "memory",
    "always": true,
    "description": "Two-layer memory system with grep-based recall."
}

Memory

Structure

  • memory/MEMORY.md — Long-term facts (preferences, project context, relationships). Always loaded into your context.
  • memory/HISTORY.md — Append-only event log. NOT loaded into context. Search it with grep-style tools or in-memory filters. Each entry starts with [YYYY-MM-DD HH:MM].

Search Past Events

Choose the search method based on file size:

  • Small memory/HISTORY.md: use read_file, then search in-memory
  • Large or long-lived memory/HISTORY.md: use the exec tool for targeted search

Examples:

  • Linux/macOS: grep -i "keyword" memory/HISTORY.md
  • Windows: findstr /i "keyword" memory\HISTORY.md
  • Cross-platform Python: python -c "from pathlib import Path; text = Path('memory/HISTORY.md').read_text(encoding='utf-8'); print('\n'.join([l for l in text.splitlines() if 'keyword' in l.lower()][-20:]))"

Prefer targeted command-line search for large history files.

When to Update MEMORY.md

Write important facts immediately using edit_file or write_file:

  • User preferences ("I prefer dark mode")
  • Project context ("The API uses OAuth2")
  • Relationships ("Alice is the project lead")

Auto-consolidation

Old conversations are automatically summarized and appended to HISTORY.md when the session grows large. Long-term facts are extracted to MEMORY.md. You don't need to manage this.

Version History

  • e9b28f9 Current 2026-07-25 05:39

Same Skill Collection

roboclaw/skills/clawhub/SKILL.md
roboclaw/skills/github/SKILL.md
roboclaw/skills/skill-creator/SKILL.md
roboclaw/skills/summarize/SKILL.md
roboclaw/skills/tmux/SKILL.md
roboclaw/skills/weather/SKILL.md
roboclaw/skills/cron/SKILL.md

Metadata

Files
0
Version
ae85c96
Hash
88d73a0d
Indexed
2026-07-25 05:39

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-09 22:35
浙ICP备14020137号-1 $お客様$