A Claude Code hook server

you what (k)now?

"Wait, are you reading that file again?"

You know the look. Claude's halfway through a task and decides to read src/main.rs for the fifth time. 847 lines. Again. You stare at your token counter and whisper "you what now?"

Instead of 2000 lines of code, Claude gets a summary. If it still wants the full file, it has to ask twice.

Make it stop →

A typical Tuesday with Claude (dramatized only slightly)

claude — very busy reading the same file

We need to talk about Claude's reading habits.

We love Claude. Claude is great. But Claude has a problem. It reads files like someone who opens the fridge every 10 minutes hoping new food appeared.

Claude
Let me read src/main.rs to understand the project structure.
Claude (30 seconds later)
I should check src/main.rs to see how the server starts.
You
you literally just read that
youwhatknow
denied. src/main.rs (847 lines) — Entry point, server startup. Public: main().
If this is enough, don't read the file. Read again if you need it.
Claude
...okay, the summary is enough. Thanks.

A polite but firm intervention.

youwhatknow sits between Claude and the filesystem. "You can have more if you want, but here's what's on your plate already."

1

Claude reaches for a file

Claude Code fires a PreToolUse hook before every Read. youwhatknow gets the file path and session ID via HTTP before the read happens.

POST /hook/pre-read
2

Small files get a free pass

Files with 30 lines or fewer are waved through without intervention. Targeted reads with offset/limit also pass.

line_threshold = 30
3

First read: denied with a summary

Instead of 2000 lines of code, Claude sees: file description, public symbols, line-range map. "If this is sufficient, do not read the file. Read again for the full file."

deny + summary
4

Second read: allowed clean

Claude asked twice, so it genuinely needs the file. Goes through with no context injection, no nudge, no friction.

5

Repeat offenders get nudged

Third read and beyond: allowed, but with a reminder. "This file has been read 3x this session. Consider using offset/limit for targeted reads."

read 3x this session
6

Day-one orientation

On SessionStart, Claude gets a full project map injected automatically. No more "let me explore the codebase" spirals.

POST /hook/session-start

Files fade. Context stays fresh.

After more than 40 other file reads, a file's read count resets to zero. Next read shows the summary again. No stale state, no manual cleanup — the working set stays current automatically.

Configurable via eviction_threshold in your project config. Or use youwhatknow reset <path> to do it manually.

One daemon. All projects.

Claude Session A
Claude Session B
Subagent
↓ HTTP hooks ↓
youwhatknow — localhost:7849
↓ routes by cwd ↓
Project A Index
Project B Index
Project C Index
tree-sitter • haiku descriptions • TOML

Six reasons to stop the madness.

</>

Summary first, file second

Claude gets description, symbols, and line ranges. Has to ask twice for the full file. Less context waste.

Working set eviction

After 41+ intervening file reads, stale counts reset automatically. No manual cleanup.

"You already read that"

Per-session tracking nudges Claude on 3rd+ reads to use offset/limit.

Stupid simple setup

One command: youwhatknow setup. Hooks, daemon, indexing — all handled. No YAML nightmares.

All projects, one process

The daemon loads project indexes lazily. First request for a new project? Indexed in the background. Zero waiting.

Invisible when off

Daemon not running? Claude works normally. HTTP hooks fail silently. It's there when you want it, gone when you don't.

Three commands. Maybe two.

install pick one
$ curl --proto '=https' --tlsv1.2 -LsSf https://github.com/wavefunk/youwhatknow/releases/latest/download/youwhatknow-installer.sh | sh

# Or: nix flake (see docs)
# Or: build from source
$ cargo build --release
terminal the whole thing
$ cd your-project
$ youwhatknow setup

# Creates .claude/ and .claude/summaries/
# Merges hook config into .claude/settings.local.json
# Starts the daemon if not already running
# Triggers initial project indexing
# That's genuinely it.
terminal variants & commands
$ youwhatknow setup --shared    # writes to .claude/settings.json (team-shared)
$ youwhatknow setup --no-index  # skip initial indexing
$ youwhatknow status            # daemon uptime, active sessions, projects
$ youwhatknow summary src/main.rs # preview a file's summary
$ youwhatknow reset src/main.rs   # reset read count for a file
Manual hook setup

If you prefer to configure hooks manually, add this to .claude/settings.local.json:

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Read",
        "url": "http://localhost:7849/hook/pre-read"
      }
    ],
    "PostToolUse": [
      {
        "matcher": "Read",
        "url": "http://localhost:7849/hook/post-read"
      }
    ],
    "SessionStart": [
      {
        "url": "http://localhost:7849/hook/session-start"
      }
    ]
  }
}
Optional config.toml
# ~/.config/youwhatknow/config.toml
# All settings have sensible defaults.
port = 7849
session_timeout_minutes = 60
idle_shutdown_minutes = 30