kb-query

Installation
SKILL.md

KB Query

Search, answer, and generate outputs from the compiled wiki.

The key principle is that substantive research answers become persistent knowledge artifacts. Do not treat valuable Q&A as disposable chat.

Read before querying

Read these files first:

  • local AGENTS.md
  • local CLAUDE.md if present
  • ../obsidian-notes-karpathy/references/file-model.md
  • ../obsidian-notes-karpathy/references/lifecycle-matrix.md
  • ../obsidian-notes-karpathy/references/qa-template.md
  • ../obsidian-notes-karpathy/references/content-output-template.md
  • ../obsidian-notes-karpathy/references/search-upgrades.md
  • ../obsidian-notes-karpathy/references/activity-log-template.md
  • ../obsidian-notes-karpathy/references/obsidian-safe-markdown.md

If one or more shared references are missing, continue with the minimum compatible contract:

  • ground answers in the compiled wiki instead of improvising from chat context
  • archive substantive answers by default
  • obey Obsidian-safe markdown rules whenever you emit tables

Report missing shared references in the final summary.

Then start with:

  • wiki/index.md
  • wiki/indices/INDEX.md
  • wiki/indices/CONCEPTS.md
  • wiki/indices/SOURCES.md
  • wiki/indices/ENTITIES.md when it exists

Mode selection

Choose one of three modes:

  1. search mode for finding relevant notes and evidence quickly
  2. research mode for answering a substantive question
  3. publish mode for generating outward-facing artifacts grounded in the wiki

Search mode

For search-like requests:

  1. inspect wiki/index.md
  2. inspect concept, source, and optional entity indices
  3. use ordinary file search or obsidian-cli
  4. use backlinks, unlinked mentions, or property search when they can surface related evidence faster than plain text search
  5. return a structured result list with short relevance notes and a few excerpts

Prefer markdown-first navigation before suggesting any search infrastructure upgrade.

Research mode

For complex questions, follow this order:

Step 1: understand the question

Identify:

  • key concepts
  • key entities when relevant
  • expected answer shape
  • whether the question is factual, comparative, analytical, or exploratory

Step 2: check existing Q&A

Search outputs/qa/ first.

If you find a strong prior answer:

  • use it as a starting point
  • update or extend it when needed
  • avoid re-deriving the same answer from scratch

Step 3: navigate the wiki

Read the most relevant concept pages, entity pages, and summaries, following wikilinks where they add evidence or contrast.

Step 4: synthesize with provenance

Answer using wiki citations and explicit uncertainty when sources disagree or evidence is thin.

Step 5: archive by default

If the answer is substantive, save it to outputs/qa/{date}-{slug}.md using ../obsidian-notes-karpathy/references/qa-template.md.

Only skip archival when:

  • the user explicitly says not to save it, or
  • the interaction is trivial and purely operational

Step 6: append the query log

When the answer is archived or materially updated, append a query entry to wiki/log.md using ../obsidian-notes-karpathy/references/activity-log-template.md.

Step 7: feed useful insights back into the wiki

After archiving, check whether the answer revealed:

  • a new concept page that should exist
  • a new entity page that should exist
  • new evidence for an existing concept or entity
  • a missing connection between pages

Update the wiki when the improvement is mechanical and well-supported.

Publish mode

Use this when the user wants content for an audience rather than only an internal answer.

Supported artifacts:

  • outputs/content/articles/ for article drafts
  • outputs/content/threads/ for X or social threads
  • outputs/content/talks/ for talk outlines
  • outputs/reports/ for markdown reports
  • outputs/slides/ for Marp decks
  • outputs/charts/ for Mermaid or Canvas outputs

For every generated artifact:

  • look for an existing supporting Q&A note first
  • if no strong supporting Q&A exists, create one before or immediately after the publish artifact
  • use ../obsidian-notes-karpathy/references/content-output-template.md when the output is audience-facing
  • cite the wiki pages and prior Q&A consulted
  • keep filenames date-prefixed and slugged
  • append a publish entry to wiki/log.md when the artifact is substantive
  • if the artifact uses tables, keep them Obsidian-safe; never place alias-style wikilinks inside table cells

Output requirements

In your user-facing summary, report:

  1. which wiki pages or prior Q&A you relied on
  2. which mode you used
  3. where the new artifact was saved
  4. whether you updated any concept or entity pages as a result
  5. whether you appended a query or publish entry to wiki/log.md
  6. whether any shared references or optional local files were missing

Tooling notes

  • Use obsidian-markdown for all markdown outputs and wikilinks.
  • Use obsidian-cli when available for vault-aware search.
  • Use obsidian-canvas-creator only when the user explicitly wants a canvas-style artifact.
Weekly Installs
2
GitHub Stars
2
First Seen
Today
Installed on
amp2
cline2
trae2
trae-cn2
opencode2
cursor2