knowledge-agent
它能做什么
这个工具可以根据你过去的笔记创建定制的 AI‘大脑’。你可以围绕某个特定主题收集信息,然后与这个 AI 对话,获取答案。
适用场景
- ✓当你想了解某个特定项目的总结时。
- ✓当你想回忆过去的决定或 bug 修复时。
- ✓当你为学习而整理某个主题的知识时。
技能链接
https://github.com/thedotmack/claude-mem/blob/main/plugin/skills/knowledge-agent/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“创建一个关于 hooks 的‘大脑’,告诉我它有哪 5 种类型,以及每种类型分别在什么时候触发。”
每周 5 个新技能,1 分钟读完。
工作原理
首先,你让工具通过筛选你的笔记,构建一个信息集合(语料库)。然后,你把这个语料库加载到一个 AI 会话中,就可以向它提问了。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Knowledge Agent
Build and query AI-powered knowledge bases from claude-mem observations.
What Are Knowledge Agents?
Knowledge agents are filtered corpora of observations compiled into a conversational AI session. Build a corpus from your observation history, prime it (loads the knowledge into an AI session), then ask it questions conversationally.
Think of them as custom "brains": "everything about hooks", "all decisions from the last month", "all bugfixes for the worker service".
Workflow
Step 1: Build a corpus
build_corpus name="hooks-expertise" description="Everything about the hooks lifecycle" project="claude-mem" concepts="hooks" limit=500
Filter options:
project— filter by project nametypes— comma-separated: decision, bugfix, feature, refactor, discovery, changeconcepts— comma-separated concept tagsfiles— comma-separated file paths (prefix match)query— semantic search querydateStart/dateEnd— ISO date rangelimit— max observations (default 500)
Step 2: Prime the corpus
prime_corpus name="hooks-expertise"
This creates an AI session loaded with all the corpus knowledge. Takes a moment for large corpora.
Step 3: Query
query_corpus name="hooks-expertise" question="What are the 5 lifecycle hooks and when does each fire?"
The knowledge agent answers from its corpus. Follow-up questions maintain context.
Step 4: List corpora
list_corpora
Shows all corpora with stats and priming status.
Tips
- Focused corpora work best — "hooks architecture" beats "everything ever"
- Prime once, query many times — the session persists across queries
- Reprime for fresh context — if the conversation drifts, reprime to reset
- Rebuild to update — when new observations are added, rebuild then reprime
Maintenance
Rebuild a corpus (refresh with new observations)
rebuild_corpus name="hooks-expertise"
After rebuilding, reprime to load the updated knowledge:
Reprime (fresh session)
reprime_corpus name="hooks-expertise"
Clears prior Q&A context and reloads the corpus into a new session.
常见问题
我要怎么创建‘大脑’?
先用 `build_corpus` 命令创建信息集合,再用 `prime_corpus` 把它加载到 AI 中。
我可以用新信息更新‘大脑’吗?
可以。使用 `rebuild_corpus` 更新信息集合,然后用 `reprime_corpus` 让 AI 重新加载新的信息。
什么是‘观察记录’?
它们是你之前留下的记录,例如决策、bug 修复、新功能等。
详情
作者的原始描述
Build and query AI-powered knowledge bases from claude-mem observations. Use when users want to create focused "brains" from their observation history, ask questions about past work patterns, or compile expertise on specific topics.
repo: thedotmack/claude-mem
热度
- GitHub 星标
- 101k
- 排名
- #1273
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
Agent Cost Report
101k让你的智能体生成其活动的详细成本报告。显示在 token 和服务上花费了多少。
claude-mem-install
101k帮助你的智能体在不同环境中设置 Claude-Mem。你可以选择使用本地或远程工作进程,并配置观察功能。
mem-search
101k让你的智能体搜索过去的记忆。适合回忆之前的解决方案,或旧会话中的工作内容。
host-observer
101k帮助你的智能体响应 Claude-Mem 观察者任务。它只能回复“skip_summary”或完整的 XML 观察记录。