using-cortex

using-cortex is a skill for Claude Code from XBlueSky/cortexes. It costs 113 tokens per session (866 once invoked), scanned A, original, Apache-2.0.

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 Code

Written for Claude Code: SessionStart hook event.

Part of the cortexes plugin — 6 skills, 6 commands, 2 hooks shipped together

Good fit Use it to resume earlier tasks, find notes about a named topic, check what was discussed before, or continue work from a previous session.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xbluesky/cortexes/using-cortex
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.

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.

Or install cortexes, the plugin that ships this one along with the rest of its 6 skills, 6 commands, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for using-cortex

README.md
[![agentmods](https://agentmods.dev/badge/skills/xbluesky/cortexes/using-cortex/github.svg)](https://agentmods.dev/skills/xbluesky/cortexes/using-cortex)
Your own site
<a href="https://agentmods.dev/skills/xbluesky/cortexes/using-cortex"><img src="https://agentmods.dev/badge/skills/xbluesky/cortexes/using-cortex/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for using-cortex

Your own site · 80×15
<a href="https://agentmods.dev/skills/xbluesky/cortexes/using-cortex"><img src="https://agentmods.dev/badge/skills/xbluesky/cortexes/using-cortex.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 866 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00113 $0.00866
Opus 5.5 $0.00045 $0.00346
Sonnet 5.5 $0.00023 $0.00173
Haiku 4.5 $0.00011 $0.00087

Measured 1mo ago against content hash d2f10a13ca80, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo ago.

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, 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. 1mo ago Changed d2f10a13ca80
  2. 1mo ago 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 (24 stars, last pushed 29d ago), licensed Apache-2.0. It adds 113 tokens to every session and 866 once invoked, about $0.0005 per session on Opus 5.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

llm-wiki

Build and maintain an LLM-curated knowledge base from papers, articles, transcripts, notes and project findings. Ingest sources into linked Markdown, answer questions with citations, lint or upgrade a wiki, and preserve useful synthesis across sessions and agents. Also capture verified task experience, consolidate…

praneybehl/llm-wiki-plugin · 130 tokens

setup

Set up and verify a first memtomem memory source. Use for onboarding, choosing an index path, or confirming that search works.

memtomem/memtomem · 29 tokens

status

Check memtomem configuration, storage, index counts, dense coverage, and warnings. Use when search is empty, degraded, or needs diagnosis.

memtomem/memtomem · 31 tokens

orient

Use when user invokes /orient with a topic keyword, entity type, project name, time qualifier, or combination. Also triggers on "what do we know about X", "remind me about X", "where did we leave off on X". Provides targeted context loading — searches the MCP Memory Server graph, knowledge files, journal entries, and…

harnessprotocol/harness-kit · 80 tokens

garden-tending

Tend the knowledge garden — diagnose vault health, condense project memos into project.md overviews, create/merge cross-project topics, fix broken links, archive superseded notes, extend trails. Trigger on "tend the garden", "condense", "update project overview", "check vault health", "where are we with X?", "what…

linxule/memex-plugin · 131 tokens

memory

Use when user invokes /memory with a subcommand (search, trace, add, episode, status). Also triggers on "search my memory for X", "add to memory", "what do I know about X" (when membrain is available), "memory status", "memory trace". Searches and manages the membrain knowledge graph via MCP tools or HTTP API.

harnessprotocol/harness-kit · 76 tokens