docs

Skills & Commands

Skills

cortex-broadcast auto

Trigger: After a Raw has been distilled, to fuse it into related existing pages ("broadcast", "compound this into the vault"), or auto-dispatched at the end of the distill flow.

llm-wiki style broadcast ingest — conversational update of related existing pages when a Raw has been distilled. Use when the user says "broadcast", "跑 broadcast", "compound this into the vault", "merge pending-merge", "process broadcast queue", or when cortex-distill invokes broadcast inline after Step 8 commit (automatic dispatch for every new / pending-merge Raw).

broadcastprocess broadcast queue

cortex-distill auto

Trigger: When the user wants to distill Raw session records into Notes/Projects ("提煉", "整理 raw", "distill").

Distill raw session records into refined Notes and Projects. Use when the user says "提煉", "整理 raw", "distill", or "distill raw records".

distill this week's rawdistill raw records

cortex-evolve auto

Trigger: When the user wants to save knowledge to the vault ("存到 cortex", "記一下"), or when the session-suggest hook recommends saving.

Save knowledge to the cortex vault. Use when the user says "存到 cortex", "記一下", "save to cortex", "記到筆記", "cortex evolve", or when the session-suggest hook recommends saving content. Handles Notes and Projects.

save to cortexnote this decision downremember this

cortex-query auto

Trigger: When the user wants to search the vault ("查 cortex", "之前有記過"), or when the request names a topic the SessionStart hook listed for this vault.

Search and retrieve content from the cortex vault — the user's external memory. Use (1) when the user says "查 cortex", "之前有記過", "cortex 裡有沒有", "check my notes", "what did I write about", AND (2) PROACTIVELY — before answering any non-trivial question about ongoing projects, internal company tooling, cortex-vec, plugin development, NAS debugging, infrastructure workflows, or any topic that resembles prior work the user might have notes on. When the SessionStart hook lists vault topics and the user's request matches one, search cortex BEFORE asking clarifying questions or guessing. Treat the vault as authoritative prior context: searching it cheaply is always better than reinventing an answer the user already wrote down.

check cortex for nginx noteshave I written about this beforewhat did I write about cortex-vec

cortex-takeoff auto

Trigger: When context is running low and work needs to hand off to a later session ("交接", "takeoff", "交棒"). Produces temporary hand-off batons — one per work line — that are never committed or indexed.

Create or resume a session takeoff baton — a curated, ephemeral, git-ignored hand-off note that lets the next Claude session continue a long-running task. A repo can hold several batons at once, one per work line (topic). Use when the user says "交接", "takeoff", "交棒", "context 快滿了交接給下個 session", "hand off to next session", "/cortex:takeoff", "takeoff resume", or "takeoff done". The baton is scaffolding, not knowledge: it is never committed, distilled, broadcast, or indexed.

hand off to the next sessiontakeoff resumetakeoff done

using-cortex auto

Trigger: When the user refers to earlier work ("上次的", "之前那個", "we discussed"), asks to resume a previous session, or names a topic the SessionStart hook listed — routes the request to cortex-query. Stays out of the way otherwise.

Use when the user asks to check the cortex vault, refers to earlier work ("last time", "that project", "we discussed", "之前那個", "上次的"), asks to resume something from a previous session, or names a topic the SessionStart hook listed for this vault. Routes the request to the cortex-query skill so the answer is grounded in the user's own notes instead of re-derived. Do not use for general questions, for fresh work with no prior-context signal, or when the user has asked to skip the vault.

上次那個 nginx 的問題後來怎麼解的continue where we left offwe discussed this last week — what did we decide

Commands

/cortex:broadcast

Run broadcast on a distilled Raw — update related existing pages conversationally

/cortex:broadcast --list

/cortex:distill

Distill raw session records into refined Notes and Projects

/cortex:distill this week/cortex:distill 2026-06-30

/cortex:evolve

Save knowledge to the cortex vault (Notes or Projects) and update index

/cortex:evolve

/cortex:genesis

Initialize cortex vault — set up config, vault structure, and rebuild index

/cortex:genesis /srv/cortex/cortex:genesis ~/cortex

/cortex:takeoff

Create, resume, or clear a session hand-off baton (one per work line)

/cortex:takeoff vec-index-rebuild/cortex:takeoff resume/cortex:takeoff done vec-index-rebuild

Hooks

  • SessionEnd — Auto-generates a full report (commits, findings, decisions) and saves it to the vault's Raw/ on session end — the entry point for automatic capture. It also reclaims redundant snapshots, so one conversation stays one Raw across /clear and --resume.
  • SessionStart — Detects the current repo at session start and injects relevant vault memory into context, so Claude starts with prior background already loaded.

Tips

  • Let cortex-query search the vault before answering questions about existing projects or internal tooling — far cheaper than re-exploring or asking.
  • distill automatically dispatches broadcast afterward to fuse new knowledge into existing pages; no need to run it manually.
  • The vault is the source of truth (markdown + git); the vector store can always be rebuilt with /cortex:genesis.

Watch out

  • The takeoff baton is temporary scaffolding — it is never committed, distilled, broadcast, or indexed. Don't rely on it as the only place long-term knowledge lives.
  • Semantic search requires OPENAI_API_KEY and the cortex-vec CLI installed; missing either means cortex-query can't retrieve results.