Token导航 LogoToken导航

Agent Skill · 研究检索

memory-protocol(内存协议)

memory-protocol 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

memory-protocol 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 21,311。

总安装 4,896周安装 225GitHub Stars 2下载 1,568核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:memory-protocol(内存协议)
来源仓库:https://github.com/jwilger/agent-skills
仓库路径:skills/memory-protocol
安装命令:
npx skills add https://github.com/jwilger/agent-skills --skill memory-protocol
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jwilger/agent-skills --skill memory-protocol

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

memory-protocol 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。它适用于研究检索类任务,可帮助 Agent 理解和实施记忆相关的协议规范。

通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 核验具体用法和功能边界。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。使用时需注意该技能属于研究检索类别,主要功能聚焦于信息定位而非直接执行系统级操作。

来源仓库内路径:skills/memory-protocol

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/jwilger/agent-skills --skill memory-protocol;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

memory-protocol 怎么安装?

在终端执行 npx skills add https://github.com/jwilger/agent-skills --skill memory-protocol。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

memory-protocol 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

memory-protocol 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/jwilger/agent-skills --skill memory-protocol 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

memory-protocol 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

memory-protocol 用的人多吗?

公开数据是累计安装 4,896 次,近一周安装 225 次,下载 1,568 次,GitHub 2 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

memory-protocol 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
memory-protocol

内存协议 · 本页

4,8962执行命令未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Memory Protocol

Value: Feedback -- accumulated knowledge creates compound feedback loops across sessions. What you learn today should accelerate tomorrow's work.

Purpose

Teaches the agent to systematically store and recall project knowledge across sessions using the Memento MCP knowledge graph.

Your long-term memory (training data) and short-term memory (context window) are excellent, but mid-term memory for project-specific knowledge outside the current context is poor. Memento addresses this gap by persisting a knowledge graph across sessions and projects.

Solves: context loss between sessions, repeated debugging of known issues, rediscovery of established conventions, repeated user corrections for the same mistakes.

Practices

Verify Memento MCP Availability

Before proceeding, confirm that Memento MCP tools are available (mcp__memento__semantic_search, mcp__memento__create_entities, etc.).

If Memento MCP tools are NOT available, stop and inform the user:

"The memory-protocol skill requires Memento MCP, but I don't have access to mcp__memento__* tools. To enable memory persistence, install and configure the Memento MCP server (https://github.com/gannonh/memento-mcp). Without it, this skill cannot function and I will proceed without cross-session memory."

Then continue working without memory protocol practices — do not attempt a file-based workaround.

Anti-Pattern: File-Based Memory When Memento Is Available

When this skill is active and Memento MCP tools are available, do NOT use any file-based memory system for cross-session knowledge storage. This includes the built-in memory/ directory, MEMORY.md index, auto-memory features, or any other file-based persistence mechanism. All cross-session memory storage goes through Memento MCP tools exclusively.

File-based memory systems and Memento serve the same purpose — persisting knowledge across sessions. Using both creates split-brain: knowledge stored in files is invisible to Memento searches, and knowledge in Memento is invisible to file reads. Pick one. When this skill is loaded, Memento is the one.

Note: this does NOT prohibit WORKING_STATE.md (which is crash-recovery infrastructure, not cross-session memory) or project documentation files (which are deliverables, not memory).

Recall Before Acting — NON-NEGOTIABLE

Before starting any non-trivial task, recall relevant past knowledge. This step is mandatory. Do not skip it because "this seems simple" or because you believe you remember from a prior session — you do not retain memory between sessions.

Recall triggers:

  • Starting any non-trivial task
  • Making architectural or design decisions
  • Unsure about a project convention
  • Before asking the user a question (it may already be answered)

For error-triggered recall, see the dedicated section below.

Apply Multi-Dimensional Search (next section) to every recall event.

How to recall — all three steps are required:

  1. Search: mcp__memento__semantic_search — query describing the current work, limit 10. This returns summaries only — not the full picture.
  2. Open: mcp__memento__open_nodes — for EVERY relevant entity returned by search, call open_nodes to retrieve the complete entity: all observations, all relations, full context. Do NOT skip this step. Semantic search returns partial data; the full entity often contains critical details (caveats, corrections, related warnings) that the search summary omits. Skipping open_nodes means you are acting on incomplete information.
  3. Traverse: Follow relations on opened entities to discover connected knowledge. Call open_nodes on each related entity. Continue traversing until results are no longer relevant. Relations like depends_on, contradicts, supersedes, and part_of frequently point to information that changes how you should act — a fix that depends on a workaround, a convention that was later corrected, a decision that was superseded.

Skipping steps 2 or 3 defeats the purpose of a knowledge graph. A flat keyword search could do step 1 alone — the graph's value is in the connections between knowledge. If you only search and never open or traverse, you will miss counter-information, corrections, and dependencies that would have prevented mistakes.

IMPORTANT: Do NOT use mcp__memento__read_graph — memories span all projects and the graph is too large to be useful.

Multi-Dimensional Search

Every recall event requires at least two searches — not just one. The reason: agents consistently search for the technical topic but miss process and workflow learnings that would prevent repeated mistakes. Prior session logs show patterns of the same user corrections recurring (team member usage, ADR process, TDD workflow, build commands, approval process) because agents only searched for the feature name and never for process learnings about the *type of work* being done.

Required search dimensions:

  1. Technical query: the specific topic, error, feature, or domain concept
  2. Process query: learnings about this *type of work* — mistakes, corrections, workflow insights, conventions for this kind of task
About to...Also search for...
Do TDD work"TDD process mistakes", "ping-pong pairing lessons"
Spawn agents/subagents"team member usage", "agent coordination issues"
Debug an error"debugging workflow mistakes", prior error occurrences
Create an ADR"ADR process", "ADR mistakes"
Commit/PR/merge"commit conventions", "approval process"
Any process step"[process] corrections", "[process] lessons learned"

This table is non-exhaustive. The principle: always ask "what have I learned about doing *this kind of thing*?" in addition to "what do I know about *this specific thing*?"

Error-Triggered Recall — NON-NEGOTIABLE

This is separated from the general recall triggers because error-triggered recall is where agents most consistently fail to search memory. The pattern: an error occurs, the agent immediately starts debugging from scratch, burns through multiple fix attempts, and only much later (if ever) thinks to check whether this problem was solved before. This wastes time and repeats past work.

Fires on:

  • Any error message, stack trace, or unexpected behavior
  • Any test failure
  • Any hook failure (pre-commit, CI, linter)
  • Any process correction from the user ("no, you should do X instead")
  • Any issue not resolved by the immediate obvious fix

The rule: Search memory BEFORE attempting a fix. Not after three failed attempts. Not after spending 10 minutes debugging. Before.

Apply multi-dimensional search:

  • Search for the specific error message or symptom
  • Search for process learnings about this type of situation (e.g., "debugging Node.js module errors", "test failure patterns in this project")

If you've been corrected by the user: search for whether this correction (or a similar one) was already stored in memory. If it was, you failed to recall — acknowledge this and reinforce the memory with updated context.

Store After Discovery

After solving a non-obvious problem, learning a convention, or making a decision, store it immediately — do not wait, you will lose context.

What to store:

  • Solutions to non-obvious problems (with error message as search term)
  • Project conventions discovered while working
  • Architectural decisions and their rationale
  • User preferences for workflow or style
  • Tool quirks and workarounds
  • User corrections — especially process corrections

What not to store:

  • Obvious or well-documented information
  • Temporary values or session-specific facts
  • Verbose narratives (keep entries concise and searchable)

Always search before creating — mcp__memento__semantic_search first. If a related entity exists, extend it with mcp__memento__add_observations rather than creating a duplicate.

Entity naming: <Descriptive Name> <Project> <YYYY-MM> (e.g., "Cargo Test Timeout Fix TaskFlow 2026-01")

Observation format:

  • Project-specific: "Project: <name> | Path: <path> | Scope: PROJECT_SPECIFIC | Date: YYYY-MM-DD | <insight>"
  • General: "Scope: GENERAL | Date: YYYY-MM-DD | <insight>"
  • Each observation must be a complete, self-contained statement

Relationships — ALWAYS create at least one after creating or updating an entity. Use mcp__memento__create_relations to link to related entities. Active-voice relation types: implements, extends, depends_on, discovered_during, contradicts, supersedes, validates, part_of, related_to, derived_from.

See references/memento-protocol.md for entity type table, observation format guide, relationship table, traversal strategy, and examples.

Subagent Responsibilities

This protocol applies to both the main agent AND any subagents to which work is delegated. When instructing a subagent, include the memory protocol requirement explicitly.

Subagents must:

  • Search Memento before beginning their delegated task
  • Apply multi-dimensional search (technical + process queries)
  • Store any new insights discovered during their work
  • Create relationships to existing entities when applicable

Factory Memory

When running inside a pipeline or factory workflow, the pipeline stores operational learnings in .factory/memory/ to optimize future runs.

Types of learnings tracked:

  • CI patterns: Which change types cause CI failures
  • Rework patterns: Common rework causes by gate
  • Pair effectiveness: Which engineer pairs are most effective in which domains
  • Domain hotspots: Files and modules that frequently trigger findings

Standalone users can ignore factory memory; the standard memory practices above remain unchanged.

Prune Stale Knowledge

When you encounter a memory that is no longer accurate (API changed, convention abandoned, bug fixed upstream), update or delete it. Wrong memories are worse than no memories.

Pruning triggers:

  • Memory contradicts current observed behavior
  • Referenced files or APIs no longer exist
  • Convention has clearly changed

Store Before Context Loss

Before context compaction or at natural stopping points, proactively store any unsaved discoveries before knowledge is lost to truncation. This is your last chance before the knowledge evaporates.

WORKING_STATE.md for Long-Running Sessions

For sessions lasting beyond a single task (pipeline runs, multi-slice TDD, team coordination), maintain a WORKING_STATE.md file as insurance against context compaction and crashes.

  • Location: .factory/WORKING_STATE.md (pipeline mode) or project root
  • Update cadence: after every significant state change
  • Read cadence: at session start, after compaction, after any interruption

See references/working-state.md for the full format and examples.

Self-Reminder Protocol

See CONSTRAINT-RESOLUTION.md in the template directory for the consolidated self-reminder protocol (frequency, combined re-read list, and post-compaction rules).

Enforcement Note

Advisory in all modes. Recall and storage discipline are self-enforced. The constraint against read_graph is gating: the tool will return unhelpful results, acting as a natural deterrent.

Hard constraints:

  • Recall before acting on non-trivial tasks: [RP] -- if Memento is unavailable, document the gap, continue without memory, inform user.

Constraints

  • "At least two searches -- not just one": Two searches means two semantically different queries exploring different dimensions of the problem. Searching "auth middleware" and "authentication middleware" is one search with a synonym, not two searches. The spirit is: explore both the technical dimension (what technology/pattern) and the process dimension (what decisions/conventions exist).
  • "Non-trivial task" threshold: A task is non-trivial if its outcome depends on project context -- conventions, prior decisions, architectural choices, or domain knowledge. A task is trivial if any competent agent would produce the same output regardless of project history. When in doubt, recall. The cost of an unnecessary search is seconds; the cost of missing relevant context is rework.

Verification

After completing work guided by this skill, verify:

  • Searched memory (semantic_search) before starting the task
  • Searched for process/workflow learnings, not just technical topic (multi-dimensional search)
  • Searched memory on every non-trivial error before attempting fixes
  • Stored discoveries as Memento entities with structured observations
  • Related entities linked with create_relations
  • Subagents instructed to follow the memory protocol
  • No stale or contradicted memories left uncorrected
  • WORKING_STATE.md maintained for long-running sessions
  • Self-reminder protocol followed (state re-read every 5-10 messages)

Dependencies

This skill requires Memento MCP. For enhanced workflows, it integrates with:

  • debugging-protocol: Search memory before starting the 4-phase investigation
  • user-input-protocol: Store user answers to avoid re-asking the same questions
  • tdd: Store test patterns and domain modeling insights between sessions
  • pipeline: Pipeline controllers use WORKING_STATE.md and self-reminder to maintain role discipline across long autonomous runs
  • ensemble-team: Team coordinators use self-reminder to prevent role drift during multi-agent sessions

Missing a dependency? Install with:

npx skills add jwilger/agent-skills --skill debugging-protocol

平台分布

Codex

35.25%
按下载量换算553

Claude

29.28%
按下载量换算459

Cursor

17.52%
按下载量换算275

Gemini CLI

9.12%
按下载量换算143

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/jwilger/agent-skills --skill memory-protocol 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills