aaronjager92/markdown-knowledge/SKILL.md
将本地 Markdown 知识库与 OpenClaw 集成,支持语义检索和上下文注入
npx skillsauth add openclaw/skills markdown-knowledgeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
将您的本地 Markdown 知识库与 OpenClaw 无缝集成,让 AI 助手能够基于您的专业知识回答问题。
📖 完整文档: 请参阅 PROJECT.md 获取详细的中英文双语说明。 Full Documentation: See PROJECT.md for complete bilingual documentation.
当用户提问时,AI 应遵循以下流程:
当用户的问题匹配触发词(如"搜索知识库"、"查一下知识库"等)时,调用 search 动作检索本地知识库:
search 动作,输入:用户问题的关键词
如果知识库有相关内容:
如果知识库没有相关内容:
Markdown 文档建议包含以下头部信息(提高检索精度):
---
title: 文档标题
keywords: 关键词1, 关键词2
tags: [标签1, 标签2]
created: 2024-01-15
---
# 文档标题
正文内容...
用户可以直接说以下命令触发知识库操作:
| 用户说法 | 触发动作 | 说明 | |----------|----------|------| | "刷新知识库索引" | rebuild | 立即重建索引 | | "更新知识库" | rebuild | 立即重建索引 | | "重建知识库索引" | rebuild | 立即重建索引 | | "知识库统计" | stats | 查看索引统计 | | "查看知识库" | stats | 查看索引统计 |
clawhub install markdown-knowledge
安装后先构建索引:
python3 knowledge_base.py init
python3 knowledge_base.py build
编辑 ~/.openclaw/skills/markdown-knowledge/config.json:
{
"knowledge_path": "~/Knowledge",
"index_path": "~/.openclaw/skills/markdown-knowledge/index.json",
"search_top_k": 3,
"auto_refresh": true
}
将你的 Markdown 文件放入 ~/Knowledge 目录即可。
| 参数 | 类型 | 默认值 | 说明 |
|------|------|--------|------|
| knowledge_path | string | ~/Knowledge | Markdown 文档目录 |
| index_path | string | ~/.openclaw/skills/markdown-knowledge/index.json | 索引文件路径 |
| search_top_k | number | 3 | 返回结果数量 |
| auto_refresh | boolean | true | 自动刷新索引 |
用户提问
↓
AI 调用 search 动作
↓
检索本地 Markdown 知识库
↓
匹配最相关的文档片段
↓
注入上下文 → AI 回答
lib/global_memory.py 是独立的全局注入模块,默认不启用。
用途:如果被挂载到 OpenClaw 全局,它会在每次对话中自动检索知识库并注入上下文,可能影响所有对话。
当前状态:已禁用,不影响常规使用。
如需启用(仅推荐高级用户):
tools
Use when the user wants to connect to, test, or use the McDonalds service at mcp.mcd.cn, including checking authentication, probing MCP endpoints, listing tools, or calling McDonalds MCP tools through a reusable local CLI.
development
Web scraping platform — Twitter/X data, Vinted marketplace, and general web scraping API
development
SlowMist AI Agent Security Review — comprehensive security framework for skills, repositories, URLs, on-chain addresses, and products (Claude Code version)
data-ai
去除中文文本中的 AI 写作痕迹,使其读起来自然。基于维基百科 AI 写作特征指南,检测 24 种 AI 模式。触发词:humanizer-cn、去除 AI 痕迹、去除 AI 写作痕迹、中文文本人性化。