원클릭으로
second-brain-query
Answer a natural-language question by synthesising content from wiki/, and save the response to outputs/.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Answer a natural-language question by synthesising content from wiki/, and save the response to outputs/.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Extract text from a PDF, convert it to markdown, and write the result into raw/pdf/, ready for ingestion.
Initialize or update the Second Brain vault — creates folder structure, declares interests, configures Craft import scope, and generates CLAUDE.md.
Read new or changed files in raw/, synthesise content into wiki/ topic articles, rebuild INDEX.md, and update the ingest manifest.
Scan wiki/ for quality issues — contradictions, unsupported claims, and content gaps — and save a structured report to outputs/.
Continue an existing conversation thread by re-reading the wiki and appending a follow-up answer to the thread file.
Work through open findings in the latest lint report one at a time — propose a fix, apply on approval, skip on rejection.
| name | second-brain-query |
| description | Answer a natural-language question by synthesising content from wiki/, and save the response to outputs/. |
| argument-hint | "<question>" |
| user-invocable | true |
Answer a natural-language question by synthesising content from wiki/, and save the response to outputs/.
Contract: specs/001-personal-knowledge-base/contracts/second-brain-query.md
/second-brain-query "What are the main arguments for agent ownership vs. strike teams?"
/second-brain-query "What do I know about AI partnerships?"
| Argument | Required | Description |
|---|---|---|
<question> | Yes | The natural-language question to answer |
If invoked without a question argument, ask: "What would you like to know? Please provide a question."
Extract the question from the argument string. If no argument is provided, ask the user for their question.
Check that wiki/INDEX.md exists. If it does not:
The knowledge base is empty — wiki/INDEX.md does not exist.
Run /second-brain-ingest first to populate the wiki from your raw/ content.
Stop. Write nothing.
Read wiki/INDEX.md. Scan the topic list and summaries to identify which wiki articles are likely to contain relevant information for the question.
Select the most relevant topics (typically 1–5 articles depending on question scope). If no topics appear relevant, note that the question may not be covered.
Read the full content of each selected wiki article from wiki/<topic>.md.
If a referenced article does not exist as a file (only in INDEX), skip it and note the gap.
Using only the content read from wiki articles, synthesise a clear, grounded answer to the question:
[[topic-name]] wikilink citations inline to attribute claims to their source articleFreshness rules — apply these when synthesising:
If no relevant wiki content exists for the question:
This topic is not yet in your knowledge base.
To add it, you could:
- Import relevant Craft notes with /second-brain-import-craft
- Import a PDF with /second-brain-import-pdf
- Add a markdown file to raw/ and run /second-brain-ingest
Do not attempt to answer from general knowledge. Write an output file noting the gap (see Step 6) and stop.
If only partial content exists (question is partly covered): answer the parts that are covered, then explicitly note which aspects are not in the wiki.
Generate the output slug from the first 5–6 words of the question:
Output path: outputs/YYYY-MM-DD_thread-<slug>.md
Example: "What do I know about AI partnerships?" → outputs/2026-06-16_thread-what-do-i-know-about-ai.md
Check that outputs/ directory exists. If not, create it.
Write the output file in thread format. Use the current date (YYYY-MM-DD) for the timestamps:
<!-- sb:thread id="YYYY-MM-DD_thread-<slug>" created="YYYY-MM-DD" -->
# [Original question]
<!-- sb:turn role="user" ts="YYYY-MM-DD" -->
## You
[Original question]
<!-- sb:turn role="assistant" ts="YYYY-MM-DD" -->
## Second Brain
[Synthesised answer]
*Sources: [[wiki/topic-1]], [[wiki/topic-2]]*
Where:
<!-- sb:thread --> comment carries the thread ID (matching the filename without the .md)<!-- sb:turn --> comment carries the role (user or assistant) and date[[wiki/topic-name]] syntax)--- horizontal rules between turns — the comment markers delineate turns without visible dividersDisplay the full answer to the user in the conversation.
Then report:
Thread started: outputs/YYYY-MM-DD_thread-<slug>.md
Sources: [[wiki/topic-1]], [[wiki/topic-2]]
raw/ or wiki/| Condition | Behaviour |
|---|---|
| No argument provided | Ask user for their question |
wiki/INDEX.md missing | Report empty knowledge base; prompt to run ingest; stop |
| No relevant wiki content | Acknowledge gap; suggest how to fill it; write gap-noting output file |
| Wiki article referenced in INDEX but file missing | Skip missing file; note in answer; continue with available articles |
outputs/ directory missing | Create it, then write the output file |