context-memory
Uses context-eng MCP memory tools to search, save, and manage local project notes in ~/.context/. Use when starting tasks in a context-eng project, when the user mentions memories, notes, staging, promote/demote, or when AGENTS.md/CLAUDE.md reference memory_search.
- License 许可
- MIT
- 最近更新
- 2026-10-27
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- context-memory
- description
- Uses context-eng MCP memory tools to search, save, and manage local project notes in ~/.context/. Use when starting tasks in a context-eng project, when the user mentions memories, notes, staging, promote/demote, or when AGENTS.md/CLAUDE.md reference memory_search.
02 资源文件 2
- 参考文档memory.md620 B
- 参考文档repo_map.md9.7 KB
03 SKILL.md 正文
Context memory
Local notebook at ~/.context/. Agents use MCP tools only — never read SQLite files.
Task loop
search → work → maybe create
- Project DB is already open from MCP
--projectorprojectPathon a call; bind only after switching repos. - Search with the user's request at task start.
- Work using returned notes as context (0–50 hits, ~4000 tokens total).
- Create at most one note if something durable changed.
Skip search hits when the tool says no matching memory.
When to use each tool
| Tool | Verb | Use when |
|---|---|---|
memory_bind |
attach | User switched repos mid-session (engine already created the DB) |
memory_map |
index | Need category names, counts, staging, or map.md paths |
memory_search |
retrieve | Every task start; pass the user's request as query |
memory_create |
save | A decision, constraint, mistake, preference, or workflow worth keeping |
memory_edit |
patch | Correct text, labels, or category of an existing note |
memory_promote |
graduate | User confirms a staging note should be searchable |
memory_demote |
waitlist | Hide a searchable note from default search |
memory_delete |
discard | Remove a staging note the user rejects |
Do not write task recaps, transient debugging, or facts already in the repo.
Search
- Omit
categoriesto search all; pass 1–4 names to narrow. - Default
filters.scope:both(global habits + this project). - Staging is excluded unless
includeStaging: true. - Prefer project hits over global; prefer newer over older.
Write
- One sentence, one claim. Hard cap 800 tokens; aim much shorter.
scope:global(cross-project habits) orproject(this repo).- Built-in categories:
instruction,mistake,preference,decision,constraint,workflow. - Auto-promote on create:
instruction,decision,constraint,mistake. - Stay in staging on create:
preference,workflow, custom categories.
Staging lifecycle
create → staging
auto-promote (decision/constraint/mistake/instruction) → searchable
memory_promote (user) → searchable
memory_delete → gone
memory_demote → back to staging
Promoted rows cannot be deleted; demote first.
Errors
Search returns plain text. Write tools return JSON. On failure: { "error": "<CODE>", "message": "..." }.
Common codes: EMPTY_CONTENT, NOT_ONE_SENTENCE, TOO_LONG, INVALID_CATEGORY, NOT_FOUND, NOT_STAGING.
Reference
Full tool contract: system_prompts/rules.md
04 同仓库更多 Skills
recall
Show memories about a task or topic before starting work.
recall
Show memories about a task or topic before starting work.
postsession
Review this conversation and save one useful learning when explicitly invoked.
postsession
Review this conversation and save one useful learning when explicitly invoked.
typesafe-ai
Build AI-powered software with TypeSafe: small units of AI intelligence you can use like programming primitives. Its System One models, including Jev, turn natural language and application state into typed judgments and probabilities that code can combine. Use when a feature needs programmable common sense, when brainstorming what AI could make possible in an app, or when an LLM prompt-and-parse step could become a structured decision. Applications include routing, ranking, extraction, verification, and interactive experiences; these are starting points, not the limits. Read live docs and cookbooks to find useful patterns and discover new combinations.
recall
Show memories about a task or topic before starting work.