query

query is a skill for Claude Code from owenliang60-ship-it/knowledge-mgmt. It costs 73 tokens per session (824 once invoked), scanned A, original, MIT.

A command for searching an Obsidian vault, which is a folder of linked personal notes, and using the matching notes to answer a question. It combines those notes with general model knowledge and identifies the note sources.

In plain words
What is it for?
Use it to find facts, compare ideas, explore a topic, or gather related notes from an Obsidian knowledge base.
Why use it?
It prevents answers from relying only on memory when the information may already exist in your own notes.

Skill for Claude Code

Written for Claude Code: arguments in frontmatter.

Good fit Use it to find facts, compare ideas, explore a topic, or gather related notes from an Obsidian knowledge base.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/owenliang60-ship-it/knowledge-mgmt/query
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add owenliang60-ship-it/knowledge-mgmt --skill query
Clone the repo
git clone --depth 1 https://github.com/owenliang60-ship-it/knowledge-mgmt

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for query

README.md
[![agentmods](https://agentmods.dev/badge/skills/owenliang60-ship-it/knowledge-mgmt/query.svg)](https://agentmods.dev/skills/owenliang60-ship-it/knowledge-mgmt/query)
Your own site
<a href="https://agentmods.dev/skills/owenliang60-ship-it/knowledge-mgmt/query"><img src="https://agentmods.dev/badge/skills/owenliang60-ship-it/knowledge-mgmt/query.svg" alt="Measured on agentmods" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 824 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00073 $0.00824
Opus 5 $0.00036 $0.00412
Sonnet 5 $0.00015 $0.00165
Haiku 4.5 $0.00007 $0.00082

Measured 7d ago against content hash d179ec870099, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

query scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

query/SKILL.md · 97 lines

What it actually says

/query — 带 Vault 上下文的知识查询

让 CC 不只靠模型记忆回答,而是主动搜索 vault 中的已有知识。

执行流程

Step 1: 解析查询意图

从用户问题中提取:

  • 关键概念(用于搜索)
  • 涉及的 domain(用于定位 MOC)
  • 查询类型:事实查找 / 综合分析 / 对比 / 探索

Step 2: 搜索 Vault

# 1. 读取相关 MOC 索引
obsidian read path="Cards/MOC-{Domain}.md"

# 2. 搜索关键词
obsidian search query="{关键概念1}"
obsidian search query="{关键概念2}"

# 3. 带上下文搜索(更精确)
obsidian search:context query="{关键短语}"

Step 3: 读取命中的 Cards

# 批量读取搜索结果
for card in {搜索结果}; do
  obsidian read path="$card"
done

优先读取:

  1. 研究摘要(type/research, type/reading)— 综合信息密度最高
  2. 概念卡(type/concept)— 定义和关键要点
  3. 洞察卡(type/insight)— 独特见解
  4. 原子卡片(type/atomic)— 精炼知识点

Step 4: 综合回答

回答原则:

  • Vault 知识优先:vault 中有的信息,标注来源 [[Card名]]
  • 模型知识补充:vault 中没有的,用模型知识补充,明确标注"(模型知识,vault 中暂无)"
  • 诚实告知:如果搜索后 vault 中确实没有相关内容,说"vault 中暂无此主题的笔记"

回答格式:

## 回答

{综合回答,穿插 [[Card名]] 引用}

---
📚 引用了 {N} 张 Cards:[[Card1]] [[Card2]] [[Card3]]
💡 模型补充:{有/无}

Step 5: 回写提议(可选)

如果回答产出了有价值的综合分析:

这个回答包含了跨 Card 的综合分析,值得存为新的对比/综合卡片吗?
→ 说 "note" 走 /note 流程回写
→ 说 "不用" 跳过

不自动回写,用户觉得好才走 /note。

与普通提问的区别

普通提问 /query
知识来源 模型记忆 vault Cards + 模型
溯源 标注来自哪张 Card
搜索范围 MOC → Cards → 全文搜索
沉淀 留在对话里 可通过 /note 回写

注意事项

  • 搜索结果多时,先读 MOC 索引缩小范围,不要盲目全文搜索
  • 单次查询读取的 Cards 控制在 10 张以内,避免 context 溢出
  • 如果问题跨多个 domain,先搜索各自 MOC 再综合
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 97 lines · 73 tokens per session scan A d179ec870099

Subscribe to this mod's changes

query is a skill published in the GitHub repository owenliang60-ship-it/knowledge-mgmt (37 stars, last pushed 4mo ago), licensed MIT. It adds 73 tokens to every session and 824 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

cortex-memory

Persistent cognitive memory for AI agents — query, record, review, and consolidate knowledge across sessions with spreading activation, FSRS scheduling, and NLI contradiction detection.

Fozikio/cortex-engine · 36 tokens

heptabase-linking

Create real cross-links between Heptabase cards via the heptabase CLI. Use when the user wants to link Heptabase cards, cross-reference notes, build a card graph, or fix existing [[Card Title]] wiki-link text that is rendering as plain text instead of a clickable card pill. Real links require a ProseMirror card node…

madeyexz/heptabase-skill · 153 tokens

heptabase-cli

Interact with Heptabase using the CLI to create, read, and edit notes, journals, tags, cards, list whiteboards and manage cards on whiteboards, and browse AI Tutor goals, courses, and lessons. Use when the user asks to manage their Heptabase knowledge base, search cards, work with journals, tags, or whiteboards, or…

madeyexz/heptabase-skill · 82 tokens

wiki-retrieve

Build and query a vault-local contextual BM25 retrieval index with optional multilingual Nomic cosine reranking; use for retrieve, hybrid retrieval, BM25, rerank, contextual retrieval, chunk search, vault search, semantic search, find relevant passages, or retrieval diagnostics. Derived caches stay under .vault-meta…

AgriciDaniel/claude-obsidian · 81 tokens

obsidian-bases

Explain, draft, and validate Obsidian Bases .base files with filters, formulas, properties, summaries, and table, card, or list views. Use for Obsidian Bases, database-like vault views, dynamic tables, reading lists, task trackers, filters, formulas, summaries, and .base file edits.

AgriciDaniel/claude-obsidian · 69 tokens

okf

Author, maintain, and consume Open Knowledge Format (OKF) knowledge bundles — portable markdown + YAML frontmatter that both humans and agents read. Use when capturing project knowledge (services, APIs, schemas, metrics, runbooks, decisions) into an OKF bundle, when updating one after code or docs change, or when a…

scaccogatto/okf-skills · 127 tokens