ref-query
Skill109 starsChanged 36 days agoMITView on GitHub
Structured, temporal lookup against a reference scope — "what do we know about Acme Corp as of today?", "which engagements are active and expiring in 90 days?", "list our competitors". Respects status (active over superseded), validity windows, and as_of freshness, and ALWAYS prints the as_of date so staleness is legible. Distinct from /recall, which searches cognitive insights. Company is the default scope. Read-only.
In this repository61 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adviseSkill
- ai-crystallizeSkill
- analyze-kbSkill
- auto-discoverySkill
- benchmark-memorySkill
- brain-mergeSkill
- changelog-protocolSkill
- coherence-sweepSkill
- compute-lifecycleSkill
- create-articleSkill
- create-explanatory-imageSkill
- decideSkill
- deep-researchSkill
- detect-tensionsSkill
- dialecticSkill
- domain-watchSkill
- elicitation-techniquesSkill
- epistemic-classificationSkill
- epub-chapter-extractorSkill
- extract-document-insightsSkill
- extract-insightsSkill
- find-connectionsSkill
- first-runSkill
- get-perspective-onSkill
- get-youtube-transcriptSkill
- git-commit-pushSkill
- graduate-insightsSkill
- incubation-loopSkill
- ingest-sourceSkill
- insight-capture-formatSkill
- insight-interviewSkill
- integrate-recent-notesSkill
- learn-new-thingsSkill
- manage-reference-dataSkill
- manage-thinking-topicsSkill
- manage-watching-domainsSkill
- multi-format-book-extractorSkill
- nano-banana-image-generatorSkill
- propagate-changeSkill
- quick-searchSkill
- reasoning-checksSkill
- recallSkill
- ref-auditSkill
- ref-bridgeSkill
- ref-ingestSkill
- ref-reconcileSkill
- ref-refreshSkill
- refresh-indexSkill
- ref-supersedeSkill
- scheduled-runSkill
- scope-mountSkill
- search-vaultSkill
- self-diagnosticSkill
- start-hereSkill
- synthesize-insightsSkill
- talkSkill
- test-memory-systemSkill
- think-about-itSkill
- update-changelogSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 58
Before presenting any fact:
- Very specific: line 59
Prefer status: active over superseded (a superseded note is history — show it only if asked "what changed?").
- Distinctive: line 76
Write or mutate any note (read-only).
≈ “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
Ref Query
ℹ️ First, set expectations: before anything else, print one short line with this skill's version and its most recent change — the top entry of
metadata.changelogabove — e.g.ref-query v1.0 — recent: initial version. Then proceed.
Answer a structured question about reference records with the temporal contract applied. This is not /recall — /recall searches the user's cognitive insights; ref-query reads the CRM/market source of truth and honours status/validity/as_of.
Read first: resources/layered-brains/COMPANY-BRAIN-SCHEMA.md → "The temporal model" (read-time interpretation + the per-type Freshness SLA). This skill enforces those rules.
State Dependencies
| Source | Location | Read | Write | Description |
| Company family | Brain/Company/{people,orgs,products,engagements,market}/*.md | ✓ | Entity notes + frontmatter | |
| Search wrapper | resources/local-brain-search/run_search.sh | ✓ | Fuzzy "tell me about X" under a core,Company mount |
Process
Step 1 — Classify the question
- Entity lookup ("what do we know about X as of today?") → resolve the note (Grep by name/alias, or a mounted search) and read it.
- Filtered list (by
type/relationship/status/expiry window) → deterministic frontmatter scan (below), not semantic search — the answer must be exact and reproducible. - Fuzzy / exploratory ("who might overlap with X?") → mounted semantic search:
BRAIN_READ_SCOPE=core,Company resources/local-brain-search/run_search.sh "<query>" --limit 10 --json
Step 2 — Scan (deterministic filters)
Frontmatter is the query surface. Examples:
cd Brain/Company
# all active competitors
grep -rlE '^relationship: competitor' */*.md | while read f; do grep -qE '^status: active' "$f" && echo "$f"; done
# active engagements + their as_of
for f in engagements/*.md; do grep -qE '^status: active' "$f" && printf "%s as_of=%s valid_until=%s\n" \
"$(basename "$f" .md)" "$(grep -m1 '^as_of:' "$f" | cut -d' ' -f2)" "$(grep -m1 '^valid_until:' "$f" | cut -d' ' -f2)"; doneFor an "expiring in N days" filter, compare valid_until to today + N. Note: notes that predate incremental valid_until adoption have no window — report them as "no recorded term" rather than dropping them.
Step 3 — Apply read-time interpretation (mandatory)
Before presenting any fact:
- Prefer
status: activeoversuperseded(a superseded note is history — show it only if asked "what changed?"). - A fact past its
valid_untilis stale-unless-renewed — say so. - Discount by
as_ofage against the per-type Freshness SLA (COMPANY-BRAIN-SCHEMA):marketproduct/pricing ~14d ·engagement~30d · clientorganization~90d ·person~180d · ownproducton-change. Over SLA → tag⚠ stale (as_of N days old). - Always print the
as_ofdate next to each fact ("Trinity pricing as of 2026-06-13").
Step 4 — Answer
Compact, sourced, staleness-legible. One line per record: name — key fact (as_of YYYY-MM-DD [· ⚠ stale] · status). For an entity lookup, summarise the body + list its [[relations]] + the freshness verdict.
Verification
- A real entity question ("what do we know about Acme Corp as of today?") returns the note's facts with the
as_ofdate printed and a freshness verdict. - A real filter ("which engagements are
active?") returns exactly the notes whose frontmatter matches (cross-check the count againstgrep -rlE '^status: active' engagements/*.md | wc -l). - Nothing is written;
git statusis unchanged after a query.
This skill must refuse to
- Write or mutate any note (read-only).
- Present a
supersededfact as current, or a fact without itsas_ofdate. - Set/alter provenance, crystallize, lifecycle-classify, or promote a record into a cognitive insight.
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.

