Agent skill

Ref Query

by Abilityai in Abilityai/cornelius

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".

MITAuto-check: notes

Install Ref Query

skills CLI
$ npx skills add Abilityai/cornelius --skill ref-query -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Abilityai/cornelius ref-query --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Abilityai/cornelius.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/ref-query .claude/skills/ref-query && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ref-query
GitHub stars
109
Token cost
~1.2k tokens
SKILL.md length
426 words
Files
1
Skills in repo
56
Repo updated
First seen
Licence
MIT

At a glance

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".

  • Works in 4 steps: Classify the question → Scan (deterministic filters) → Apply read-time interpretation (mandatory) → …
  • SKILL.md covers State Dependencies, Process, Verification and This skill must refuse to
  • Calls git

What it does

Ref Query is an agent skill from Abilityai/cornelius. 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 asof freshness, and ALWAYS prints the asof date so staleness is legible. Distinct from /recall, which searches cognitive insights. Company is the default scope. Read-only.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: AI-powered second brain template for Claude Code + Obsidian. The licence is MIT.

Example prompts

  • “what do we know about Acme Corp as of today?”
  • “which engagements are active and expiring in 90 days?”
  • “list our competitors”
  • “/ref-query”

Requirements

  • Pre-approved tools (allowed-tools): Read, Bash, Glob, Grep

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Classify the question
  2. Scan (deterministic filters)
  3. Apply read-time interpretation (mandatory)
  4. Answer

What it can do on your machine

Read from SKILL.md and the folder at commit fd5e9a4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Bash
    • Glob
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ref Query loads about 1.2k tokens when it runs. Until then it costs about 108 tokens; SKILL.md has 426 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~108
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Bash, Glob, Grep

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Abilityai/cornelius at commit fd5e9a4, republished under its MIT licence (© Abilityai). 426 words, ~1,213 tokens.

Download SKILL.mdSave it as .claude/skills/ref-query/SKILL.md (or your agent's skills folder).
name
ref-query
description
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.
allowed-tools
Read, Bash, Glob, Grep
automation
manual
user-invocable
true
argument-hint
[scope=Company] <entity name | filter, e.g. 'engagements active expiring 90d' | 'competitors'>
metadata.version
1.0
metadata.created
2026-07-08
metadata.author
Cornelius
metadata.changelog
1.0: Initial version — deterministic frontmatter scan + fuzzy fallback with read-time interpretation (active>superseded, valid_until, as_of discount vs…

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.changelog above — 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

SourceLocationReadWriteDescription
Company familyBrain/Company/{people,orgs,products,engagements,market}/*.md✓Entity notes + frontmatter
Search wrapperresources/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:
    bash
    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:

bash
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)"; done

For 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.

Show full SKILL.md (214 more words)Show less
Step 3 — Apply read-time interpretation (mandatory)

Before presenting any fact:

  1. Prefer status: active over superseded (a superseded note is history — show it only if asked "what changed?").
  2. A fact past its valid_until is stale-unless-renewed — say so.
  3. Discount by as_of age against the per-type Freshness SLA (COMPANY-BRAIN-SCHEMA): market product/pricing ~14d · engagement ~30d · client organization ~90d · person ~180d · own product on-change. Over SLA → tag ⚠ stale (as_of N days old).
  4. Always print the as_of date 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_of date printed and a freshness verdict.
  • A real filter ("which engagements are active?") returns exactly the notes whose frontmatter matches (cross-check the count against grep -rlE '^status: active' engagements/*.md | wc -l).
  • Nothing is written; git status is unchanged after a query.

This skill must refuse to

  • Write or mutate any note (read-only).
  • Present a superseded fact as current, or a fact without its as_of date.
  • Set/alter provenance, crystallize, lifecycle-classify, or promote a record into a cognitive insight.

© Abilityai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/ref-query of Abilityai/cornelius.

Open the folder on GitHubat commit fd5e9a4

Compare with similar skills

Ref Query next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ref Query compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ref Query this skillAbilityai/cornelius109—~1.2kAutomated safety check: NotesMIT
React18 String Refsgithub/awesome-copilot40k1 repos~527Automated safety check: PassMIT
Documentation Lookupaffaan-m/ECC274k1 repos~670Automated safety check: PassMIT
Documentation Lookupaffaan-m/ECC274k—~640Automated safety check: PassMIT
Context7 Documentation Lookupaffaan-m/ECC274k4 repos~1.2kAutomated safety check: PassMIT
Temporal Golang Prosickn33/agentic-awesome-skills47k2 repos~2.3kAutomated safety check: PassMIT

Similar skills

  • React18 String Refs

    github/awesome-copilot

    Official

    Provides exact migration patterns for React string refs (ref="name" + this.refs.name) to React.createRef() in class components.

    40k GitHub starsUsed in 1 repo~527 tokens
    Auto-check passed
  • 通过 Context7 MCP 使用最新的库和框架文档,而非训练数据。当用户提出设置问题、API参考、代码示例或命名框架(例如 React、Next.js、Prisma)时激活。

    274k GitHub starsUsed in 1 repo~670 tokens
    DatabasesAuto-check passed
  • 訓練データの代わりにContext7 MCP経由で最新のライブラリとフレームワークドキュメント使用。セットアップの質問、APIリファレンス、コード例、またはユーザーがフレームワーク(例:React、Next.js、Prisma)に名前を付けるときにアクティベーション。

    274k GitHub stars~640 tokensUpdated 2 days ago
    DatabasesAuto-check passed
  • Fetches current library and framework documentation through the Context7 MCP instead of relying on training data, resolving a library ID before each query.

    274k GitHub starsUsed in 4 repos~1.2k tokens
    DevelopmentAuto-check passed
  • Temporal Golang Pro

    sickn33/agentic-awesome-skills

    A skill your agent uses when building durable distributed systems with Temporal Go SDK.

    47k GitHub starsUsed in 2 repos~2.3k tokens
    Backend & APIsAuto-check passed
  • Temporal Developer

    latitude-dev/latitude-llm

    This skill should be used when the user asks to "create a Temporal workflow", "write a Temporal activity", "debug stuck workflow", "fix non-determinism error", "Temporal Python", "Temporal…

    4.7k GitHub stars~1.5k tokensUpdated yesterday
    Backend & APIsAuto-check passed

More from Abilityai/cornelius

All 56 skills in this repo
  • Nano Banana Image Generator

    Abilityai/cornelius

    Generate images using Google's Nano Banana (Gemini 2.5 Flash Image).

    109 GitHub stars~1.2k tokensUpdated 15 days ago
    Auto-check: notes
  • Changelog Protocol

    Abilityai/cornelius

    Protocol for creating dated changelog files after significant agent sessions.

    109 GitHub stars~555 tokensUpdated 15 days ago
    Auto-check passed
  • Create Article

    Abilityai/cornelius

    Create long-form articles from knowledge base insights. An agent skill from Abilityai/cornelius.

    109 GitHub stars~2.1k tokensUpdated 15 days ago
    Auto-check: notes
  • Epistemic Classification

    Abilityai/cornelius

    Framework for distinguishing research findings from hypotheses and speculative synthesis.

    109 GitHub stars~1.5k tokensUpdated 15 days ago
    Auto-check passed
  • Get Youtube Transcript

    Abilityai/cornelius

    Extract the transcript from a YouTube video by URL or video ID.

    109 GitHub stars~525 tokensUpdated 15 days ago
    Auto-check: notes
  • Insight Capture Format

    Abilityai/cornelius

    Standard format for capturing and documenting insights in the knowledge base.

    109 GitHub stars~616 tokensUpdated 15 days ago
    Auto-check passed

Questions about Ref Query

What does Ref Query do?

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". Ref Query is an agent skill from Abilityai/cornelius.", "list our competitors".

How do I install Ref Query in Claude Code?

Run `npx skills add Abilityai/cornelius --skill ref-query -a claude-code`. Or copy the skill folder (.claude/skills/ref-query in Abilityai/cornelius) into .claude/skills/ref-query in your project. Claude Code loads it when a task matches its description.

How do I install Ref Query in Codex?

Run `npx skills add Abilityai/cornelius --skill ref-query -a codex`. Or copy the skill folder (.claude/skills/ref-query in Abilityai/cornelius) into .agents/skills/ref-query in your project. Codex loads it when a task matches its description.

Can I use Ref Query in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Abilityai/cornelius --skill ref-query -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ref-query, .gemini/skills/ref-query, .github/skills/ref-query and .opencode/skills/ref-query in your project.

What does Ref Query need to run?

Going by SKILL.md and its folder, Ref Query needs the command-line tools its instructions call (git). Its frontmatter pre-approves these tools: Read, Bash, Glob, Grep.

Does Ref Query access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Ref Query safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Ref Query use?

Ref Query is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ref Query use?

About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ref Query?

Skills that share tags, products or a category with Ref Query: React18 String Refs (github/awesome-copilot, 40k stars), Documentation Lookup (affaan-m/ECC, 274k stars), Documentation Lookup (affaan-m/ECC, 274k stars) and Context7 Documentation Lookup (affaan-m/ECC, 274k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ref Query?

Abilityai (a GitHub organization) maintains it in Abilityai/cornelius, which has 109 GitHub stars. The repository holds 56 skills in this directory. The repository was last updated on September 22, 2026.

Source: Abilityai/cornelius on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.