← 返回 Skills 市场
warren2008-2020-spec

Obsidian Dual-Layer Knowledge Base

作者 warren2008-2020-spec · GitHub ↗ · v0.2.0 · MIT-0
cross-platform ⚠ pending
23
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install obsidian-knowledge-base
功能描述
Transforms Obsidian into a dual-layer knowledge base with daily incremental ingestion, structured indexing, and AI-accessible summaries for smooth context in...
使用说明 (SKILL.md)

SKILL.md — Obsidian Dual-Layer Knowledge Base System

Version: 0.2 | Updated: 2026-05-22 Skill Name: obsidian-knowledge-base Tags: knowledge-management, obsidian, rag, agent-memory, daily-pipeline Install: npx clawhub@latest install obsidian-knowledge-base


1. Skill Overview

Turn Obsidian into a Dual-Layer Knowledge Base for AI Agents, supporting the full pipeline: daily incremental writes → structured indexing → context injection.

  • INBOX Layer: Raw material entry (articles/conversations/logs), unstructured
  • WIKI Layer: Structured knowledge (concept cards + Q&A cards), directly callable by AI

Core Value: Solve the "knowledge base paralysis" problem — knowledge gets written in, but the AI starts from scratch every time because it doesn't know what's in the base.


2. Directory Structure

Obsidian Vault/
├── INBOX/                          # Input layer (raw materials)
│   ├── articles/                   # Articles (daily scheduled writes)
│   ├── conversations/            # Conversation records
│   └── 日志/                    # Work logs (date-indexed)
└── wiki/
    ├── qa/                        # Q&A knowledge cards
    │   ├── index.md              # Q&A index (by category)
    │   └── Q-分类-摘要.md
    └── concepts/                  # Concept cards (deep structure)
        ├── index.md              # Concept card index
        ├── 概念-主题名.md
        └── ...

3. Knowledge Base Scale & Context Strategy

Layer File Count Raw Size How It Enters Context
INBOX/articles Daily incremental Raw material Not injected; searched on demand
wiki/qa ~200-500 cards ~500KB-1MB Daily 6KB summary injected
wiki/concepts ~20-100 cards ~50-100KB Searched on demand

Context Strategy (Progressive Disclosure):

  • At startup: Run wiki_daily_brief.py → generate 6KB category summary → inject into context
  • During tasks: Specific question → tdai_memory_search / wiki_search → read raw snippet (~700 chars)
  • Forbidden: Do not pour full wiki content into context (session limit: 200KB)

4. Naming Conventions

4.1 INBOX/articles/

【Category】YYYY-MM-DD-Title.md
Example: 【Industry Research】2026-05-22-Some Industry Deep Dive Summary.md

Category Tags: 城市更新 / 物业管理 / 土地市场 / 楼市分析 / 城投转型 / 政策速递 / 行业研究 / 他山之石

4.2 wiki/qa/

Q-Category-ContentSummary.md
Example: Q-IndustryResearch-WhatAreKeyPointsOfCommercialPropertyLeaseManagement.md

4.3 wiki/concepts/

Concept-TopicName.md
Example: Concept-CityRenewal.md

5. Card Templates

5.1 Q&A Card Template (frontmatter)

---
type: qa
date: 2026-05-22
title: Q-Category-ContentSummary
tags: [Category]
scenarios: [Report Writing/Article Writing/Policy Research]
keywords: [keyword1, keyword2]
operation: knowledge-query
---

## Question
(Specific question)

## Answer
(Complete answer, cite the source text, do not generalize)

5.2 Concept Card Template (frontmatter)

---
type: concept
date: 2026-05-22
title: Topic Name
tags: [Category, Subcategory]
source: Source
summary: One-sentence core conclusion
---

# Concept: Topic Name

## When to Use
When encountering the following keywords/scenarios, prioritize this card:
- Keyword 1
- Keyword 2

## Core Conclusion (One Sentence)

## Detailed Content

## Source/Evidence

6. Filter Rules (Mandatory)

Content PROHIBITED from writing to wiki/qa/ and wiki/concepts/:

Category Examples Correct Destination
Work logs / daily matters "Today's completed work", "Core completion items" INBOX/日志/
OpenClaw operations config "How to batch process documents", "cron config" skills/SKILL.md
Memory/session mechanisms "OpenClaw memory scheme", "session structure" memory/ (non-wiki)
Scheduled tasks/Cron "How to write cron tasks" skills/SKILL.md
Technical troubleshooting "API Key invalid troubleshooting" skills/SKILL.md

Content ALLOWED in wiki:

Any structured knowledge refined through analysis and processing, including but not limited to:

  • Industry/domain knowledge (concepts, models, cases, data)
  • Policy interpretation and applicable scenarios
  • Core conclusions and methods from research reports
  • Standards and operational guidelines
  • Cross-domain comparative analysis

Rule of Thumb: If a user can directly use it to write a report or make a decision, it's knowledge.


7. Daily Pipeline

05:00 ── INPUT END ──────────────────────────────
│
│  cron: Daily news scraping
│  → Scrape news → write to INBOX/articles/
│  → Push Word summary to relevant people
│
│  Note: Do NOT write to wiki/ directly; 8:30 handles it
│
08:30 ── OUTPUT END (Knowledge Base Injection) ──
│
│  cron: Daily knowledge base injection
│  → Scan INBOX/articles/ for today's new files
│  → Write to wiki/qa/ (extract Q&A pairs)
│  → Write to wiki/concepts/ (extract concept cards)
│  → Filter out operational content (see Section 6)
│  → Run wiki_daily_brief.py to update daily summary
│  → Push summary to owner (X new cards today, Z total in base)
│
│  At Session Startup (automatic):
│  → Run wiki_daily_brief.py
│  → Inject 6KB category summary into context
│  → AI knows what's available in the knowledge base today

8. Retrieval Flow (Per Task)

Receiving an analysis/writing task
  → wiki_daily_brief already injected at startup (6KB summary)
  → wiki_search(topic keywords) → match Q&A cards
  → High match → use the answer directly
  → Low match → wiki_search(subtopic) → read concept card
  → Still insufficient → search INBOX/articles/ raw materials
  → Last resort → web_search

9. wiki_daily_brief.py Script

#!/usr/bin/env python3
"""
wiki_daily_brief.py
Run at first session startup each day. Generates a wiki knowledge base
daily summary so the model knows what's available in the knowledge base.

Output: ~/.openclaw/workspace/memory/wiki_daily_brief.md
"""
WIKI_QA_DIR = "/path/to/Obsidian/wiki/qa"
OUT = "~/.openclaw/workspace/memory/wiki_daily_brief.md"

# Script logic:
# 1. Scan all .md files in wiki/qa/ (excluding index.md)
# 2. Extract frontmatter tags, count by category
# 3. Take top 3 per category as examples, generate ~6KB summary
# 4. Write to OUT, ready for session startup injection

10. Daily Summary Format

# Wiki Knowledge Base Daily Summary
> Generated: 2026-05-22 | Total: 230 Q&A Cards

---

## Available Knowledge Cards (By Category)

### Industry Research (83 cards)
- **What is the core content of「Some Report」?** (Source: `Q-IndustryResearch-SomeReport.md`)
- ...
  - ...and 80 more

### City Renewal (66 cards)
- ...

## Usage Guide
To query specific card content, call `tdai_memory_search` or `wiki_search`.

11. Installation

# Method 1: ClawHub
npx clawhub@latest install obsidian-knowledge-base

# Method 2: Manual
cp -r obsidian-knowledge-base ~/.openclaw/skills/

12. Use Cases

  • Knowledge workers who need AI to write reports, analysis, or official documents
  • Teams that want AI to have "memory" instead of starting from scratch every time
  • Scenarios with daily incremental material inputs (news, reports, data)
  • Teams that want knowledge base and AI context to work together, not in silos
能力标签
requires-sensitive-credentials
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install obsidian-knowledge-base
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /obsidian-knowledge-base 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.2.0
General-purpose rewrite, removed vertical industry content
元数据
Slug obsidian-knowledge-base
版本 0.2.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Obsidian Dual-Layer Knowledge Base 是什么?

Transforms Obsidian into a dual-layer knowledge base with daily incremental ingestion, structured indexing, and AI-accessible summaries for smooth context in... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 23 次。

如何安装 Obsidian Dual-Layer Knowledge Base?

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

Obsidian Dual-Layer Knowledge Base 是免费的吗?

是的,Obsidian Dual-Layer Knowledge Base 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Obsidian Dual-Layer Knowledge Base 支持哪些平台?

Obsidian Dual-Layer Knowledge Base 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Obsidian Dual-Layer Knowledge Base?

由 warren2008-2020-spec(@warren2008-2020-spec)开发并维护,当前版本 v0.2.0。

💬 留言讨论