一键导入
assistant-memory
Manage durable memory safely. Use for explicit remember, recall, forget, or memory-health requests and stable corrections or preferences.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Manage durable memory safely. Use for explicit remember, recall, forget, or memory-health requests and stable corrections or preferences.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Clarify ambiguous or multi-intent requests. Use when the user asks to untangle, structure, or restate what they mean.
Review code and re-review fixes until clean. Use for explicit code review or the workflow Review phase; QA runs only when required.
Create or update V1 skills and contracts. Use for skill scaffolding, contract design, or contract-compliance validation.
Run proportional development phases. Use to plan, build, implement, fix, migrate, or refactor project artifacts.
Generate and rank options. Use light mode for quick improvement scans and deep mode for explicit brainstorming or broad exploration.
Diagnose unknown failures by reproducing and isolating before fixing. Use for debugging, root causes, flaky tests, or unexplained breakage.
| name | assistant-memory |
| description | Manage durable memory safely. Use for explicit remember, recall, forget, or memory-health requests and stable corrections or preferences. |
| triggers | [{"pattern":"remember this|save insight|update memory|what do you know about me|forget this|forget what|recall (my|our|the)|search memory|show memory|memory (status|stats|health)|save (this |my )?preference|my preferences","priority":70,"min_words":3,"reminder":"This request matches assistant-memory. Load and follow this SKILL.md and its contracts before managing memory."}] |
| File | Purpose |
|---|---|
contracts/input.yaml | action (save/recall/update/forget/search), content, entity_type, query |
contracts/output.yaml | action_taken, storage_backend, entity_name, results[], durability_decision, lesson_decision, confirmation |
content is required for save/update; query is required for recall/searchentity_type is required for save — determines the memory entity type (Rule, Preference, Insight, etc.)confirmation stringThe configured local memory backend is the cross-session source of truth when it is available and allowed by policy. If no approved backend exists, do not pretend memory was saved; return a blocked or no-op result and provide the text the user can save manually.
Save, retrieve, update, or remove durable memories through the configured local memory backend while keeping session scratch state, task journals, metrics, PR numbers, issue status, and temporary progress separate from cross-session knowledge.
All cross-session memory is accessed through the configured local memory backend. In this framework that may be memory-graph MCP backed by a local store, a project-approved local file, or another configured local memory tool. Project-local session/task markdown files are for session state only, not cross-session memory storage. If the backend is missing or disallowed, report action_taken: blocked or no_op.
Entity types:
| Type | Purpose | Example |
|---|---|---|
Rule | Behavioral mandates, corrections (highest priority — retrieve via memory_context) | "NEVER skip workflow skills" |
Preference | User coding preferences, working style | "Prefers var when type is obvious" |
Insight | Learned facts from past sessions | "EF Core migration gotcha with nullable columns" |
Project | Codebase / repository | "Assistant Framework" |
Technology | Framework, library, tool | "EF Core", "ASP.NET Core" |
Pattern | Architectural decision | "Clean Architecture", "CQRS" |
Convention | Project-specific convention | "Test naming: Method_Case_Expected" |
{agent_state_dir}/task.md) or carried-forward task packet exists → read it as active task state, not memory.Rule bodies are retrieved on demand. Use the configured memory query/search tools to retrieve rules, preferences, and prior lessons when available.
Use configured local memory tools to record new memory when available:
| What | Tool | Entity Type |
|---|---|---|
| User correction/rule | memory_add_entity | Rule |
| Coding preference | memory_add_entity | Preference |
| Task insight/gotcha | memory_add_insight | Insight (auto-created) |
| Project registration | memory_add_entity | Project |
| Connect entities | memory_add_relation | — |
Do not treat markdown files as cross-session memory. Use project-local session/task files only for session state.
Save only if the fact is durable and useful across sessions:
Skip or refuse:
When a memory request comes from the workflow Learning Controller or assistant-reflexion:
durability_decision: skipped_not_durable.backend_unavailable or policy_disallowed with the lesson text and no-save rationale instead of pretending persistence happened.memory_context("ProjectName") — retrieve relevant project context when the current task depends on prior corrections, preferences, recovery state, or durable lessonsmemory_search("EF Core migration") — find entities by text across the graphmemory_graph() — full dump for debugging or overviewReturn: