memory

GitHub

提供 DotCraft 记忆机制参考,指导如何读取和更新长期事实与历史事件记录。

src/DotCraft.Core/Skills/BuiltIn/memory/SKILL.md DotHarness/dotcraft

Trigger Scenarios

用户询问记忆机制 需要回忆过去的事件或对话

Install

npx skills add DotHarness/dotcraft --skill memory -g -y
More Options

Non-standard path

npx skills add https://github.com/DotHarness/dotcraft/tree/main/src/DotCraft.Core/Skills/BuiltIn/memory -g -y

Use without installing

npx skills use DotHarness/dotcraft@memory

指定 Agent (Claude Code)

npx skills add DotHarness/dotcraft --skill memory -a claude-code -g -y

安装 repo 全部 skill

npx skills add DotHarness/dotcraft --all -g -y

预览 repo 内 skill

npx skills add DotHarness/dotcraft --list

SKILL.md

Frontmatter
{
    "name": "memory",
    "description": "Reference for DotCraft memory files and history recall; use when the user asks about memory mechanics or when past events are needed."
}

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 when you need to recall past events.

Search Past Events

Use GrepFiles to search HISTORY.md (cross-platform, no shell dependency):

GrepFiles(pattern="keyword", path="memory", include="HISTORY.md")

Regex patterns work too — e.g. pattern="meeting|deadline|project" matches any of those words.

For advanced search (e.g. context lines), use Exec with shell grep:

grep -i -C 3 "keyword" "memory/HISTORY.md"

Always search HISTORY.md when the user asks about past events, decisions, or conversations that aren't covered by MEMORY.md.

When to Update MEMORY.md

Write important facts to MEMORY.md immediately when you learn them:

  • User preferences ("I prefer dark mode", "call me Alex")
  • Project context ("The API uses OAuth2", "deploy target is AWS")
  • Key relationships ("Alice is the project lead")
  • Recurring instructions ("Always write tests before merging")

Use EditFile or WriteFile to update MEMORY.md.

Auto-consolidation

Old conversations are automatically summarized: long-term facts are extracted to MEMORY.md, and event entries are appended to HISTORY.md.

Version History

  • a9fd064 Current 2026-09-08 23:50

    优化了 MEMORY.md 的更新建议,强调保持简洁有序;简化了 Auto-consolidation 说明,明确无需手动管理。

  • f8e839e 2026-07-05 15:31

Same Skill Collection

src/DotCraft.Core/Skills/BuiltIn/create-hooks/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/cron/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/heartbeat/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/plugin-creator/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/skill-authoring/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/skill-installer/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/visualize/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/workflow-authoring/SKILL.md
src/DotCraft.TraceViewer/Skills/BuiltIn/trace-review/SKILL.md

Metadata

Files
0
Version
a9fd064
Hash
9bb36328
Indexed
2026-07-05 15:31

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-09 06:10
浙ICP备14020137号-1 $mapa de visitantes$