← ClaudeAtlas

cortex-distilllisted

Distill raw session records into refined Notes and Projects. Use when the user says "提煉", "整理 raw", "distill", or "distill raw records".
XBlueSky/cortexes · ★ 20 · AI & Automation · score 79
Install: claude install-skill XBlueSky/cortexes
# Cortex Distill — Refine Raw Records Extract valuable knowledge from Raw/ session dumps into Notes/ and Projects/. ## Resolve Vault Path Read `~/.cortex/config.json` to get `vault_path`. If the file doesn't exist, tell the user to run `/cortexes:genesis` first. ## Step 1: Find Unprocessed Raw Files List the distill queue: ```bash cortex-vec distill-queue --root <vault_path>/Raw ``` This is **position-anchored**: a Raw counts as distilled only if a `<!-- distilled: ... -->` marker appears in its header (before the first `### User` turn) **or** as its last non-empty line. Do **NOT** `grep` the marker string — a pipeline meta-session's body quotes it dozens of times (it printfs markers onto other files), so `grep -rL '<!-- distilled:'` silently drops genuine work from the queue. To check one file, use `cortex-vec raw-state <file>`. Show the pending list count and ask to proceed. ## Step 1.5: Schedule the Batch (only when queue > 1 file) Size the queue before opening any Raw: ```bash cortex-vec distill-queue --root <vault_path>/Raw --stat ``` Partition by RAW size (the `raw` column) and **present the plan for approval** (do not auto-run): - **Normal lane** — Raws whose raw size fits well inside one session budget (default 100K chars of raw-derived output). Process a batch this session, strictly one Raw at a time. - **Monster lane** — Raws whose complete review clearly exceeds one session budget. One Raw per dedicated session; expect `BUDGET_EXHAUSTED` + `dis