using-cortex

A guide for deciding when to search a Cortex vault, the user's personal store of notes, projects, weekly reports, and session records. It sends searches through the Cortex query process when the request refers to earlier work or an explicitly listed topic.

In plain words
What is it for?
Use it to resume earlier tasks, find notes about a named topic, check what was discussed before, or continue work from a previous session.
Why use it?
It prevents unnecessary searches that waste time and surface unrelated notes, while helping recover relevant context when a real connection to past work exists.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/xbluesky/cortexes/using-cortex
Any agent
npx skills add XBlueSky/cortexes --skill using-cortex
Clone the repo
git clone --depth 1 https://github.com/XBlueSky/cortexes

Made for: Claude Code, Codex.

Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 869 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00113 $0.00869
Opus 5 $0.00056 $0.00434
Sonnet 5 $0.00023 $0.00174
Haiku 4.5 $0.00011 $0.00087

Measured yesterday against content hash eabdb59a9a5c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

using-cortex scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/using-cortex/SKILL.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Using Cortex — When to Consult the Vault

The cortex vault is the user's own knowledge base: distilled Notes, Projects, Weekly reports, and Raw session records. This skill decides when consulting it is warranted, and hands the actual search to the cortex-query skill.

Retrieval is worth doing when there is a concrete signal that prior context exists. It is not worth doing on speculation — an unprompted search costs the user tokens and latency, and surfacing unrelated notes pollutes the answer.

Search the vault when any of these is true

  1. Explicit request. The user asks for it: "check cortex", "查一下 cortex", "有沒有記錄過", "do I have notes on this".
  2. Reference to prior work. The user points at something earlier: "之前那個", "上次的", "我記得有", "我們討論過", "that ticket", "the project we set up", "continue where we left off".
  3. Listed topic. The request names a topic that the SessionStart hook actually listed for this vault. The list is authoritative — match against what it showed, not against a guess about what might exist.
  4. Resuming a session. The user asks to pick up, continue, or hand off work from a previous session.

In each case, invoke the cortex-query skill rather than searching the vault directly — that skill knows the retrieval infrastructure, including cortex-vec and its fallbacks.

Do not search the vault when

  • The user has not given any of the four signals above. A question being difficult, technical, or open-ended is not a signal.
  • The user picked option 4 ("直接開始工作") from the SessionStart menu, or skipped the menu. That choice means "do not go to the vault"; honour it for the rest of the session unless the user later asks.
  • The user says "don't check cortex", "just answer directly", or similar.
  • The task is self-contained: editing code in the current repo, answering from the current turn, or anything the conversation already supplies.

When in doubt, answer directly. If the answer would have been better with vault context, the user can ask — and signal 1 then applies.

Read the full file on GitHub · 79 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 79 lines · 113 tokens per session scan A eabdb59a9a5c

Subscribe to this mod's changes

using-cortex is a skill published in the GitHub repository XBlueSky/cortexes (20 stars, last pushed 26d ago), licensed Apache-2.0. It adds 113 tokens to every session and 869 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

vera

Code search over the current repository. Before reading files to answer "where is X", "how does Y work", "find Z", or "what calls W", run vera search " " or vera references first. Use vera grep for exact strings and regex, vera structural for definitions, routes, and env reads. Do not read multiple files hoping to…

VeraTools/Vera · 96 tokens

semantic-search

Code search for this repo — pick the right Beacon tool for the question: exact symbol lookup, reference tracing, file outline, or semantic search.

sagarmk/beacon-plugin · 32 tokens

release-gatekeeper

End-to-end release validation for Connapse — the 'final boss' before any version ships. Downloads the latest alpha from GitHub Releases, deploys an isolated Docker instance (separate from production), then systematically tests every feature: UI via Playwright, API via curl/REST, MCP tools, search quality, security…

Destrayon/Connapse · 183 tokens

create-tickets

Batch-create GitHub issues from a brainstorming discussion. Decomposes ideas into properly-sized tickets with labels, milestones, and project board placement. Trigger when user says: create tickets, make tickets, turn ideas into issues, create issues from brainstorm, create issues from discussion, batch create issues.

Destrayon/Connapse · 62 tokens

discover-work

Deep research across codebase, GitHub issues, discussions, project board, and architecture docs to discover new tasks, gaps, technical debt, and improvement ideas. Trigger when user says: discover work, find tasks, what needs doing, audit codebase, find gaps, technical debt audit, backlog discovery, brainstorm tasks…

Destrayon/Connapse · 77 tokens

next-task

Recommend the best next task to work on based on open GitHub issues. Analyzes priority, dependencies, milestone urgency, and codebase readiness. Trigger when user asks: what should I work on, what is next, next task, pick a task, what to do next, suggest work, prioritize tasks.

Destrayon/Connapse · 66 tokens