AgentSkillsCN

qmd

本地化语义搜索,助力文档、笔记、知识库的高效检索。当用户提出以下请求时,请调用此技能: - 请求“搜索我的笔记/文档/知识库/Obsidian” - 希望在知识库中“查找”某项内容 - 询问“我曾经写过关于X的什么内容” - 询问“我是否有关于X的笔记” - 需要从本地Markdown文件中获取相关上下文 - 直接提及“qmd” - 想了解日记条目、会议记录,或是个人文档的内容 触发短语:“搜索笔记”“在文档中查找”“搜索Obsidian”“我的笔记里都写了些什么”“去我的知识库看看”

SKILL.md
--- frontmatter
name: qmd
description: |
  Local semantic search for docs, notes, knowledge bases. INVOKE THIS SKILL when user:
  - Asks to "search my notes/docs/vault/obsidian"
  - Wants to "find" something in their knowledge base
  - Says "what did I write about X"
  - Asks "do I have notes on X"
  - Needs context from their local markdown files
  - Mentions "qmd" directly
  - Asks about journal entries, meeting notes, or personal documentation
  Trigger phrases: "search notes", "find in docs", "search obsidian", "what do my notes say", "look in my vault"
allowed-tools: Bash, Read

qmd - Local Document Search

Semantic + full-text search across local markdown docs using local LLMs.

When to Use

Use qmd when the user wants to search their personal notes, documentation, or knowledge base. This includes Obsidian vaults, markdown notes directories, and any indexed collections.

Search Commands

sh
qmd search "query"    # BM25 full-text search
qmd vsearch "query"   # Semantic vector search
qmd query "query"     # Hybrid search with LLM reranking (best quality)

Search Flags

FlagPurpose
-n <num>Limit results (default: 5)
-c, --collectionRestrict to specific collection
--allReturn all matches
--min-score <num>Filter by relevance threshold
--fullDisplay complete document content
--line-numbersInclude line numbers

Output Formats

FlagFormat
--filesCSV: docid, score, filepath, context
--jsonStructured JSON with snippets
--csvComma-separated values
--mdMarkdown formatting
--xmlXML structure

Document Retrieval

sh
qmd get "path/to/doc.md"      # Get specific document
qmd get "#abc123"             # Get by document ID
qmd multi-get "journals/*.md" # Get multiple docs by glob

Collection Management

sh
qmd collection list           # View all collections
qmd collection add ~/notes --name notes
qmd ls notes                  # List files in collection
qmd status                    # Index health

Examples

sh
# High-quality search with reranking
qmd query -n 10 "API design patterns"

# Full document content for LLM context
qmd search --md --full "error handling"

# Search specific collection
qmd search "meeting notes" -c work

Workflow

  1. Use qmd collection list to see available collections
  2. Use qmd query for best search quality (uses LLM reranking)
  3. Use --full when you need complete document content
  4. Use qmd get to retrieve specific documents by path or ID

Quick Start for Common Requests

User saysRun this
"search my notes for X"qmd query "X"
"what did I write about X"qmd query --full "X"
"find meeting notes about X"qmd search -c obsidian "meeting X"
"show me my notes on X"qmd query -n 3 --full "X"