build-memory

build-memory is a skill for Claude Code, Codex from max-doo/build-memory. It costs 117 tokens per session (2,246 once invoked), scanned A, original, MIT.

A workspace setup and maintenance guide for files such as AGENTS.md, CLAUDE.md, changelogs, session logs, and task lists.

In plain words
What is it for?
Use it to initialize or audit a workspace, maintain its tracking files, record sessions, and keep project instructions organized.
Why use it?
It provides a consistent way to record project rules, work history, and follow-up tasks without silently overwriting existing information.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

Good fit Use it to initialize or audit a workspace, maintain its tracking files, record sessions, and keep project instructions organized.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/max-doo/build-memory/build-memory-zh
Install

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.

Any agent
npx skills add max-doo/build-memory --skill build-memory-zh
Clone the repo
git clone --depth 1 https://github.com/max-doo/build-memory

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for build-memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/max-doo/build-memory/build-memory-zh/github.svg)](https://agentmods.dev/skills/max-doo/build-memory/build-memory-zh)
Your own site
<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.

agentmods 80×15 button for build-memory

Your own site · 80×15
<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>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,246 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 1mo ago against content hash 4e867b07761e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 1 executable file (assets/.memory/session_log.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/build-memory-zh/SKILL.md · 106 lines

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 等——在写入前先停下并询问用户:暂时跳过,或者简述项目生成骨架。不要盲目填充占位符。

对于非空工作空间,输出一份《重构计划清单》,明确列出:

  1. 缺少哪些基础设施(如 .memory/session_log.py 需要物理拷贝)。
  2. 发现了哪些现有的项目核心业务规则、评价原则等,并明确承诺这些内容将被原封不动地保留。
  3. 计划如何重组 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 中冗余具体规则。

Read the full file on GitHub · 106 lines

Changes

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.

  1. 1mo ago First seen · 106 lines · 117 tokens per session scan A 4e867b07761e

Subscribe to this mod's changes

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.

Related

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…

openclaw/openclaw · 79 tokens

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…

asgeirtj/system_prompts_leaks · 74 tokens

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…

mem0ai/mem0 · 217 tokens

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…

danielmiessler/LifeOS · 184 tokens

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.

opensquilla/opensquilla · 44 tokens

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…

shiwenwen/hope-agent · 115 tokens