Back to notes
QMD Search-Before-Read Pattern
QMD Search-Before-Read Pattern
Source: QMD skill installation Date: 2026-01-29 Tags: #qmd #tokens #optimization #clawdbot
Summary
QMD (Quick Markdown Search) enables targeted retrieval from markdown files, reducing token usage by 70-95% compared to loading full documents into context.
Key Points
- Full document load: ~3,500 tokens for a 1,500-word doc
- QMD search snippet: ~150 tokens for the relevant section
- Savings: 95% fewer tokens on retrieval tasks
Collections Configured
obsidian→ Cary’s Obsidian vault (227 docs)clawd→ Abel’s workspace (54 docs)
Usage Pattern
# Always search first
qmd search "topic" -n 5
# Then fetch only what's needed
qmd get "path/to/file.md"
When to Use
- Cary asks about something in his notes
- Cron jobs need context from Obsidian
- Looking up past decisions, plans, research
- Any time you’d otherwise load a full markdown file
QMD vs memory_search
qmd search→ Files on disk (Obsidian vault)memory_search→ Abel’s conversation memory
Real Cost Impact
- 10 searches/day with QMD vs full loads = ~$0.50/day saved
- Compounds across cron jobs, research, conversations
Action Items
- Installed QMD via Bun
- Indexed Obsidian vault and clawd workspace
- Added mandatory rule to AGENTS.md
Related
- [[AGENTS.md]] - QMD Search Before Read section
- [[TOOLS.md]] - QMD configuration details