← 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 · ★ 21 · AI & Automation · score 81
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>`. ### Backlog hygiene (only when queue > 1 file) SessionEnd reclaims the *prefix* snapshots of the Raw it has just written (`reclaim-superseded --keep <that-file>`), but it never looks at an existing backlog. Before sizing the batch, run the pairwise form once — no `--keep` — so strict-prefix duplicates leave the queue: ```bash cortex-vec reclaim-superseded --root <vault_path>/Raw # list only cortex-vec reclaim-superseded --root <vault_path>/Raw --apply --vault <vault_path> ``` Applying is safe: a candidate is removed only when it is a line-for-line prefix of a longer queued recording, so no content is lost. That tool