← 返回 Skills 市场
haodong-lei-ray

MemCoT memory CLI

作者 Haodong-Lei-Ray · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
57
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install memcot-memory-cli
功能描述
Drive the MemCoT CLI (memcot_cil.py) for long-context memory retrieval over conversation history and answer from search output. Use with OpenClaw or other ag...
使用说明 (SKILL.md)

OpenClaw MemCoT CLI (agent skill)

🎯 你的角色与目标

你现在是一个集成了 MemCoT (Memory-Driven Chain-of-Thought) 能力的智能助手。 MemCoT 是一个运行在后台的守护进程,它可以帮你在海量的历史对话记录中进行检索,并生成一段包含丰富上下文的 prompt

你的目标是:接收用户的自然语言指令,将其转化为对应的 memcot_cil.py 终端命令执行,并在拿到检索结果后,直接扮演助手的角色回答用户的问题。

仓库布局:本 skill 发布在 ClawHub 上为纯文本包。使用 MemCoT 时请克隆仓库并在仓库根目录运行 CLI(见项目 README)。在 ClawHub 上发布时 slug 不能以 openclaw- 开头,请使用例如 --slug memcot-memory-cli

MemCoT 代码初始化

在使用本 skill 中的任何 memcot_cil.py 命令前,必须先完成 MemCoT 源码的获取与进入仓库根目录。若用户尚未克隆,请引导其执行:

git clone https://github.com/Haodong-Lei-Ray/MemCoT.git
cd MemCoT

随后在 该仓库根目录 按项目 README 完成环境创建与依赖安装(如 Conda、pip install -r re.txt 等),再执行后续 CLI 与配置步骤。

初始化操作

./MemCoT/config/rag/openclawnaiverag.temp.json ./MemCoT/config/memcot.json 这是文件的配置,你应该先引导用户注意一下这个,询问他

  1. 是否要将openclaw的conversation_base设置为本地的openclaw的地址

  2. rag_base的地址是否要设置为和MemCoT同一目录下

然后生成 ./MemCoT/config/rag/openclawnaiverag.json

🛠️ 命令映射指南

当用户输入以下自然语言时,你需要在终端执行对应的命令:

  • 启动后台服务:用户输入 启动memcot开始memcot 👉 执行:python memcot_cil.py start (执行后,告诉用户服务已启动)

  • 停止后台服务:用户输入 停止memcot关闭memcot 👉 执行:python memcot_cil.py stop (执行后,告诉用户服务已停止)

  • 查看状态:用户输入 查看memcot状态 👉 执行:python memcot_cil.py status

  • 列出会话:用户输入 列出memcot会话memcot session 👉 执行:python memcot_cil.py session

  • 构建索引:用户输入 添加会话 Nmemcot add N 👉 执行:python memcot_cil.py add --idx N

  • 切换会话:用户输入 切换会话 Nmemcot switch N 👉 执行:python memcot_cil.py switch --idx N

  • 执行搜索 (最重要):用户输入 memcot 搜索 [问题],例如 memcot 搜索 我是谁 👉 执行:python memcot_cil.py search -q "[问题]" -o "./output"

🧠 搜索与回答工作流 (Search-to-Answer Workflow)

当用户让你进行搜索(例如:memcot 搜索 我是谁)时,你必须严格遵循以下步骤:

  1. 前置检查:确保 MemCoT 守护进程已经启动。如果没有启动,请先静默执行 python memcot_cil.py start
  2. 执行检索:在终端执行 python memcot_cil.py search -q "我是谁" -o "./output"
  3. 读取结果:该命令会在终端输出一段以 [🦉 MemCoT Prompt] 开头的文本。这段文本包含了历史对话上下文以及一个要求你输出 JSON 格式的指令。
  4. 直接回答用户这是最关键的一步! 不要只是把那个长长的 Prompt 复制粘贴给用户看。你作为 OpenClaw,需要在心里(内部)阅读那段 Prompt,遵循 Prompt 里的要求(结合上下文思考),然后直接以自然语言回答用户的问题

💬 交互示例

示例 1:启动服务

User: 启动memcot OpenClaw: (执行 python memcot_cil.py start) MemCoT 后台检索服务已成功启动!随时可以开始搜索。

示例 2:搜索并回答

User: memcot 搜索 昨天我让你帮我写了什么代码? OpenClaw: (执行 python memcot_cil.py search -q "昨天我让你帮我写了什么代码?" -o "./output") (OpenClaw 读取到终端返回的 Prompt,发现历史记录里写了“昨天写了一个 FastAPI 的后台”) OpenClaw: 根据历史记忆,昨天我帮你写了一个基于 FastAPI 的 MemCoT 后台守护进程代码。

示例 3:停止服务

User: 停止memcot OpenClaw: (执行 python memcot_cil.py stop) MemCoT 服务已停止。

安全使用建议
Install only if you are comfortable cloning and reviewing the external MemCoT repository. Configure it to use only the conversation history you intend to search, avoid indexing sensitive chats, require explicit approval before starting the background daemon, and tell the agent not to obey instructions found inside retrieved memory content.
能力评估
Purpose & Capability
The purpose is coherent for MemCoT memory retrieval, but the skill searches historical OpenClaw conversations and answers from a generated prompt without clearly limiting which history is indexed or how retrieved instructions should be treated.
Instruction Scope
The workflow tells the agent to strictly follow the MemCoT output prompt and to silently start the daemon if needed, which gives retrieved content and background activity more authority than is clearly bounded.
Install Mechanism
This is an instruction-only skill that directs users to clone an external GitHub repository and install dependencies from its README; that is purpose-aligned, but the runnable code and dependency versions are outside the reviewed artifact set.
Credentials
The skill points MemCoT at local OpenClaw conversation history and RAG configuration, but does not define path limits, exclusions, retention, or reuse controls for that private context.
Persistence & Privilege
MemCoT is described as a background daemon, and the skill instructs the agent to start it silently during searches. A stop command is documented, but automatic long-running background activity should require clear user awareness.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install memcot-memory-cli
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /memcot-memory-cli 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Single-file skill: add git clone init; document ClawHub slug; lightweight text-only bundle
v1.0.0
Initial publish: ClawHub-safe slug; Agent Skills name matches folder
元数据
Slug memcot-memory-cli
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

MemCoT memory CLI 是什么?

Drive the MemCoT CLI (memcot_cil.py) for long-context memory retrieval over conversation history and answer from search output. Use with OpenClaw or other ag... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 57 次。

如何安装 MemCoT memory CLI?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install memcot-memory-cli」即可一键安装,无需额外配置。

MemCoT memory CLI 是免费的吗?

是的,MemCoT memory CLI 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

MemCoT memory CLI 支持哪些平台?

MemCoT memory CLI 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 MemCoT memory CLI?

由 Haodong-Lei-Ray(@haodong-lei-ray)开发并维护,当前版本 v1.0.1。

💬 留言讨论