Context Mode & Token Optimization
This skill provides operational patterns for navigating massive repositories while conserving context tokens using indexed searches, AST filters, and structured outputs.
When to Use
- Reading large log files (>500 lines) or analyzing multi-megabyte code repositories.
- Performing symbol lookups across hundreds of files without flooding context.
- Running high-volume batch executions or lint sweeps.
Operational Guidelines
- Targeted Line Range Views: Avoid dumping entire files; view slices using line offsets (
view_filewithStartLineandEndLine). - Grep Before View: Use ripgrep (
grep_search) to locate exact function definitions or usages before loading the containing file. - Subagent Offloading: For deep exploratory research, invoke an isolated research subagent (
invoke_subagent) to read docs and summarize findings back to parent context.