Find prior LifeOS work — sessions, ISAs, conversations — by topic, partial words, or date phrases like 'yesterday' / 'last week' / 'YYYY-MM-DD'. Deterministic Bun CLI searches five sources in parallel (work.json registry, session-names.json titles, MEMORY/WORK/ dir names, ISA bodies, conversation jsonl via ripgrep), parses date phrases into bounded since/until filters, scores by token-overlap × recency, dedupes by slug, returns ranked results with snippets. Standalone mode presents results then asks; paired mode executes the request informed by found context. USE WHEN context search, prior work, browse sessions, recall, remember, previous sessions, context recovery, what did we do, find session, search history, what was that project, pick up where we left off, resume, look up old work, cold start, yesterday's work, last week, find that session, the one about. NOT FOR searching published content like blog posts/newsletters/tweets (use _CONTENTSEARCH) or the typed-graph Knowledge Archive (use Knowledge).
~/.claude/LIFEOS/USER/CUSTOMIZATIONS/SKILLS/ContextSearch/Workflows/ directory. Every invocation routes to the one CLI:| Workflow | Trigger | File |
|---|---|---|
| Search (inline) | context search, /cs, prior work, recall, find session, resume, date phrases | Tools/ContextSearch.ts |
bun run ~/.claude/skills/ContextSearch/Tools/ContextSearch.ts "$ARGUMENTS" --pretty --limit 10
--pretty keeps the human-readable block when the skill is invoked from inside a Claude Code session (where stdout is not a true TTY). Pipe to --json for structured output to jq.# Limit results
bun run ~/.claude/skills/ContextSearch/Tools/ContextSearch.ts "$ARGUMENTS" --limit 5
# Constrain by date
bun run ~/.claude/skills/ContextSearch/Tools/ContextSearch.ts "$ARGUMENTS" --since 2026-05-01
# JSON for programmatic use
bun run ~/.claude/skills/ContextSearch/Tools/ContextSearch.ts "$ARGUMENTS" --json | jq '.results[0]'
"yesterday markdown" becomes a bounded since/until of yesterday only, plus token search for markdown.path looks promising, Read it for full detail.═══ CONTEXT: <query> ═══════════════════════
📋 RESULTS (N, newest+best first):
• <slug>
task: ... | phase: ... | progress: ... | effort: ... | <recency>d ago | score: ... | sources: ...
↳ "<snippet from matched source>"
<path to ISA or jsonl>
Searched: work.json=N, names=N, dirs=N, isa=N, jsonl=N
════════════════════════════════════════════════
{ query, cleaned_query, tokens, since, until, stats, results: [{ source[], slug, sessionUuid, name, task, phase, progress, effort, score, recencyDays, snippet, path }] }markdown extended find sessions named Research Type Markdown Extended Images even though "markdown extended" is not a substring of that name. The query is tokenized (lowercase, [^a-z0-9]+ split, stopwords removed) and any candidate that shares ≥1 non-stopword token gets scored.today, yesterday, day before yesterday, last week, last month, N days ago, and YYYY-MM-DD parse out of the query as bounded date filters; the remaining tokens still score against content. yesterday and today use single-day windows (since AND until); last week uses a 7-day rolling window.type:"user" line's timestamp to recover the actual session start date — that's what date filters compare against.~/.claude project's own conversation directory under ~/.claude/Projects/ for jsonl content (dir name derived from $HOME at runtime — path with / and . mapped to -). Other Claude project directories on the same machine are out of scope by design./cs <topic>), present results and ask what they want to do. When invoked as a paired primer to an unrelated request, run the search silently and use the top results to anchor the answer — don't dump the search block into the response unless the user asked.MEMORY/WORK/ directories — they're conversation-only sessions whose only structural trace is the auto-generated name. For those, the tool uses jsonl mtime for recency. If the file's been re-read recently the date will skew newer than the actual conversation.User: "what did we do with the Telegram bot?"
→ bun run Tools/ContextSearch.ts "telegram bot"
→ Tokens [telegram, bot] hit work.json + ISA bodies + jsonl
→ Returns telegram-monitor-revival, fix-telegram-channels-plugin-broken, ranked by recency
User: "open up that test extended markdown document that you made yesterday"
→ bun run Tools/ContextSearch.ts "test extended markdown document yesterday"
→ Date phrase 'yesterday' parses out → since/until = 2026-05-07 only
→ Tokens [test, extended, markdown, document] hit jsonl content
→ Returns "Research Type Markdown Extended Images" session in top-3 with snippet
User: "what did I work on last week?"
→ bun run Tools/ContextSearch.ts "last week"
→ Date phrase parses to since=7d-ago, no token filter
→ Returns all sessions from the past 7 days, newest first
echo '{"ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","skill":"ContextSearch","workflow":"Search","input":"8_WORD_SUMMARY","status":"ok|error","duration_s":SECONDS}' >> ~/.claude/LIFEOS/MEMORY/SKILLS/execution.jsonl