knowledge-query
Skill1 starsChanged 21 days agoMITView on GitHub
Answer questions from a markdown knowledge base with grounded citations — keyword, semantic, and graph search; source precedence; gap flags; daily briefings; research synthesis. Use when the user asks "what do we know about X", "search my notes/brain", "who is X", "give me a briefing", "summarize what I know about Y", or needs an answer traceable to sources.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- EvolutionAPI/evo-nexustheir own version, first seen Oct 8, 2026
- seulkikaang/claude-skillstheir own version, first seen Jul 13, 2026
- huanchong-99/PocketAidetheir own version, first seen Jun 18, 2026
- evolution-foundation/evo-nexustheir own version, first seen Apr 20, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- EvolutionAPI/evo-nexus★ 545same name
- evolution-foundation/evo-nexus★ 535same name
- huanchong-99/PocketAide★ 9same name
- seulkikaang/claude-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- cloudflare-dnsSkill
- deep-researchSkill
- finish-lineSkill
- fly-to-aws-migrationSkill
- knowledge-captureSkill
- knowledge-maintenanceSkill
- landing-page-craftSkill
- namecheap-dnsSkill
- parallel-build-integratorSkill
- terminal-posterSkill
- visual-regressionSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 85
Use several query shapes: exact names, distinctive phrases, synonyms, and likely folder names.
- Distinctive: line 89
If gbrain or an MCP search tool is available:
- Distinctive: line 114
Start with the search chunks.
- Distinctive: line 116
Read the page's citations and timeline, not just the body.
- Distinctive: line 117
Prefer the most recent page when two pages cover the same fact.
- Distinctive: line 130
If you synthesize across pages, cite each one.
- Distinctive: line 132
Put inference behind an explicit label: "Inferred from ...".
- Distinctive: line 142
Never fill a gap with plausible-sounding detail.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Knowledge Query
Answer from the knowledge base, not from vibes. Every claim traces to a page; every gap is stated; every conflict is surfaced instead of silently resolved.
This skill works on a plain markdown tree ($KB_ROOT). If gbrain is installed, its hybrid search and graph queries replace the keyword layer; the answer contract stays the same.
When to use
- "What do we know about X?"
- "Search my notes / my brain for Y"
- "Who is X?" / "How are A and B connected?"
- "What happened with X?"
- "Give me a briefing for today"
- "Summarize what I know about Y"
- "Research this topic using my notes plus the web"
- Any question where an uncited answer would be untrustworthy
When NOT to use
- The knowledge base has no relevant content and the user wants general knowledge — say so and use a web/research tool instead.
- The user wants a creative draft, not a grounded answer.
- The question is about a live system state that must be queried from an API, not from notes.
Setup
export KB_ROOT="${KB_ROOT:-$HOME/brain}"
rg --versionOptional gbrain:
gbrain query "what do we know about pricing?"
gbrain graph-query companies/acme --type works_at --direction inThe answer contract
- Grounded — answer from pages in the knowledge base, not from the model's memory.
- Cited — every factual claim carries
[Source: <slug>, <section>, updated <date>]. - Gap-aware — if the base does not contain the answer, say "the knowledge base has no information on X" and name what is missing.
- Conflict-aware — if sources disagree, show both with citations; do not pick one silently.
- Freshness-aware — flag pages older than 90 days, or whose
updated_atpredates newer evidence. - Token-aware — read search chunks first; load full pages only when needed.
Workflow
Step 1 — Decompose the question
Break it into searchable parts:
| Question type | Strategy |
| Entity lookup ("who is Jane?") | Keyword + person page + backlinks |
| Topic recall ("what do we know about pricing?") | Keyword + concept pages + recent pages |
| Relationship ("how are Jane and Acme connected?") | Graph/backlinks + typed links |
| Timeline ("what happened last month?") | Date filters + meeting/timeline entries |
| Decision ("why did we choose X?") | Meeting notes + decision records + source docs |
| Gap ("do we have anything on Y?") | Keyword + semantic, then state the gap |
Step 2 — Layer 1: keyword search
bash scripts/search.sh "pricing experiment" --limit 20
bash scripts/search.sh "Jane Doe" --type personUse several query shapes: exact names, distinctive phrases, synonyms, and likely folder names. Search filenames and frontmatter, not just body text.
Step 3 — Layer 2: semantic search
If gbrain or an MCP search tool is available:
gbrain query "why did we choose annual-only pricing?"Otherwise expand the keyword search with synonyms and related terms. Do not claim semantic coverage you did not run.
Step 4 — Layer 3: graph search
For relationship questions, follow links:
rg -n '\[\[people/jane-doe' "$KB_ROOT" --glob '*.md'
rg -n 'works_at|founded|invested_in|advises' "$KB_ROOT" --glob '*.md'With gbrain:
gbrain graph-query people/jane-doe --depth 2 --direction bothStep 5 — Read the top results
- Start with the search chunks.
- Load the full page only when the chunk is insufficient.
- Read the page's citations and timeline, not just the body.
- Prefer the most recent page when two pages cover the same fact.
Step 6 — Synthesize with citations
Jane is CTO of Acme [Source: people/jane-doe, updated 2026-04-01].
The annual-only pricing experiment was approved on 2026-05-21
[Source: meetings/2026-05-21-pricing-review, Decisions section].Rules:
- Cite the slug and the section, not a vague "notes".
- If you synthesize across pages, cite each one.
- Quote exact phrasing for decisions and commitments.
- Put inference behind an explicit label: "Inferred from ...".
Step 7 — State gaps, staleness, and conflicts
Gap: the knowledge base has no information on the enterprise contract renewal.
Stale: the pricing page was last updated 2026-01-10; newer meeting notes may supersede it.
Conflict: the 2026-03-02 note says monthly-first; the 2026-05-21 review says annual-only.Never fill a gap with plausible-sounding detail.
Step 8 — Offer the next action
- "Want me to capture the missing source?"
- "Want me to reconcile the two conflicting notes?"
- "Want the full timeline for this entity?"
Answer format
## Answer
{Direct answer in 1–3 sentences.}
## Evidence
- {Claim} [Source: {slug}, {section}, updated {date}]
- ...
## Gaps and conflicts
- {What the base does not cover}
- {Conflicting sources, with both citations}
## Suggested next step
- {Capture the missing source / reconcile / read the full page}Daily briefing
A briefing is a query with a fixed shape:
- Brain pulse: new facts, contradictions, pending consolidation.
- Today's meetings and attendees.
- Active deals / projects and approaching deadlines.
- Open action items.
- Recent changes (last 24 hours).
- People in play.
- Stale pages relevant to today.
See references/briefing.md for the query list and output template.
Research and synthesis
For "research this using my notes plus the web":
- Query the knowledge base first.
- State what is already known, with citations.
- Fetch external sources only for what is missing or needs verification.
- Label external facts and their dates.
- Return "what is new vs what the base already knew".
See references/research.md for academic verification, strategic reading, book mirroring, and concept synthesis.
Common gotchas
| Gotcha | Fix |
| Answer sounds confident but has no citation | Treat it as a draft; go back to search |
| Search returns nothing because of wording | Try synonyms, folder names, and exact phrases |
| Two pages disagree | Show both; do not average them |
| Page is stale | Flag the date; prefer newer evidence |
| Full page is too large | Read chunks first; load sections on demand |
Search hits inbox/ triage noise | Filter by type or folder; triage the inbox |
| External research overwrites the base | Label external facts; capture the source separately |
| The base has no answer | Say so explicitly; offer to capture the missing source |
References
references/search.md— query templates, layers, ranking, token budgetreferences/citations.md— source precedence, citation format, staleness, conflictsreferences/briefing.md— daily briefing sections and queriesreferences/research.md— external research, academic verification, strategic reading, book mirror, concept synthesisscripts/search.sh— keyword search over$KB_ROOT
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

