markdown-knowledge

将本地 Markdown 知识库与 OpenClaw 集成,支持语义检索和上下文注入。仅在用户触发时检索(搜索知识库、查一下知识库等),不主动注入。

3,891 stars

Best use case

markdown-knowledge is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

将本地 Markdown 知识库与 OpenClaw 集成,支持语义检索和上下文注入。仅在用户触发时检索(搜索知识库、查一下知识库等),不主动注入。

Teams using markdown-knowledge should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/markdown-knowledge/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/aaronjager92/markdown-knowledge/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/markdown-knowledge/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How markdown-knowledge Compares

Feature / Agentmarkdown-knowledgeStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

将本地 Markdown 知识库与 OpenClaw 集成,支持语义检索和上下文注入。仅在用户触发时检索(搜索知识库、查一下知识库等),不主动注入。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Markdown Knowledge Base

将您的本地 Markdown 知识库与 OpenClaw 集成,让 AI 助手能够基于您的专业知识回答问题。

## 核心原则

**触发式检索** - 仅在用户明确要求时检索知识库,不主动注入。

## 使用流程

### 1. 收到用户触发词 → 检索知识库

当用户说以下内容时,调用 search 动作:
- "搜索知识库"
- "查一下知识库"
- "知识库里..."

### 2. 搜到结果 → 注入上下文并回答

```python
# 调用示例
results = action_search("用户问题关键词")
```

### 3. 搜不到结果 → 明确告知

告诉用户"知识库中没有找到相关信息",然后基于通用知识回答。

## 命令

| 命令 | 说明 |
|------|------|
| `python3 knowledge_base.py build` | 构建/更新索引 |
| `python3 knowledge_base.py search <词>` | 搜索知识库 |
| `python3 knowledge_base.py stats` | 查看统计 |
| `python3 knowledge_base.py init` | 初始化配置 |

## 安装

```bash
clawhub install markdown-knowledge
python3 ~/.openclaw/skills/markdown-knowledge/scripts/knowledge_base.py init
python3 ~/.openclaw/skills/markdown-knowledge/scripts/knowledge_base.py build
```

## 配置

编辑 `~/.openclaw/skills/markdown-knowledge/config.json`:

```json
{
    "knowledge_path": "~/Knowledge",
    "index_path": "~/.openclaw/skills/markdown-knowledge/index.json",
    "search_top_k": 3,
    "auto_refresh": false
}
```

## 隐私说明

- ✅ **触发式检索** - 仅用户明确要求时检索
- ❌ **无全局注入** - 不会主动注入知识库内容
- ❌ **无后台监听** - 不在后台自动运行

## 文件结构

```
markdown-knowledge/
├── SKILL.md
├── scripts/
│   ├── knowledge_base.py    # CLI 入口
│   └── knowledge_base.py     # 主脚本
├── src/
│   ├── __init__.py
│   ├── config.py           # 配置加载
│   ├── actions.py          # OpenClaw 动作
│   └── knowledge_core.py   # 核心检索逻辑
├── references/
│   └── PROJECT.md          # 详细文档
└── assets/
```

Related Skills

Knowledge Management System

3891
from openclaw/skills

> Turn tribal knowledge into searchable, maintained organizational intelligence. Stop losing expertise when people leave.

rag-knowledge-assistant

3891
from openclaw/skills

基于向量数据库的 RAG(检索增强生成) 知识库助手。支持语义检索、多格式文档 (PDF/Word/Excel/Markdown) 处理、智能问答。使用 Chroma 向量库 + BGE-M3 Embedding 模型。适用于从 knowledge 目录快速检索信息、回答基于文档的问题。触发词:"从知识库查"、"检索文档"、"RAG 查询"、"向量搜索"、"语义检索"等。

marketing-copy-knowledge

3891
from openclaw/skills

小黑老師 邱煜庭設計。Meta 廣告文案、Google 廣告文案、社群貼文:用 FABE x SPIN 產出更能轉換的廣告文案。支援 freemium/付費(X-Api-Key credits)。

markdown-extract Skill

3891
from openclaw/skills

Extract clean markdown from any URL using the markdown.new API.

knowledge-gaps

3891
from openclaw/skills

Track questions Hans failed to answer and flag missing knowledge

markdown-sync-pro

3891
from openclaw/skills

Markdown 一键同步到 Notion、GitHub Wiki、Medium 等平台

knowledge-forge

3891
from openclaw/skills

Transform raw personal experience, case studies, business documents, or draft content into transferable cognitive assets -- structured knowledge that others can understand, remember, and apply. Use this skill when users want to turn experience or case studies into teachable content, redesign presentations for maximum retention, create course outlines from domain expertise, crystallize knowledge into shareable documents or knowledge cards, convert know-how into teachable answers, or any scenario where experience must become portable and transferable.

saved-markdown

3891
from openclaw/skills

Publish Markdown, HTML, and Slides pages, reports, and documents anonymously to https://saved.md. **TRIGGER THIS SKILL when ANY of the following are true:** 1. User asks to CREATE content that is naturally document-like (reports, summaries, guides, docs, pages, tables, analysis) 2. User mentions markdown, publishing, sharing, or making something public 3. The response you're about to generate is structured text with headers, tables, or formatted sections 4. User asks for anything that could be a "page" or "document" output 5. User asks for slides, a slide deck, a presentation, or a "deck" output **When in doubt: TRIGGER.** (User can always choose local-only) **ALWAYS offer four options:** (1) one-shot publish, (2) interactive edit-before-publish, (3) local-only, (4) enhance.

knowledge-answer

3891
from openclaw/skills

Current Date: $DATE$. Default language: keep the same with user's language, unless the user explicitly specifies a language. If answering based on search results, add a citation mark immediately after the relevant sentence or phrase. 2. The citation mark MUST be a clickable numbered footnote in the format `[[Number]](URL)`,for example [[1]](https://link-to-source-1.com). At the end, there shoul...

markdown-to-pdf

3891
from openclaw/skills

Convert Markdown files to beautiful PDF documents. Supports custom styling, code highlighting, and multiple output options. Use when users need to convert MD to PDF for documentation, notes, reports, or sharing.

knowledge-sync

3891
from openclaw/skills

Real-time knowledge base synchronization for AI assistants. Supports inotifywait file monitoring, Git auto-push/pull, Nutstore sync, and multi-device consistency. Use for maintaining knowledge continuity across servers and local devices.

File to Markdown — Skill

3891
from openclaw/skills

## Overview