| name | kb-question |
| description | Answer a single question and save the answer as an atomic note in the knowledge base. Use when the user poses a discrete factual/conceptual question they want captured for later, says "look this up and save it", "add this to the KB", or "note down the answer to X". |
| user_invocable | true |
| arguments | The question to research and note down. Optional: --kb name |
/kb-question
You are helping the user build their knowledge base. The user asked a question and you need to:
KB selection: Parse $ARGUMENTS for --kb <name> flag. If not specified, infer the best KB:
-
Search each non-private KB for related notes on this topic (python3 .kb/kb-index.py search "TOPIC" --kb <name>).
-
If a domain KB has strong matches or its kbs.yaml description fits the topic, use that KB.
-
If no clear match, default to general.
-
State the chosen KB when presenting the answer — the user can redirect before saving.
-
Search existing notes — Use Glob and Grep to check if kbs/<kb_name>/ already has a note covering this topic. Also search other KBs for related content.
-
Research the answer — Use your own knowledge and optionally WebSearch/WebFetch if the question benefits from current information or specific sources.
-
Answer the question — Present a clear, thorough answer to the user in the conversation.
-
Save as atomic note — After answering:
a. If an existing note covers the same atomic concept, update it with the new information. Show the user what changed.
b. If no existing note matches (or the topic is distinct enough), create a new note.
c. If creating a new note, check for related existing notes and add [[wikilinks]] in both directions.
-
Update taxonomy — Read .kb/taxonomy.yaml. Add any new tags used. Write back.
Note Type Guidance
This skill defaults to type: question, which is one of the most useful types for retrieval. However, consider whether the answer reveals something better captured as:
- insight — if the answer surfaces an original observation, non-obvious connection, or tradeoff (e.g., "Why is X hard?" → the answer is really about a fundamental tension)
- concept — if the question is really "What is X?" and the answer is a pure explanation with no Q&A structure
Prefer question when there's a clear question + answer + takeaways structure. Prefer insight when the value is in the observation itself.
Note Creation Rules
- Filename: slugified title, e.g.
tcp-congestion-control.md
- Save to:
kbs/<kb_name>/ directory (flat, no subfolders). Default KB is general.
- Follow the note format from CLAUDE.md exactly
- For question-type notes, use this body structure:
## Question
{the question}
## Answer
{thorough answer with inline citations like [source name](url) wherever a claim comes from a specific source}
## Key Takeaways
- {bullet points for quick scanning}
- Always include
related: [[other-note]] in frontmatter when connections exist
- Set
created and updated to today's date
- Set
type: question
- Include
sources in frontmatter if web search was used
- Always cite sources inline — every claim from an external source must have a citation near it in the body, not just in frontmatter. Use
[text](../../references/filename.md) for reference files (two levels up from kbs/<kb_name>/), [text](url) for web sources, or (Source: Title) for books/papers/other
After Saving
Tell the user:
- The note filename and path
- Tags applied
- Any related notes that were linked
- Whether this was a new note or an update to an existing one
The question to answer: $ARGUMENTS