add-qmd

GitHub

将基于grep的记忆搜索升级为QMD混合搜索(BM25+向量+LLM重排),实现本地语义检索,提升记忆召回率。

skills/add-qmd/SKILL.md sbusso/claudeclaw

Trigger Scenarios

add qmd qmd memory semantic memory search upgrade memory

Install

npx skills add sbusso/claudeclaw --skill add-qmd -g -y
More Options

Use without installing

npx skills use sbusso/claudeclaw@add-qmd

指定 Agent (Claude Code)

npx skills add sbusso/claudeclaw --skill add-qmd -a claude-code -g -y

安装 repo 全部 skill

npx skills add sbusso/claudeclaw --all -g -y

预览 repo 内 skill

npx skills add sbusso/claudeclaw --list

SKILL.md

Frontmatter
{
    "name": "add-qmd",
    "description": "Add QMD (Query Markup Documents) as an advanced memory search backend. Upgrades the built-in grep-based memory_search with hybrid BM25 + vector semantic search + LLM re-ranking. Fully local, no API keys needed. Triggers on \"add qmd\", \"qmd memory\", \"semantic memory search\", \"upgrade memory\"."
}

Add QMD Memory Backend

QMD (https://github.com/tobi/qmd) is a local search engine for markdown files. It combines BM25 keyword search, vector semantic search, and LLM re-ranking — all running on-device via node-llama-cpp with GGUF models.

This skill upgrades ClaudeClaw's built-in grep-based memory_search MCP tool with QMD's hybrid search, giving agents much better recall across large memory collections.

Prerequisites

  • ClaudeClaw with memory tools already working (memory_search, memory_save, memory_get)
  • ~2GB disk space for GGUF embedding + reranking models (downloaded on first run)
  • Node.js 20+

What This Skill Does

  1. Installs QMD as an MCP server dependency
  2. Configures QMD to index all group memory directories (groups/*/memory/, groups/*/CLAUDE.md, groups/*/conversations/)
  3. Replaces the grep-based memory_search in agent/runner/src/ipc-mcp-stdio.ts with QMD's API
  4. Adds QMD indexing to the agent startup flow (incremental re-index on each run)

Implementation Notes

QMD MCP Server

QMD exposes its search as an MCP server. Add to the agent runner's mcpServers config:

qmd: {
  command: 'npx',
  args: ['qmd', 'mcp', '--collection', collectionPath],
  env: {},
}

Indexing

QMD indexes markdown files into a local SQLite database. The collection should be configured per-group:

# Index a group's memory
qmd index --collection groups/{folder}/.qmd groups/{folder}/memory/ groups/{folder}/CLAUDE.md groups/{folder}/conversations/

Search Integration

Replace the grep-based memory_search tool body with a call to QMD's MCP:

// Before (grep-based):
const results = grepFiles(args.query, allFiles);

// After (QMD):
// Use the qmd MCP server's search tool
// Returns semantically ranked results with relevance scores

Fallback

If QMD is not installed or indexing fails, fall back to the built-in grep-based search. This ensures memory tools always work even without QMD.

Not Implemented Yet

This skill is a specification for future implementation. The built-in grep-based memory tools work without QMD. Run this skill when you want to upgrade to semantic search.

Version History

  • 1395af4 Current 2026-07-25 07:02

Same Skill Collection

agent/skills/agent-browser/SKILL.md
skills/add-compact/SKILL.md
skills/add-discord/SKILL.md
skills/add-gmail/SKILL.md
skills/add-image-vision/SKILL.md
skills/add-ollama-tool/SKILL.md
skills/add-pdf-reader/SKILL.md
skills/add-reactions/SKILL.md
skills/add-telegram-swarm/SKILL.md
skills/add-telegram/SKILL.md
skills/add-voice-transcription/SKILL.md
skills/add-whatsapp/SKILL.md
skills/convert-to-apple-container/SKILL.md
skills/customize/SKILL.md
skills/debug/SKILL.md
skills/get-qodo-rules/SKILL.md
skills/install-extension/SKILL.md
skills/qodo-pr-resolver/SKILL.md
skills/setup/SKILL.md
skills/uninstall/SKILL.md
skills/update-claudeclaw/SKILL.md
skills/update-skills/SKILL.md
skills/use-local-whisper/SKILL.md
skills/x-integration/SKILL.md
skills/uninstall-extension/SKILL.md

Metadata

Files
0
Version
1395af4
Hash
9f88144c
Indexed
2026-07-25 07:02

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-21 11:15
浙ICP备14020137号-1 $mapa de visitantes$