From 043253d2f6a66549fd9f37802eab51731bb68f82 Mon Sep 17 00:00:00 2001 From: AG Date: Tue, 27 Jan 2026 11:29:54 -0800 Subject: [PATCH 1/3] feat(skill): Add QMD skill --- skills/iamadig/qmd/SKILL.md | 159 ++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 skills/iamadig/qmd/SKILL.md diff --git a/skills/iamadig/qmd/SKILL.md b/skills/iamadig/qmd/SKILL.md new file mode 100644 index 000000000..d730277e8 --- /dev/null +++ b/skills/iamadig/qmd/SKILL.md @@ -0,0 +1,159 @@ +--- +name: qmd +description: Semantic search and retrieval tool for local files. Uses embeddings and BM25 search to find context. +metadata: { + "clawdbot": { + "emoji": "🔍", + "requires": { + "optionalBins": ["qmd"] + }, + "nix": { + "packages": ["github:tobi/qmd"] + }, + "notes": [ + "Use 'qmd query' for best results (combined search + reranking).", + "Use 'qmd vsearch' for pure vector similarity.", + "Use 'qmd search' for exact keyword matching (BM25).", + "Run 'qmd update --pull' to refresh index." + ] + } +} +--- + +# QMD (Query Markdown Documents) + +QMD is a powerful **local-first** search tool that indexes your documents for both semantic (vector) and keyword (BM25) search. Use it to find relevant context, code snippets, or documentation within your projects. + +It is maintained by **Tobi** and the source code is available at [https://github.com/tobi/qmd](https://github.com/tobi/qmd). + +## 🔒 Privacy & Security + +**QMD is 100% Local.** +- No data is sent to the cloud. +- All embeddings and indexes are stored on your machine at `~/.cache/qmd/`. +- Your personal library remains private and is NEVER shared when you use this skill. + +## 📥 Installation + +### Via Nix (Recommended) +QMD is Flake-enabled and can be run directly: +```bash +nix run github:tobi/qmd -- search "your query" +``` +Or enter a shell with `qmd` available: +```bash +nix shell github:tobi/qmd +``` + +### Via Bun +```bash +bun install -g https://github.com/tobi/qmd +``` +*Requires Bun >= 1.0.0 and SQLite with extension support.* + +## 🔌 Connect Your Data + +QMD can index any directory on your computer. Here is how to connect your personal knowledge bases. + +### Obsidian +Obsidian vaults are just folders of Markdown files, which QMD loves. +```bash +# Add your vault as a collection +qmd collection add ~/Documents/MyObsidianVault --name obsidian --mask "**/*.md" + +# Search only your vault +qmd query "project alpha notes" -c obsidian +``` + +### Notion +QMD cannot read directly from Notion's API. You must **export** your workspace to Markdown first. +1. In Notion, go to **Settings & Members** > **Settings** > **Export all workspace content**. +2. Select **Markdown & CSV** format. +3. Unzip the download to a local folder (e.g., `~/Documents/NotionBackup`). +4. Index it with QMD: + ```bash + qmd collection add ~/Documents/NotionBackup --name notion --mask "**/*.md" + ``` + +### VS Code / Coding Projects +Index your current project to give the bot context about your codebase: +```bash +# Index the current directory (default) +qmd update +``` + +## ⚙️ Configuration + +You can persistently configure collections in `~/.config/qmd/index.yml`. + +```yaml +# ~/.config/qmd/index.yml +global_context: "You are an intelligent assistant searching my personal knowledge base." + +collections: + Obsidian: + path: ~/Documents/ObsidianVault + pattern: "**/*.md" + context: + "/": "Personal notes and journals" + Work: + path: ~/Projects/WorkDocs + pattern: "**/*.{md,txt}" +``` + +## 🔍 Core Commands + +### 1. Smart Search (Hybrid) +**Use this by default.** It combines BM25 keyword search, Vector semantic search, and LLM Reranking for the best results. +```bash +qmd query "how does authentication work?" +``` + +### 2. Output Formats (Crucial for AI) +Always use structured output when reading results: +```bash +# BEST: JSON output (rich metadata + snippets) +qmd query "database schema" --json + +# GOOD: Markdown output (clean context) +qmd query "api endpoints" --md + +# FAST: File list only (minimal token usage) +qmd query "utils" --files +``` + +### 3. Context & Collection Management +Help QMD understand your files by adding descriptions: +```bash +# Give QMD a hint about a folder's content +qmd context add qmd://src/auth "Authentication logic and user session management" +``` + +## 🛠️ Troubleshooting + +**"Command not found"** +If `qmd` is installed but not in your PATH, verify your installation: +- **Bun:** Check `~/.bun/bin` is in your PATH. +- **Nix:** Ensure you are in the `nix shell`. + +**"Index seems empty"** +If search returns nothing: +```bash +# Force a full re-index +qmd update --pull +``` + +## Full Help Reference +``` + qmd multi-get [-l N] [--max-bytes N] - Get multiple docs by glob or comma-separated list + qmd status - Show index status and collections + qmd update [--pull] - Re-index all collections (--pull: git pull first) + qmd embed [-f] - Create vector embeddings (800 tokens/chunk, 15% overlap) + qmd cleanup - Remove cache and orphaned data, vacuum DB + qmd search - Full-text search (BM25) + qmd vsearch - Vector similarity search + qmd query - Combined search with query expansion + reranking + qmd mcp - Start MCP server (for AI agent integration) + + ... (see 'qmd --help' for full flags) +``` From 7591c747a0c42f9e01bcfaa6ae391c551e8b8bb4 Mon Sep 17 00:00:00 2001 From: AG Date: Tue, 27 Jan 2026 11:33:47 -0800 Subject: [PATCH 2/3] feat(skill): Add lenny-search skill --- skills/iamadig/lenny-search/SKILL.md | 77 ++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 skills/iamadig/lenny-search/SKILL.md diff --git a/skills/iamadig/lenny-search/SKILL.md b/skills/iamadig/lenny-search/SKILL.md new file mode 100644 index 000000000..027b215de --- /dev/null +++ b/skills/iamadig/lenny-search/SKILL.md @@ -0,0 +1,77 @@ +--- +name: lenny-search +description: Deep search across all Lenny's Podcast transcripts using QMD. Requires setup. +metadata: { + "clawdbot": { + "emoji": "🎙️", + "requires": { + "optionalBins": ["qmd", "git"] + }, + "notes": [ + "Requires one-time setup: cloning the transcript repo and indexing it.", + "Uses the 'lenny' collection in QMD for focused search.", + "Source data: https://github.com/ChatPRD/lennys-podcast-transcripts" + ] + } +} +--- + +# Lenny's Podcast Search + +This skill enables deep semantic search over the entire archive of Lenny's Podcast transcripts. It uses **QMD** to index and query the data locally. + +## 🛠️ One-Time Setup + +Before you can search, you must download the data and tell QMD where it is. Run these commands: + +1. **Get the Data:** + Clones the public transcript repository to a standard location (e.g., `~/knowledge`). + ```bash + mkdir -p ~/knowledge + git clone https://github.com/ChatPRD/lennys-podcast-transcripts.git ~/knowledge/lennys-podcast-transcripts + ``` + +2. **Index with QMD:** + Creates a dedicated collection named `lenny`. + ```bash + qmd collection add ~/knowledge/lennys-podcast-transcripts --name lenny --mask "**/*.md" + ``` + +## 🔍 How to Search + +Once setup is complete, query the `lenny` collection: + +### Ask a Question +```bash +qmd query "how to hire a first PM" -c lenny +``` + +### Find Specific Guests +```bash +qmd query "Brian Chesky interview" -c lenny +``` + +### Get Structured Output (for AI Analysis) +Use `--json` to get rich metadata (guest name, video URL, timestamps) found in the transcript frontmatter. +```bash +qmd query "growth loops" -c lenny --json +``` + +## 📄 Transcript Format +Each transcript file contains YAML frontmatter with useful metadata: +```yaml +guest: "Casey Winters" +company: "Eventbrite, Pinterest" +role: "CPO" +youtube_url: "https://www.youtube.com/watch?v=..." +video_id: "VIDEO_ID" +``` +You can use `qmd get` to retrieve this raw content if needed. + +## 🔄 Updates +To get the latest episodes: +```bash +cd ~/knowledge/lennys-podcast-transcripts +git pull +qmd update --pull +``` From 8eb1a180d90ac460de181ff4c9e6f06228c7a006 Mon Sep 17 00:00:00 2001 From: AG Date: Tue, 27 Jan 2026 11:36:38 -0800 Subject: [PATCH 3/3] refactor: Remove lenny-search to separate generic qmd skill --- skills/iamadig/lenny-search/SKILL.md | 77 ---------------------------- 1 file changed, 77 deletions(-) delete mode 100644 skills/iamadig/lenny-search/SKILL.md diff --git a/skills/iamadig/lenny-search/SKILL.md b/skills/iamadig/lenny-search/SKILL.md deleted file mode 100644 index 027b215de..000000000 --- a/skills/iamadig/lenny-search/SKILL.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -name: lenny-search -description: Deep search across all Lenny's Podcast transcripts using QMD. Requires setup. -metadata: { - "clawdbot": { - "emoji": "🎙️", - "requires": { - "optionalBins": ["qmd", "git"] - }, - "notes": [ - "Requires one-time setup: cloning the transcript repo and indexing it.", - "Uses the 'lenny' collection in QMD for focused search.", - "Source data: https://github.com/ChatPRD/lennys-podcast-transcripts" - ] - } -} ---- - -# Lenny's Podcast Search - -This skill enables deep semantic search over the entire archive of Lenny's Podcast transcripts. It uses **QMD** to index and query the data locally. - -## 🛠️ One-Time Setup - -Before you can search, you must download the data and tell QMD where it is. Run these commands: - -1. **Get the Data:** - Clones the public transcript repository to a standard location (e.g., `~/knowledge`). - ```bash - mkdir -p ~/knowledge - git clone https://github.com/ChatPRD/lennys-podcast-transcripts.git ~/knowledge/lennys-podcast-transcripts - ``` - -2. **Index with QMD:** - Creates a dedicated collection named `lenny`. - ```bash - qmd collection add ~/knowledge/lennys-podcast-transcripts --name lenny --mask "**/*.md" - ``` - -## 🔍 How to Search - -Once setup is complete, query the `lenny` collection: - -### Ask a Question -```bash -qmd query "how to hire a first PM" -c lenny -``` - -### Find Specific Guests -```bash -qmd query "Brian Chesky interview" -c lenny -``` - -### Get Structured Output (for AI Analysis) -Use `--json` to get rich metadata (guest name, video URL, timestamps) found in the transcript frontmatter. -```bash -qmd query "growth loops" -c lenny --json -``` - -## 📄 Transcript Format -Each transcript file contains YAML frontmatter with useful metadata: -```yaml -guest: "Casey Winters" -company: "Eventbrite, Pinterest" -role: "CPO" -youtube_url: "https://www.youtube.com/watch?v=..." -video_id: "VIDEO_ID" -``` -You can use `qmd get` to retrieve this raw content if needed. - -## 🔄 Updates -To get the latest episodes: -```bash -cd ~/knowledge/lennys-podcast-transcripts -git pull -qmd update --pull -```