agent-cost-report
Believable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude…
Analyze large files (>500 lines) using handle-based Nucleus queries for 97% token savings. Use when you need to search, filter, aggregate, or explore documents too large for direct context.
Claude Code
$ npx -y skills add yogthos/Matryoshka --skill lattice --agent claude-code
Codex
$ npx skills add yogthos/Matryoshka --skill lattice -a codex -y
Cursor
$ npx skills add yogthos/Matryoshka --skill lattice -a cursor -y
Gemini CLI
$ npx skills add yogthos/Matryoshka --skill lattice -a gemini-cli -y
GitHub Copilot
$ npx skills add yogthos/Matryoshka --skill lattice -a github-copilot -y
OpenCode
$ npx skills add yogthos/Matryoshka --skill lattice -a opencode -y
Windsurf
$ npx skills add yogthos/Matryoshka --skill lattice -a windsurf -y
name: lattice description: Analyze large files (>500 lines) using handle-based Nucleus queries for 97% token savings. Use when you need to search, filter, aggregate, or explore documents too large for direct context.
Use the Lattice MCP tools to analyze files that are too large to read directly. Lattice stores query results server-side and returns compact handle stubs, achieving 97%+ token savings.
The standard workflow is: **load → query → expand → close**
1. `lattice_load` — Open the file (starts a session) 2. `lattice_query` — Run Nucleus S-expression commands (returns handle stubs like `$res1`) 3. `lattice_expand` — Inspect actual data from a handle when you need to see contents 4. `lattice_close` — End the session when done
(grep "pattern") ; Regex search — returns handle to matching lines (fuzzy_search "query" 10) ; Fuzzy match — top N results by relevance (lines 10 20) ; Get specific line range (start end)
(filter RESULTS (lambda x (match x "pattern" 0))) ; Keep matching items (map RESULTS (lambda x (match x "(\\d+)" 1))) ; Extract regex group from each item
(count RESULTS) ; Count items (returns scalar directly) (sum RESULTS) ; Sum numeric values (auto-extracts numbers)
(match str "pattern" 1) ; Extract regex capture group from a string
(list_symbols) ; List all functions, classes, methods, headings, etc. (list_symbols "function") ; Filter by kind: "function", "class", "method", "interface", "type" (get_symbol_body "funcName") ; Get full source code of a symbol (find_references "identifier"); Find all usages of an identifier
**Task: Find and count timeout errors in a log file**
1. Load the document:
lattice_load("/path/to/server.log")→ `Loaded: 15,234 lines, 2.1 MB`
2. Search for errors:
lattice_query('(grep "ERROR")')→ `$res1: Array(342) [2024-01-15 ERROR: Connection timeout...]`
3. Filter for timeouts:
lattice_query('(filter RESULTS (lambda x (match x "timeout" 0)))')→ `$res2: Array(47) [2024-01-15 ERROR: Connection timeout...]`
4. Count them:
lattice_query('(count RESULTS)')→ `Result: 47`
5. Inspect a sample if needed:
lattice_expand("$res2", limit=5)→ Shows first 5 actual timeout error lines
6. Close when done:
lattice_close()
**Task: Understand a large TypeScript file**
1. Load and list symbols:
lattice_load("/path/to/large-module.ts")
lattice_query('(list_symbols)')→ `$res1: Array(45) [function handleRequest, class Router, ...]`
2. Get a specific function:
lattice_query('(get_symbol_body "handleRequest")')→ Returns full source code of the function
3. Find all references:
lattice_query('(find_references "handleRequest")')→ `$res2: Array(8) [line 45: handleRequest(req), ...]`
Process documents 100x larger than your LLM's context window—without vector databases or chunking heuristics.
Believable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude…
Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing…
Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing…
Keep a durable record of work passed between Bots in the shared Hindsight memory bank. Use when handing work to another Bot, when…