Corpus Search for Openclaw

A high-performance semantic search and metadata filtering tool designed for querying structured text databases and literary corpora.

yuzhihui886
v1.0.1
Apr 1, 2026
0
738
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install corpus-search

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 corpus-search 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 Corpus Search?

Corpus Search is a specialized utility within the Openclaw Skills ecosystem designed to work seamlessly with corpus-builder. It enables developers and creative writers to perform deep semantic searches across extensive text libraries, moving beyond simple keyword matching to understand the context and intent of a query. By leveraging vector-based retrieval, it allows users to pinpoint specific writing materials based on complex criteria like emotional tone, scene type, and narrative rhythm.

This tool is particularly valuable for building RAG (Retrieval-Augmented Generation) workflows or managing large-scale datasets where finding high-quality, relevant snippets is critical. Whether you are searching for specific combat descriptions or emotional character beats, Corpus Search provides a robust interface to navigate your data effectively.

Corpus Search Use Cases

  • Retrieving specific action or combat sequences from novel databases using semantic queries.
  • Filtering literary snippets based on emotional tone such as tension, joy, or sadness.
  • Finding high-quality writing examples for specific scenes like cultivation, dialogue, or exploration.
  • Exporting structured search results for use in AI-assisted writing pipelines.
  • Identifying snippets that match a specific narrative rhythm or quality score.

How Corpus Search Works

  1. The user provides a semantic search query and identifies a target collection previously indexed by corpus-builder.
  2. The system executes a vector-based search to find the most contextually relevant segments.
  3. Optional metadata filters (scene, emotion, rhythm) are applied to refine the candidate list.
  4. Quality thresholds are checked against the metadata to ensure only high-value results are returned.
  5. The tool outputs formatted matches including similarity scores, metadata summaries, and content previews, or exports them to JSON.

Corpus Search Setup

To get started with this component of Openclaw Skills, follow these installation steps:

# Navigate to the skill directory
cd ~/.openclaw/workspace/skills/corpus-search

# Install the required Python dependencies
pip3 install -r requirements.txt --user

# Configure your corpus paths
# Edit configs/default_config.yml to point to your data source

Corpus Search Data Schema & Taxonomy

Corpus Search utilizes a structured metadata schema to filter and organize results. The following table describes the primary fields used during the search process:

Parameter Description Possible Values
query The semantic search string User-defined text
collection The target index to search e.g., xuanhuan-full
scene Categorical scene filter fighting, cultivation, dialogue, etc.
emotion The emotional tone of the snippet tense, relaxed, tragic, hot-blooded
quality Minimum quality score threshold 1 to 10
limit Number of results to return Default: 10

Corpus Search Advanced Features

  • Semantic Similarity Scoring: Every result includes a percentage-based similarity score for precise relevance tuning.
  • JSON Integration: Native support for JSON output, making it easy to pipe search results into other Openclaw Skills.
  • Multi-Metadata Filtering: Combine scene, emotion, and rhythm filters to isolate highly specific narrative styles.
  • Bulk Export: Export query results directly to files for offline analysis or dataset training.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*