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

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.

agentmods
npx agentmods add skills/max-doo/build-memory/build-memory-zh
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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00117 $0.02246
Opus 5 $0.00059 $0.01123
Sonnet 5 $0.00023 $0.00449
Haiku 4.5 $0.00012 $0.00225

Measured 4d ago against content hash 4e867b07761e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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.mdCLAUDE.mdCHANGELOG.mdSESSION_LOG.mdTODO.md,并补充轻量 .memory/ 支撑目录,用于稳定写入 session log 和沉淀长期经验。

四条不可妥协的规则:

  • 单点事实来源 (Single Source of Truth)。 所有通用的项目规则、命令、技术栈均写入 AGENTS.mdCLAUDE.md 仅作为一个极简的入口,强制要求通过 @AGENTS.md 引用它。禁止在 CLAUDE.md 中重复写具体命令。
  • 脚本化写入 session 记录。 Agent 应优先使用 python .memory/session_log.py 追加 session 记录,而不是手工编辑 SESSION_LOG.md;脚本负责锁、7 天归档和结构化格式。
  • 不静默改写。 未经用户明确同意,不得覆盖或删除已有内容。
  • 真实时间。 写入任何受管文件中的时间戳之前,必须通过 shell 命令(datedate -IsecondsGet-Date 等)获取系统真实时间。不得凭记忆编造时间戳。

模板仅以英文形式存放于 assets/,写入时按目标语言翻译。

工作流

1. 选择语言

对于新建文件:

  • 明确指令(“use English”、“用中文”、“create in Japanese”)→ 使用该语言。
  • 实质性用户输入(除单纯调用外,附带任意语言的指令或上下文)→ 检测该输入的语言。
  • 空调用(仅 /build-memory、“init workspace” 或类似无附加要求的调用)→ 询问用户使用哪种语言,不要猜测。

对于完善已有文件,沿用文件原语言,不进行翻译。

2. 阶段一:审查与提议 (Audit & Propose) - 强制门禁

在任何写入或修改之前,必须先收集事实:

  • 顶层文件与目录
  • 包管理器 / 语言 / 框架(package.jsonpyproject.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.mdCLAUDE.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. 4d 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 2mo ago), licensed MIT. It adds 117 tokens to every session and 2,246 once invoked, about $0.0006 per session on Opus 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

media-ingest

Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. Multi-format handling with entity extraction and backlink propagation. Covers video-ingest, youtube-ingest, and book-ingest subtypes.

garrytan/gbrain · 52 tokens

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…

mem0ai/mem0 · 273 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

agent-memory

../../../engineering/agent-memory/skills/agent-memory/SKILL.md.

alirezarezvani/claude-skills · 0 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