--- name: context-os-cli description: > This skill should be used when users ask about their work context, what they're working on, recent activity, file relationships, or knowledge graph structure. Uses context-os CLI (including graph health/search/stats commands) combined with grep/glob for context restoration. Every claim MUST cite a receipt ID for user verification. --- # Context OS CLI Skill Use `context-os` CLI + grep + glob together for context restoration. **Core insight:** The CLI finds WHICH files matter. Grep/Read find WHAT's in them. --- ## Quick Start (90% of queries) ```bash # 1. Full context for a topic (start here — one command does it all) context-os context "pixee" --format json # 2. If you need to drill deeper, use targeted queries context-os query flex --files "*pixee*" --agg count,recency --format json # 3. Read hot files to understand what they are Read: # 4. Search content IN those files Grep: pattern="hubspot|integration" path= # 5. Check git for recent changes git log --oneline -10 -- ``` **Start with `context` for broad questions, drop to `query` subcommands for targeted drilldowns.** --- ## CLI Commands ### Top-Level Commands | Command | Purpose | |---------|---------| | `context ` | **Start here.** Composed query across flex, heat, chains, sessions, timeline, co-access | | `query ` | Targeted queries (flex, heat, chains, etc.) | | `intel health` | Check intel service health | | `intel name-chain ` | Name a chain using AI | | `daemon status` | Show daemon sync state + registration | | `daemon once` | Run a single sync cycle | ### Query Subcommands | Command | Purpose | |---------|---------| | `query flex --files "*pattern*"` | Find files by path pattern | | `query flex --time 7d` | Find files touched in time window | | `query heat --time 30d` | File heat metrics (specificity, velocity, score, level) | | `query co-access ` | Find files accessed together | | `query session ` | All files in a session | | `query sessions --time 7d` | Session-grouped data | | `query chains` | List conversation chains | | `query timeline --time 7d` | Timeline data for visualization | | `query verify ` | Verify a previous query result | | `query receipts` | List recent query receipts | **Always use `--format json`** — table output truncates long paths. --- ## The `context` Command **The highest-level query.** One command gives you executive summary, heat, work clusters, insights, continuity, timeline, and suggested reads. ```bash context-os context "tastematter" --format json context-os context "pixee" --time 14d --format json ``` **Response includes:** - `executive_summary` — status, work_tempo, hot_file_count, focus_ratio - `current_state` — key_metrics, evidence (file excerpts) - `continuity` — left_off_at, pending_items, chain_context - `work_clusters` — co-accessed file groups with PMI scores - `suggested_reads` — prioritized files (with surprise flag for unexpected) - `timeline` — weekly focus areas with top files and access counts - `insights` — abandoned file detection, anomalies - `verification` — receipt_id, files/sessions/pairs analyzed - `quick_start` — commands and directory structures from matching files **When to use `context` vs `query`:** | Need | Use | |------|-----| | "What's happening with project X?" | `context "X"` | | "What files are hot right now?" | `query heat` | | "Find files matching a pattern" | `query flex --files` | | "What did I work on this week?" | `query flex --time 7d` | | "Show me session history" | `query sessions` | | "What files go with this one?" | `query co-access ` | --- ## The `query heat` Command Shows file heat metrics with percentile-based classification. ```bash context-os query heat --time 30d --format json context-os query heat --files "*tastematter*" --sort specificity --format csv ``` **Options:** ``` -t, --time