What problem does it solve? Large tool outputs from commands like Bash, Grep, or WebFetch consume excessive context tokens in Claude Code sessions, forcing agents to re-run commands or re-quote raw blobs. This Skill installs a hook that saves oversized outputs to disk, indexes them with a local model, and replaces the agent's view with a compact summary and chunk index. ## Core Features & Use Cases - Automatic Output Indexing: A PostToolUse hook fires after every tool call, saves outputs exceeding a token threshold (default 2000) to ~/.claude/tool-results/, and generates a semantic chunk index via qwen3.5:4b on Ollama. - Context Replacement: Returns the index through hookSpecificOutput.updatedToolOutput so the agent sees only the summary and chunk table instead of the raw output. - On-Demand Chunk Retrieval: The agent fetches specific line ranges later using Read offset/limit from the saved file instead of re-running commands. - Fail-Open Design: Any error (Ollama down, missing model, timeout) passes the original tool result through unchanged. - Use Case: After running a command that lists thousands of library files, the agent receives a chunk index grouped by subsystem and reads only the relevant 40-line chunk when answering a follow-up question. ## Quick Start Install the context-index hook for Claude Code by setting up Ollama with the qwen3.5:4b model, copying the indexer scripts to ~/.claude/hooks/, and registering the PostToolUse hook in ~/.claude/settings.json.