Borrowing it
Nothing to install: this file belongs to Zehee/kimi-code-memory-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Zehee/kimi-code-memory-mcp-server/main/AGENTS.mdgit clone --depth 1 https://github.com/Zehee/kimi-code-memory-mcp-serverWrote 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/instructions/zehee/kimi-code-memory-mcp-server/agents-md)<a href="https://agentmods.dev/instructions/zehee/kimi-code-memory-mcp-server/agents-md"><img src="https://agentmods.dev/badge/instructions/zehee/kimi-code-memory-mcp-server/agents-md/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/instructions/zehee/kimi-code-memory-mcp-server/agents-md"><img src="https://agentmods.dev/badge/instructions/zehee/kimi-code-memory-mcp-server/agents-md.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.01641 | $0.01641 |
| Opus 5.5 | $0.00656 | $0.00656 |
| Sonnet 5.5 | $0.00328 | $0.00328 |
| Haiku 4.5 | $0.00164 | $0.00164 |
Grade A, and why
kimi-code-memory-mcp-server AGENTS.md 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 — 145 lines — stays where its author put it; the contents beside it link to each section on GitHub.
强制启动协议-(subagent忽略)
每次新会话开始后、回答用户第一个问题或执行任何可能改变项目状态的操作之前,必须调用 mcp__kimi-memory__bootstrap_workspace()。
必须读取并内化:
essence.md—— 当前工作区什么最重要memoryIndexTree—— 记忆目录结构,关注标记[new]的最近变化recentContext—— 当前 session 的最近对话notesRefs—— 是否有待处理的速记
记忆分类约定
| 类型 | folder | tags | 用途 |
|---|---|---|---|
| 决策 | memory/decisions/ |
decision |
架构、接口、流程决策 |
| 规则 | memory/rules/ |
rule |
编码规范、协作红线 |
| 知识 | memory/knowledge/ |
knowledge |
技术栈、业务背景 |
| 参考 | memory/reference/ |
reference |
外部链接、文档引用 |
| 速记 | notes/ |
scratch |
临时便签,不进入长期精要 |
什么时候必须 remember?
出现以下信号时立即写入 memory/:
- 用户说"我们决定…"、"拍板了" →
memory/decisions/,tagdecision - 用户说"这里必须…"、"红线是…" →
memory/rules/,tagrule - 技术选型、接口约定首次出现 →
memory/knowledge/,tagknowledge - 定位到 bug 根因和修复方案 →
memory/decisions/或memory/knowledge/,tagfix - 编码风格、目录结构、命名规范 →
memory/rules/,tagconvention
什么时候不要 remember?
- ❌ 临时调试命令或探索性代码
- ❌ 用户未确认的推测
- ❌ 一次性报错(没有形成通用结论)
- ❌ 当前会话的临时上下文(由
wire.jsonl自动捕获) - ❌ 已经在
memory/中存在的知识
判断口诀:如果这条信息三天后回头看仍然有价值,才写入 memory/。
决策守卫
准备执行任何可能改变项目状态的操作之前(写文件、改结构、做选择、引入依赖):
- 提取关键词(技术实体 + 动作)
- 并行查询:
search(query, folder="memory")—— 查决策/规则/知识search_context(query)—— 查历史对话
- 命中且一致 → 引用来源后继续
- 命中但矛盾 → 向用户报告冲突,请求澄清
- 未命中但重要 → 询问用户"这是一个新决策,是否记录?"
引用来源的纪律
所有从 memory/ 召回的关键结论,回复中必须标注来源:
- ✅ "根据
memory/decisions/xxx,我们决定…" - ❌ "我们之前决定…"(无来源)
主题追溯
当用户要求追溯某个主题时:
- 确认主题范围
- 用
search_context打捞相关 turns(调用时会自动按 90 秒时间簇扩展并提炼命中的 turns) - 用
list_search_views查看最近的搜索视图,作为 theme 挂载的候选集 - 对搜索命中的 turns 做语义分析,用
tag_theme把 genuinely belongs to the theme 的 turns 逐个挂载到themes/<theme>.json - 如果候选不足,用新的 query 再次
search_context打捞,生成新的 search view - 用
trace_theme输出主题时间线
search_context 已内置提炼能力,不需要单独调用 refine_session_turns。
记忆卫生检查清单
每次调用 remember 前:
- 这条信息三天后还有价值吗?
- 是否已有重复记忆?(先
search) -
folder选对了吗?项目相关不进notes/ -
tags是否包含最贴切的分类标签? - 正文是否包含决策原因/影响范围/相关文件?
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 · 145 lines · 1,641 tokens per session scan A 52359bcc4cf6
kimi-code-memory-mcp-server AGENTS.md is an instructions file published in the GitHub repository Zehee/kimi-code-memory-mcp-server (3 stars, last pushed 1mo ago), licensed MIT. It adds 1,641 tokens to every session, about $0.0066 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 instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.