Wiki Query 3 Modes: /wiki-query AgriciDaniel 2026
AgriciDaniel claude-obsidian plugin: quick (hot cache), standard (index lookup), deep (full pages). Mỗi mode tối ưu cho use case khác nhau, balance giữa response time và depth answer. Hiểu cơ chế giúp developer dùng skill hiệu quả thay vì đợi 30s mỗi query.
Bài này deep-dive 3 mode, caching strategy, query patterns hiệu quả, và edge cases khi query trả lời sai. Bài 11 skills overview cover skill ở mức intro, bài này focus deep mechanics + tối ưu query response.
TL;DR
- 3 mode tự động chọn: quick (đọc hot.md cache, 2-3s), standard (index + relevant pages, 5-10s), deep (full vault scan, 30-60s).
- Auto mode selection: skill detect query complexity, default standard, fallback deep nếu standard không đủ context, hoặc explicit `
/wiki-query–mode deep`. - Caching strategy 3 layer: hot.md cache 500w (recent context), index.md catalog (master TOC), full pages (lazy load). Mỗi layer activate cho mode tương ứng.
- Citations chuẩn: mỗi answer có source links specific (file:line) để verify, không phải LLM hallucinate.
/wiki-query Skill Là Gì?
/wiki-query là skill query chính của AgriciDaniel claude-obsidian plugin, retrieve thông tin từ wiki structure mà các skill khác đã build. Khác với chat thông thường yêu cầu Claude scan vault mỗi lần, /wiki-query dùng caching strategy 3-layer để response nhanh và chính xác.
Skill được optimize cho 4 use case chính. Một, recall fact specific từ wiki (“entity X có thông tin gì”). Hai, synthesize cross-source (“tóm tắt mọi thứ research về Y”). Ba, comparison (“X khác Z thế nào”). Bốn, retrospective (“trong tháng qua đã research gì về A”).
Để hiểu /wiki-query context, đọc trước pillar Obsidian + Claude Code cho overview integration, /wiki bootstrap vault cho folder structure, capture trio cho cách content vào vault. /wiki-query là skill consume content mà các skill khác producer.
Khác query trực tiếp Claude Code (đọc vault và trả lời X), /wiki-query có 3 advantages. Một, response nhanh 5-10x vì dùng cache thay vì full scan. Hai, citations chuẩn với file:line reference. Ba, không tốn token đọc note không liên quan vì index filter trước.
Quick Mode Hoạt Động Ra Sao?
Quick mode là fastest mode, response 2-3s, dùng wiki/hot.md cache 500 từ. Phù hợp query về recent context: “hôm qua research gì”, “tóm tắt session gần nhất”, “key fact mới ingest hôm nay”.
Workflow quick mode:
- Skill đọc
wiki/hot.md(500 từ ~700 tokens). - Pass content cho Claude với query.
- Claude trả lời dựa hoàn toàn trên hot cache.
- Output có citation từ pages mention trong hot cache.
Khi nào quick mode optimal. Recent activity (≤3 ngày qua). Top-of-mind topic đang active. Quick recall không cần depth. Cost siêu thấp ~700 tokens cho query + response, tổng <$0.01.
Limitation. Hot cache chỉ giữ 5-10 events recent nhất. Query về topic 1 tuần trước không có trong cache, quick mode sẽ trả “không đủ context, switch standard mode”. Đây là feature: skill tự suggest upgrade mode thay vì hallucinate.
Use case daily điển hình. Sáng mở Claude Code, gõ “tóm tắt 3 ngày qua mình đã làm gì”. Skill detect recent context query, chọn quick mode. Response 2-3s với citations từ hot.md. Pull đúng key events: “Ngày 1 ingest 5 articles về MCP, ngày 2 viết blog draft, ngày 3 research Karpathy pattern”.
Mình dùng quick mode 30-40% queries daily. Mỗi sáng routine recall context, mỗi sau lunch verify recent work. Total cost ~$0.10/tuần cho daily quick queries.
Standard Mode Hoạt Động Ra Sao?
Standard mode là default mode khi /wiki-query chạy không specify, response 5-10s, dùng wiki/index.md catalog + relevant pages selected. Mode này balance giữa speed và depth, cover 60-70% query use case.
Workflow standard mode:
- Skill đọc
wiki/index.md(master catalog 1500-3000 tokens cho vault 200-500 notes). - Match query với entries trong index, identify 3-5 pages relevant.
- Pull full content của 3-5 pages đó (~3,000-8,000 tokens).
- Pass cho Claude với query.
- Claude synthesize answer với citations cụ thể.
Auto mode selection. Skill default standard nếu query không có recent context indicator. Indicator của quick: “hôm nay”, “gần đây”, “session vừa”. Indicator của deep: “mọi”, “tất cả”, “comprehensive”, “exhaustive”. Default standard cho everything else.
Use case standard mode. “X là gì” (entity hoặc concept lookup). “X liên quan đến Y thế nào” (relationship query). “Top 5 lý do X” (list query với context). Standard mode strong nhất ở balanced query.
Pattern hiệu quả. Phrase query specific: “Karpathy LLM Wiki khác RAG ở chỗ nào” (good) thay vì “tell me about LLM Wiki” (vague). Specific query helps index match precise pages, response targeted.
Edge case: query ambiguous (matches 10+ index entries). Skill prompt user clarify trước khi pull pages: “Tìm thấy 12 pages match, narrow down theo: [topic A], [topic B], [topic C]?”. Response 1 trong 3 options, skill pull pages tương ứng. Avoid hallucinate khi context overload.
Cost typical query standard mode: 4,000-10,000 tokens, ~$0.04-0.10. 5-10s response time acceptable cho thinking-pace query.
Deep Mode Hoạt Động Ra Sao?
Deep mode là exhaustive mode, response 30-60s, scan toàn bộ wiki structure. Phù hợp query comprehensive cần overview tổng hợp từ nhiều pages, hoặc retrospective dài hạn.
Workflow deep mode:
- Skill load
wiki/index.md+wiki/log.md+ tất cả pages match query. - Group pages theo topic clusters (auto-cluster theo tags/wikilinks).
- Synthesize answer comprehensive với multi-source citations.
- Generate insight cross-page mà standard mode miss.
Trigger deep mode 3 cách. Một, explicit flag: /wiki-query --mode deep "X". Hai, query keyword indicator: “tổng hợp toàn bộ”, “comprehensive review”, “every fact”. Ba, standard mode escalate khi không đủ context.
Use case deep mode. Quarterly review: “tóm tắt mọi research Q3 2026”. Cross-domain synthesis: “AI + dev tools intersection trong vault”. Knowledge audit: “check wiki có information conflict nào về X”. Deep mode tốn nhiều token nhưng output là content gold đáng pay.
Cost typical deep query: 30,000-80,000 tokens, ~$0.30-0.80 mỗi query. Đắt hơn standard 10x nhưng justify cho 5-10% queries cần exhaustive.
Performance benchmark. Vault 300 notes, deep query “tóm tắt mọi research về Karpathy LLM Wiki”: 45 giây response, output 800-1500 từ với 15+ citations. Standard mode same query: 8 giây, 400-600 từ, 5-7 citations. Deep mode value cho insight breadth, không phải speed.
Edge case: vault qua 1000 notes deep mode crash. Solution: pre-filter qua /wiki-fold rollup (xem bài /wiki-lint + /wiki-fold). Sau fold, deep mode work trên meta-pages thay vì 1000 individual pages.
Caching Strategy 3 Layer Hoạt Động Như Thế Nào?

Caching strategy 3 layer là điểm khác biệt quan trọng nhất giữa /wiki-query và direct query Claude Code. 3 layer cache match với 3 mode, mỗi layer activate cho use case riêng.
Layer 1 Hot Cache. File wiki/hot.md 500 từ ~700 tokens. Update tự động sau mọi /save, /wiki-ingest, /wiki-query session end. Activate cho quick mode. Tradeoff: speed vs scope. Cover 5-10 events recent nhất.
Layer 2 Index. File wiki/index.md 1500-5000 tokens (depends vault size). Master catalog liệt kê mọi page với metadata: title, type, tags, last updated. Update tự động sau mọi /wiki-ingest hoặc /save tạo page mới. Activate cho standard mode. Tradeoff: indirect (index trỏ tới pages, không có content) nhưng efficient.
Layer 3 Full Pages. Lazy load khi standard hoặc deep mode cần pull content cụ thể. Skill chỉ load pages match query, không load all. Cost theo demand: 1 page ~500-2000 tokens. Activate cho cả standard (3-5 pages) và deep (10-50 pages).
Cache invalidation. Hot cache invalidate sau mỗi update event (auto). Index invalidate khi page mới tạo hoặc page existing modified (auto). Full pages no invalidation needed (read fresh từ disk mỗi query).
Strategy này có 3 lợi ích so với direct vault scan. Một, response time consistent (cache hit fast). Hai, cost predictable (token usage scale theo query complexity, không theo vault size). Ba, accuracy cao (cite exact pages thay vì hallucinate).
Query Patterns Nào Hiệu Quả Cho Developer?
Query phrasing ảnh hưởng response quality 50-80%. Phrase tốt → response targeted, phrase kém → response generic hoặc miss context. 4 pattern hiệu quả mình đo qua 6 tháng.
Pattern 1, Entity-first query. Phrase với entity/concept name explicit. Example: “Karpathy LLM Wiki pattern khác RAG ở chỗ nào” (good). “AI knowledge base alternatives” (bad). Entity-first giúp index match precise.
Pattern 2, Time-bounded query. Phrase với time scope rõ. Example: “Trong tháng 4/2026, mình research gì về MCP” (good). “Research about MCP” (bad). Time scope giúp skill prioritize recent context.
Pattern 3, Comparison query. Phrase với explicit “vs” hoặc “khác… thế nào”. Example: “iansinnott obsidian-claude-code-mcp khác mcp-obsidian thế nào” (good). “Tell me about MCP servers” (bad). Comparison query trigger comparison-pages pull, output structured.
Pattern 4, Action-oriented query. Phrase với verb + outcome cụ thể. Example: “Setup PARA folder structure cho vault 200 notes như thế nào” (good). “PARA method” (bad). Action query pull actionable pages, không lan man.
Anti-patterns avoid. Vague pronoun: “Tell me about it” (cái gì?). Open-ended scope: “Everything about X” (tốn deep mode mà output không focused). Yes/no question: “Có pattern X trong vault không” (response binary, không insight). Refactor query trước khi run, save thời gian re-query.
Multi-turn query workflow. Query 1: “Tóm tắt research về Karpathy LLM Wiki”. Response. Query 2 follow-up: “Trong đó, frameworks nào best cho team 5 người”. Response targeted. Query 3 deeper: “Setup framework X chi tiết”. Response practical. Multi-turn cheaper hơn 1 deep query và output insight progressive.
✍️ Workflow capture knowledge mình học từ community này
Daily-notes routine + capture flow (save / ingest / query) mình dùng hằng ngày học từ AI Marketing Hub Pro. Mình join group với Daniel Agrici từ rất sớm và đây là cộng đồng SEO + Claude Code mình active + contribute nhiều nhất so với tất cả group mình từng tham gia.
Sub-skill /wiki, /save, /wiki-ingest, /wiki-query ship update liên tục, pro member có early access trước khi lên public. Nếu bạn xây hệ thống capture knowledge từ daily notes, đây là chỗ nên tham gia.
Câu Hỏi Thường Gặp
Cần /wiki bootstrap trước /wiki-query không?
Có. /wiki-query đọc index.md, hot.md, sources/, entities/ folders mà /wiki tạo. Skip /wiki, các file/folder này không tồn tại, skill fail. Đầu tư 2 phút /wiki upfront rồi mới query. Bài /wiki bootstrap vault cover detail.
Cost mỗi query trung bình bao nhiêu?
Phụ thuộc mode. Quick: $0.005-0.015 (700-1500 tokens). Standard: $0.04-0.10 (4-10K tokens). Deep: $0.30-0.80 (30-80K tokens). Daily total cho 10 queries mix: $0.50-1.50, ~$15-45/tháng. Acceptable với productivity gain.
Query bằng tiếng Việt được không?
Có. Skill support Vietnamese query 100%. Index.md, hot.md, full pages giữ tiếng Việt full diacritics. Claude trả lời tiếng Việt nếu query tiếng Việt. Mix language query work tốt: “Karpathy LLM Wiki khác RAG ở chỗ nào” (mix Anh-Việt).
Mode nào dùng nhiều nhất daily?
Standard (60%) cho query cụ thể. Quick (25%) cho recent context recall. Deep (10-15%) cho weekly/monthly review. Tỷ lệ này stable trong 6 tháng dùng. Deep dùng ít vì cost cao + ít cần exhaustive query daily.
Vault qua 1000 notes có affect query speed không?
Có. Standard mode tăng từ 5-10s lên 15-20s vì index lớn (5K → 15K tokens). Deep mode crash hoặc cost 100K+ tokens. Solution: chạy /wiki-fold rollup logs cũ thành meta-pages, giảm index size. Bài /wiki-lint + /wiki-fold maintenance cover detail.
Citations trả về có chính xác không?
Có. Skill dùng file:line reference syntax, point đúng wiki page và section. Ví dụ: “Theo wiki/concepts/llm-wiki-pattern.md:42 …”. Click citation jump tới đúng line trong Obsidian. Khác LLM hallucinate citations, /wiki-query verifiable.
Bạn Bắt Đầu Dùng /wiki-query Như Thế Nào?
Bắt đầu với standard mode default, query tự nhiên không lo về mode. Sau 1 tuần dùng, observe pattern: query nào response 2-3s (skill chọn quick), query nào 30s+ (deep). Learn pattern này để phrase query phù hợp mode mong muốn.
Tuần thứ hai, explicit specify mode khi cần: --mode quick cho recall nhanh, --mode deep cho retrospective. Tuần thứ ba, integrate /wiki-query vào daily workflow theo bài daily notes workflow.
Cluster Obsidian + Claude Code của ongboit cover các bài liên quan: pillar setup, Karpathy LLM Wiki story, 3-layer architecture, /wiki bootstrap, capture trio /save+/wiki-ingest+/defuddle, 11 skills overview. Bài này (D-4) là deep-dive cho /wiki-query mode mechanics.
