LiteRAG
by @mozi1924
Local retrieval skill for large documentation corpora using independent SQLite knowledge libraries with keyword plus vector hybrid search. Use when searching...
clawhub install literagπ About This Skill
name: literag version: 0.2.2 description: "Local retrieval skill for large documentation corpora using independent SQLite knowledge libraries with keyword plus vector hybrid search. Use when searching Blender manuals, API references, SDK docs, framework docs, product docs, blog/article archives, exported markdown doc sets, or any other large external documentation that should not live in OpenClaw's main memory index. Also use when indexing, reindexing, debugging retrieval quality, checking index compatibility/status, or inspecting LiteRAG sqlite metadata. Usage: /literag search
LiteRAG
Use this skill when the target corpus is too large or too noisy for main agent memory.
Install
Packaged dependency install:
python3 -m pip install -r {baseDir}/requirements.txt
Layout
/.literag/ /.literag/knowledge-libs.json OPENCLAW_WORKSPACE β WORKSPACE β walk upward from the current path until the OpenClaw workspace sentinel files are foundskills/literag/scripts/skills/literag/bin/literagscripts/literag-query.py, scripts/literag-index.py, scripts/literag-status.py, scripts/literag-meta.py, and scripts/lqRules
memory_searchRead these files when needed
/.literag/knowledge-libs.json when targeting a library or changing configreferences/usage.md when you need command examples, output schema, or the intended search β inspect workflowreferences/configuration.md when adding libraries, source roots, excludes, chunking overrides, or ranking overridesreferences/agent-prompts.md when another agent / ACP harness needs a ready-made LiteRAG prompt templatereferences/optimization-playbook.md when a specific library needs retrieval-quality tuning, ranking cleanup, or indexing-throughput tuningskills/literag/scripts/ only when editing behavior or diagnosing bugsSlash / user-invocable usage
When invoked as /literag ..., parse the remaining argument string as a subcommand.
Supported forms:
/literag search /literag inspect [--start N --end N] /literag index [--limit-files N] [--embedding-batch-size N] /literag index-all [--limit-files N] [--embedding-batch-size N]/literag status /literag meta /literag benchmark --query ... If the user gives a natural-language request instead of a strict subcommand, translate it to the nearest supported operation instead of being pedantic.
Supported commands
index_library.py β index one libraryindex_all.py β index all configured librariessearch_library.py β grouped hybrid/fts/vector retrievalinspect_result.py β expand a hit by file path + chunk rangestatus_library.py β show index health / compatibility / countsmeta_library.py β dump raw sqlite meta recordsbenchmark_library.py β benchmark hybrid/fts/vector latency + hit shape across fixed query setsbin/literag β packaged CLI entrypoint for search / inspect / index / status / meta / benchmarkscripts/literag-query.py β query/search/inspect wrapperscripts/literag-index.py β index wrapper for one library or all librariesscripts/literag-status.py β status wrapperscripts/literag-meta.py β meta wrapperscripts/literag-benchmark.py β benchmark wrapperscripts/lq β tiny shell alias for literag-query.pyOperating workflow
1. Read
2. Resolve the target library
3. Run search_library.py for grouped retrieval
4. If needed, run inspect_result.py on the top hit or chosen range
5. For quick operator use, prefer scripts/literag-query.py or scripts/lq
6. Use scripts/literag-index.py when you need a short indexing entrypoint
7. Use scripts/literag-status.py before debugging weird retrieval or after config changes
8. Use scripts/literag-meta.py when you need the raw stored metadata
9. Use scripts/literag-benchmark.py or skills/literag/scripts/benchmark_library.py when you need repeatable retrieval latency / hit-shape comparisons
10. Keep LiteRAG separate from builtin memory unless the user explicitly wants a durable summary copied into workspace memory
Current intent
Use LiteRAG for:
π Constraints
memory_search