Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add max-doo/build-memory --skill build-memory-zhgit clone --depth 1 https://github.com/max-doo/build-memoryWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/max-doo/build-memory/build-memory-zh)<a href="https://agentmods.dev/skills/max-doo/build-memory/build-memory-zh"><img src="https://agentmods.dev/badge/skills/max-doo/build-memory/build-memory-zh/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/max-doo/build-memory/build-memory-zh"><img src="https://agentmods.dev/badge/skills/max-doo/build-memory/build-memory-zh.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00117 | $0.02246 |
| Opus 5.5 | $0.00047 | $0.00898 |
| Sonnet 5.5 | $0.00023 | $0.00449 |
| Haiku 4.5 | $0.00012 | $0.00225 |
Grade A, and why
build-memory scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.
工作空间初始化
在项目根目录创建或完善五个受管文件:AGENTS.md、CLAUDE.md、CHANGELOG.md、SESSION_LOG.md、TODO.md,并补充轻量 .memory/ 支撑目录,用于稳定写入 session log 和沉淀长期经验。
四条不可妥协的规则:
- 单点事实来源 (Single Source of Truth)。 所有通用的项目规则、命令、技术栈均写入
AGENTS.md。CLAUDE.md仅作为一个极简的入口,强制要求通过@AGENTS.md引用它。禁止在CLAUDE.md中重复写具体命令。 - 脚本化写入 session 记录。 Agent 应优先使用
python .memory/session_log.py追加 session 记录,而不是手工编辑SESSION_LOG.md;脚本负责锁、7 天归档和结构化格式。 - 不静默改写。 未经用户明确同意,不得覆盖或删除已有内容。
- 真实时间。 写入任何受管文件中的时间戳之前,必须通过 shell 命令(
date、date -Iseconds、Get-Date等)获取系统真实时间。不得凭记忆编造时间戳。
模板仅以英文形式存放于 assets/,写入时按目标语言翻译。
工作流
1. 选择语言
对于新建文件:
- 明确指令(“use English”、“用中文”、“create in Japanese”)→ 使用该语言。
- 实质性用户输入(除单纯调用外,附带任意语言的指令或上下文)→ 检测该输入的语言。
- 空调用(仅
/build-memory、“init workspace” 或类似无附加要求的调用)→ 询问用户使用哪种语言,不要猜测。
对于完善已有文件,沿用文件原语言,不进行翻译。
2. 阶段一:审查与提议 (Audit & Propose) - 强制门禁
在任何写入或修改之前,必须先收集事实:
- 顶层文件与目录
- 包管理器 / 语言 / 框架(
package.json、pyproject.toml等) - 来自配置脚本的真实命令
- 完整读取工作区中已存在的所有规则受管文件(无论是标准的、
AGENTS.md还是旧的CLAUDE.md、.cursor/rules等)。 - 检查是否存在
.memory/INDEX.md,并校检.memory/KNOWLEDGE.md中的所有###标题是否在INDEX.md中配置了路由。
空工作空间检测。 若检查时未发现源码、包清单、构建配置——即仅含 .git、README 等——在写入前先停下并询问用户:暂时跳过,或者简述项目生成骨架。不要盲目填充占位符。
对于非空工作空间,输出一份《重构计划清单》,明确列出:
- 缺少哪些基础设施(如
.memory/session_log.py需要物理拷贝)。 - 发现了哪些现有的项目核心业务规则、评价原则等,并明确承诺这些内容将被原封不动地保留。
- 计划如何重组
AGENTS.md和CLAUDE.md。
3. 阶段二:物理基建强行挂载 (Infrastructure Scaffolding)
一旦获得用户批准,第一步永远是物理复刻资产。
- 无论项目中是否存在旧的或非标准的规则文件夹,你都必须将 Skill 中的
assets/.memory/目录及其内部脚本完整复制到项目的根目录下。 - 如果不存在
.memory/INDEX.md,从 assets 复制默认模板。 - 绝不允许“借用旧框架”或“迎合非标准结构”。标准的
.memory目录及session_log.py是不可动摇的基础设施。
4. 阶段三:差量融合与严格分区 (Differential Merging)
在创建缺失文件或完善已有文件时,必须遵循带有严格分区的“差量融合(Differential Merging)”原则。整体结构必须强制对齐模板的骨架(Headings),但各区块内容的处理方式不同:
绝对红线区 (Strict Zone):
- 对于
AGENTS.md中的## Memory Layer这一小节,你必须一字不差地 100% 复制assets/AGENTS.md模板中的内容。绝对不允许任何自创、删减或改写,否则会导致记忆系统脚本失效。 - 确保
CLAUDE.md被清理为仅仅保留一句@AGENTS.md的引用,杜绝在CLAUDE.md中冗余具体规则。
What ships with it
11 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- assets/.memory/INDEX.md 758 B
- assets/.memory/KNOWLEDGE.md 532 B
- assets/.memory/session_log.py 51 B runs code
- assets/.memory/sessions/.gitkeep 1 B
- assets/AGENTS.md 5.7 KB
- assets/CHANGELOG.md 575 B
- assets/CLAUDE.md 310 B
- assets/SESSION_LOG.md 747 B
- assets/TODO.md 485 B
- reference/rules-generation-guide.md 7.6 KB
- reference/tracking-files-guide.md 15 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 106 lines · 117 tokens per session scan A 4e867b07761e
build-memory is a skill published in the GitHub repository max-doo/build-memory (5 stars, last pushed 4mo ago), licensed MIT. It adds 117 tokens to every session and 2,246 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
knowledge-ingest
Ingest documents, articles, conversations, or supplied text into Knowledge with retained originals, sourced claims, entity updates, timelines, and cross-links; also learn durable lessons from a set of conversations, transcripts, or past sessions (/learn), including the Learn from conversations and Learn from Memory…
forget
Remove a personal fact, preference, relationship detail, topic, or prior event from Muse's active memory and stop existing copies or automations from bringing it back. Use for explicit requests such as 'forget that', 'don't remember this about me', or 'remove that from your memory'. Do not use when 'forget it' merely…
mem0-oss-to-platform
Plan, then execute, a migration of a project from the mem0 open-source / self-hosted SDK (local Memory class) to the mem0 Platform / hosted SDK (MemoryClient). TRIGGER when: the developer wants to move, switch, or migrate mem0 off OSS/self-hosted to the hosted API, e.g. "migrate my mem0 setup to the platform", "switch…
Cortex
LifeOS memory, prior-session recall, and learning capture. USE WHEN capture this learning, document this learning, what did we learn recently, recent learnings, cortex, knowledge, knowledge base, search knowledge, what do we know about, archive, harvest, knowledge status, develop note, add to knowledge, add a people…
memory
Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.
ha-data-stores
Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…