query-kb
Skill7 starsChanged 47 days agoMITView on GitHub
Load scoped repository context, then search and navigate a hraness/wordcell Markdown vault with hybrid text retrieval, exact metadata, bounded links and typed relationships, backlinks, whole-vault graph reports, and optional Git provenance. Use when an agent needs the applicable repository instructions, rationale, prior knowledge, plans, captures, decisions, concepts, relationships, or evidence before answering, planning, or changing code.
4 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- hraness/wrenchword for word, first seen Sep 28, 2026
- hraness/personal-monorepo-templateedited, first seen Sep 28, 2026
Other versions4 projects use a version of this.
Word for word · 3
- hraness/wrench★ 7100% same
- hraness/slopcamera★ 7100% same
- hraness/direct★ 2100% same
Edited · 1
- hraness/personal-monorepo-template★ 4100% same
Wrote their own version · 0
None found.
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 repository29 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/AGENTS.mdAGENTS.md
- .agents/skills/cinematic-pack-authoring/AGENTS.mdAGENTS.md
- .agents/skills/percolate-kb/AGENTS.mdAGENTS.md
- .agents/skills/phase-final-reviewer/AGENTS.mdAGENTS.md
- .agents/skills/phase-implementer/AGENTS.mdAGENTS.md
- .agents/skills/phase-orchestrator/AGENTS.mdAGENTS.md
- .agents/skills/phase-reviewer/AGENTS.mdAGENTS.md
- .agents/skills/plan-kb/AGENTS.mdAGENTS.md
- .agents/skills/query-kb/AGENTS.mdAGENTS.md
- .agents/skills/refresh-kb/AGENTS.mdAGENTS.md
- .agents/skills/save-pdf-kb/AGENTS.mdAGENTS.md
- .agents/skills/save-url-kb/AGENTS.mdAGENTS.md
- .agents/skills/write-phase-plan/AGENTS.mdAGENTS.md
- kb/AGENTS.mdAGENTS.md
- src/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- cinematic-pack-authoringSkill
- percolate-kbSkill
- phase-final-reviewerSkill
- phase-implementerSkill
- phase-orchestratorSkill
- phase-reviewerSkill
- plan-kbSkill
- refresh-kbSkill
- save-pdf-kbSkill
- save-url-kbSkill
- write-phase-planSkill
- slopcameraSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 6 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use the cheapest precise view first, then broaden.
- Distinctive: line 20
Read the vault's applicable agent instructions and note conventions.
- Very specific: line 95
Use --mode exact for live model-free search, --mode keyword for QMD full-text retrieval, or --mode semantic for its vector lane.
- Very specific: line 105
Default search also returns bounded explicit graph context around the strongest results.
- Very specific: line 147
When independent queries can run concurrently, compose them with defineWorkflow and runWorkflow or import a packaged workflow.
- Distinctive: line 169
If a structural question is not covered by a named command, inspect the bounded JSON graph in the agent or a short task-local script.
- Distinctive: line 177
Use default hybrid search to discover candidate identities when exact structure does not answer the question.
- Very specific: line 180
Use wordcell list to narrow by authored metadata such as type, status, area, or tags.
- Very specific: line 182
Use wordcell links at depth 1 to inspect immediate explicit relationships and wordcell backlinks for a focused inbound view.
- Very specific: line 187
Use wordcell graph --json only when the question genuinely spans multiple neighborhoods.
- Distinctive: line 189
Read the authoritative notes and cited captures before synthesizing.
- Distinctive: line 195
Do not infer an edge from semantic similarity, or a conclusion from a tag.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Query the knowledge base
Use the cheapest precise view first, then broaden. Markdown files remain the authority; search scores, metadata rows, and graph results are derived views.
Locate the vault
- Resolve
<vault>to the directory containing its managed or authoredindex.md, then set the shell-localKB_ROOTto that path (KB_ROOT=kbfrom a typical repository root, orKB_ROOT=.from inside the vault). - Resolve
<repository>to the repository root when the question concerns a repository path (KB_REPO=.from that root). - Read the vault's applicable agent instructions and note conventions.
- Pass the resolved path to every
--root; do not scan a repository root merely because that is where the agent session started.
Choose the retrieval lane
- Repository file or directory: run
wordcell contextfirst. Read its inherited guides root to nearest, then inspect its maintained knowledge, active plans, dated research, reports, and separate historical-plan group. Open only useful context hubs or records. - Known frontmatter field or tag such as type, status, or area: use
wordcell list. - Known note title, path, or alias: use
wordcell linksorwordcell backlinks, which resolve note identities before returning authored relationships. - A whole-vault structural question or relationship audit: use
wordcell graph --json, then inspect the smallest relevant portion of its canonical output. - A phrase, identity, or concept expressed with different vocabulary: use
wordcell search, whose default hybrid result preserves exact and QMD evidence separately. - Direct provenance for one note or repository path: use
wordcell historyorwordcell history searchwithout changing authored metadata or links. - Recent captures awaiting maintained disposition: use the advisory
wordcell inboxview. - Broad orientation: read
index.md, then follow the smallest useful link trail. Usewordcell catalogwhen an exhaustive disposable inventory is actually needed.
wordcell context src/parser.ts --root "$KB_ROOT" --repo "$KB_REPO"
wordcell list --root "$KB_ROOT" --scope src/parser --where type=plan --json
wordcell list --root "$KB_ROOT" --where type=plan --where status=in-progress --sort area --json
wordcell list --root "$KB_ROOT" --tag retrieval --sort title --json
wordcell backlinks "Plan title or path" --root "$KB_ROOT" --json
wordcell links "Plan title or path" --root "$KB_ROOT" --direction both --depth 1 --limit 25 --json
wordcell relation list "Plan title or path" --root "$KB_ROOT" --json
wordcell graph --root "$KB_ROOT" --json
wordcell search "why browser capture uses the current tab" --root "$KB_ROOT" --json
wordcell search "accepted ingestion plans" --root "$KB_ROOT" --where type=plan --where status=accepted --tag ingestion --json
wordcell search "notes/write-path" --root "$KB_ROOT" --mode exact --no-history --json
wordcell history "notes/write-path" --root "$KB_ROOT" --repo "$KB_REPO" --json
wordcell history search src/parser.ts --root "$KB_ROOT" --repo "$KB_REPO" --json
wordcell inbox --root "$KB_ROOT" --limit 25 --jsonwordcell context prints hub and record summaries, not their bodies. Each record
states the exact repository_scopes declaration that matched, the match depth,
and whether that declaration currently names a file, directory, or absent
future or retired path. Current memory and terminal plans stay in separate
groups. Guides remain
the normative, always-loaded home for ownership, required commands,
prohibitions, invariants, and edit gates. Scope hubs are optional pull-based
rationale, history, examples, evidence, and links; they cannot override a guide
or become the only home of a load-bearing rule. Use --kind file or
--kind directory when auto cannot classify a missing target reliably.
Repeated filters use AND semantics. Metadata paths may be dotted. String and
tag comparisons are case-insensitive; array metadata matches by membership.
Missing sort values come last, with path as the deterministic tie-breaker.
--where addresses authored frontmatter only; it does not filter derived H1
titles or file paths. Unquoted true, false, null, and numeric filter
values are typed. Keep quotes inside the argument to match a string with the
same spelling, for example --where 'external_id="9007199254740993"'.
--scope is an exact, case-sensitive repository-scope filter rather than a
substring or area match. Use it when the desired authored path declaration is
known.
Use hybrid search as discovery
wordcell search first scans current Markdown for identity, phrase, metadata, tag,
and prose matches. By default it runs that exact lane alongside QMD's local
full-text and vector rankings, then combines the ranked lists while retaining
each lane's evidence. Exact title and alias identities stay ahead of broader
matches. The QMD path avoids query expansion and reranking models by default.
The first hybrid or semantic query downloads QMD's compact local embedding model; later queries reuse the local cache. Prewarm explicitly when useful:
wordcell index --root "$KB_ROOT"Use --mode exact for live model-free search, --mode keyword for QMD
full-text retrieval, or --mode semantic for its vector lane. Repeated
--where, --has, and --tag constraints are checked against the live
Markdown snapshot. QMD has no path-allowlist search in the pinned release, so a
selective semantic query over-fetches a bounded global window and reports a
degraded partial lane when that window cannot prove completeness. Treat every
retrieval rank as a lead, not a fact. Open the returned Markdown, read enough
surrounding context, and confirm claims against linked sources or capture
manifests.
Default search also returns bounded explicit graph context around the strongest
results. Supply --related <note> to seed a known neighborhood or --no-graph
when structure does not help. Search does no Git work unless provenance is
requested. Use --history --repo <repository> for optional recent per-note
provenance or --require-history --repo <repository> when the task cannot
proceed with a partial Git lane. --no-history remains an explicit compatibility
form. Graph neighbors and Git history remain separate from primary
text rank. They explain and expand candidates without becoming authored facts,
links, or recency boosts.
wordcell history <note> returns the bounded commit history already associated with
one resolved note. wordcell history search <query-or-path> searches the bounded Git
projection directly and retains hashes, subjects, matched paths, co-change
paths, and incomplete-detail diagnostics. Git co-change is historical evidence,
not permission to write a scope or relationship.
Reuse one snapshot in code mode
For several related queries, prefer one SDK session to repeated CLI process startup:
import { openKnowledgeBase, packSearchContext } from "@hraness/wordcell/sdk";
const kb = await openKnowledgeBase({ root: "kb", repository: "." });
try {
const result = await kb.search({
query: "why browser capture uses the current tab",
graph: { depth: 1 },
history: "auto",
});
console.log(packSearchContext(result).content);
} finally {
await kb.close();
}grep, list, read, links, backlinks, search, history, and
searchHistory share one confined read-only scan. QMD and Git initialize
lazily. The session does not watch Markdown or repository changes. Close it
before a write and open a new session after the final refresh and check.
When independent queries can run concurrently, compose them with
defineWorkflow and runWorkflow or import a packaged workflow. The runner
validates a finite acyclic graph, caps global concurrency, serializes QMD nodes,
and keeps Git concurrency bounded. Do not bypass those resource groups with
unbounded Promise.all calls. Custom workflows use the staged
defineWorkflow<Input>("id").node(...).output(...) builder so dependency
results and the final output remain typed.
Use focused structural views
wordcell graph --json returns the current resolved wikilinks, typed relationships,
diagnostics, and note-level connection counts without creating a second graph
store. Use it when a question spans the vault. Prefer wordcell relation list,
wordcell backlinks, or wordcell links when a known note gives you a narrower starting
point.
wordcell links is cycle-safe and requires an explicit traversal depth and result
limit. wordcell relation list separates authored outbound assertions from derived
inbound relationships while retaining canonical note IDs and source
provenance. Open the returned Markdown before treating an edge as correct: a
typed relationship records an authored assertion, not proof.
If a structural question is not covered by a named command, inspect the bounded JSON graph in the agent or a short task-local script. Do not create or commit a parallel graph database merely to answer one query. A recurring query is evidence for a focused, tested command with an explicit output contract.
Combine meaning with structure
- For a repository-path question, use
wordcell contextbefore broader retrieval. - Use default hybrid search to discover candidate identities when exact structure does not answer the question. Read its lane evidence and partial diagnostics before relying on the order.
- Use
wordcell listto narrow by authored metadata such astype,status,area, ortags. - Use
wordcell linksat depth 1 to inspect immediate explicit relationships andwordcell backlinksfor a focused inbound view. Increase depth only when the first neighborhood is insufficient. Traversal defaults to 50 notes and reports truncation; lower--limitfor tighter agent context or raise it deliberately when a high-degree hub is genuinely relevant. - Use
wordcell graph --jsononly when the question genuinely spans multiple neighborhoods; keep one-off processing task-local. - Read the authoritative notes and cited captures before synthesizing.
A title match may identify a prerequisite, prior version, or supporting note rather than the artifact that owns the current outcome. Confirm status and ownership in the candidate Markdown before answering or editing it.
Do not infer an edge from semantic similarity, or a conclusion from a tag. Do
not write generated backlink sections into notes. If the query exposes stale
metadata or a broken link, repair the authored Markdown and finish with
wordcell refresh --root "$KB_ROOT" and wordcell check --root "$KB_ROOT".
Close any open SDK session before that repair and reopen it after validation.
An authored index.md may declare kb_catalog: authored; refresh and check
then leave it untouched. wordcell catalog --root "$KB_ROOT" renders the exhaustive
inventory on demand. A managed vault keeps the original generated-catalog
behavior. Neither mode changes scanning, graph analysis, semantic indexing, or
attachment validation.
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.

