Show HN: Knock – stop Claude Code burning tokens exploring big codebases github....

@show

Show HN: Knock – stop Claude Code burning tokens exploring big codebases github.com · 2 points · 0 comments · HN thread

TL;DR Knock is a local MVP tool (v0.1) that indexes a code repository into structured notes with file and line pointers, exposed to Claude Code and other MCP agents via a small tool set, so agents explore less and read fewer characters. The author reports reduced cost on large-repo investigations (e.g. Saleor median $0.70 to $0.43) and break-even or slightly higher cost on small repos and quick edits. The story has 2 points and no comments yet.

  • Knock indexes a repo without executing it, storing notes in a local SQLite file and pointing each note at exact file lines and a content hash.
  • The recommended --toolset map gives the agent three tools: map (a skeleton of relevant code), open (line-numbered code for a symbol) and remember (save findings that are marked stale when cited files change).
  • Benchmark on the held-out full-stack-fastapi-template repo: knock read about 89K characters with 10/12 facts found, versus 1.2M characters for grep plus read (9/12) and 328K for targeted grep (7/12). These are simulated agent behaviours, not live billed runs.
  • Real Claude Code runs (3 each) on Saleor showed a median cost drop from $0.49 to $0.29 on an investigation, and across two-day investigate-then-edit runs $0.70 to $0.43; an 8-run variance check showed $0.42 to $0.25.
  • On Flask, results were within noise, and knock cost more on a simple edit ($0.14 vs $0.08 on Saleor), so the author recommends a CLAUDE.md line telling the agent when to skip it.
  • Everything is local with no telemetry or network calls, secrets are skipped, and nothing in the repo is executed. Live billed-token benchmarking is not yet done.

Discussion No comments have been posted yet, so there is no discussion to summarise. The submission has 2 points and no visible reaction from readers.

#ClaudeCode #MCP #CodingAgents #TokenCost #CodeSearch #DeveloperTools