Knowledge Compiler for Openclaw

An intelligent skill that teaches AI agents to incrementally compile source files into persistent, cross-session wikis for long-term knowledge accumulation.

hanlinlibham
v1.0.1
Apr 9, 2026
0
816
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install auto-wiki

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install auto-wiki using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Knowledge Compiler?

Knowledge Compiler is a sophisticated framework designed to solve the 'short-term memory' problem of AI agents. Instead of starting from scratch every time you begin a new research task, this skill allows agents to build a structured, persistent knowledge base. It functions as a compilation engine that reads source materials, compares new information with existing data, merges insights, and flags contradictions.

By leveraging Openclaw Skills, the agent moves beyond simple RAG (Retrieval-Augmented Generation) to true knowledge synthesis. It organizes information into specific ontology types—such as cognitive models for people or domain structures for industries—ensuring that every interaction with your agent contributes to a growing, reliable ecosystem of data stored locally in Markdown and SQLite.

Knowledge Compiler Use Cases

  • Building a persistent research hub for industry analysis like personal pensions or fintech trends.
  • Creating a cognitive profile of a specific individual to map their mental models and decision patterns.
  • Managing complex domain knowledge where conflicting data points from different sources need to be tracked and resolved.
  • Automating the identification of knowledge gaps in a project and filling them via targeted web searches.
  • Maintaining a clean, linted knowledge base that serves as the 'ground truth' for all subsequent agent tasks.

How Knowledge Compiler Works

  1. The agent identifies the user intent and routes it to one of four modes: recall, ingest, query, or lint.
  2. In ingest mode, the agent parses source files, extracts key entities, and checks them against the existing wiki index.
  3. The skill performs a comparison phase where new data either supports existing conclusions, overturns them, or is marked as contested if a conflict arises.
  4. All pages are validated against a Pydantic schema to ensure frontmatter consistency and metadata integrity.
  5. During recall or query phases, the agent retrieves matched wiki pages and data points from a SQLite store to provide cited, evidence-based answers.
  6. A deep-dive pipeline can be triggered to scan for coverage gaps and autonomously fetch missing information to 'level up' the wiki.

Knowledge Compiler Setup

To get started with Knowledge Compiler in your environment, ensure you have Python 3.8+ and Pydantic installed. Follow these steps to initialize your first wiki:

# Install required dependencies
pip install pydantic

# Initialize a new wiki by triggering an ingest
/auto-wiki ingest "path/to/your/report.pdf" --topic "market-analysis"

# Or enter recall mode to interact with an existing wiki
/auto-wiki recall market-analysis

Note: On first use, the skill will confirm the creation of the .wiki/ directory in your repository root. It is recommended to add this directory to your .gitignore file.

Knowledge Compiler Data Schema & Taxonomy

The skill organizes data using a combination of Markdown files for human-readability and SQLite for high-performance querying.

Component Format Description
Pages Markdown Individual files for entities, concepts, and sources with YAML frontmatter.
Index index.md A master directory of all pages, descriptions, and relationships.
Data Store data.db SQLite database tracking quantitative data points, relations, and version history.
Logs log.md An append-only audit trail of every ingest and modification performed by the agent.
Config meta.yaml Stores wiki metadata, including the chosen ontology type and domain seeds.

Knowledge Compiler Advanced Features

  • Multi-mode routing: Automatically switches between recall, ingest, query, and lint based on natural language triggers.
  • Ontology specializations: Tailors the wiki structure for either cognitive research (people) or domain research (systems/institutions).
  • Semantic Linting: Automatically detects contradictions, duplicates, and coverage gaps across hundreds of pages.
  • Domain Seeds & Validators: Supports community-contributed plugins to enforce industry-standard terminology (e.g., FIBO for finance).
  • Contested Data Tracking: Built-in logic to handle conflicting information by boosting confidence scores or flagging human-review-required disputes.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*