"Wait, are you reading that file again?"
A Claude Code hook server that intercepts file reads and makes Claude prove it actually needs the full file. First read? Denied — here's a 3-line summary instead. Still need it? Read again and it goes through. Fifth time? "Hey buddy, you already read that."
One daemon. All your projects. One command to set up.
Claude reads files like someone who opens the fridge every 10 minutes hoping new food appeared. It didn't. It's the same fridge. Same food. Same 847 lines of main.rs.
- Deny-first summaries — On first
Read, Claude gets denied with a file summary: description, public symbols, line-range map. If it still needs the full file, it reads again. Second read goes through clean. - Repeat-read tracking — Second read goes through clean. Third read and beyond gets a nudge: "this file was already read 3x this session — consider using offset/limit for targeted reads."
- Line-count gating — Files under 30 lines are passed through without intervention. They're small enough to just read. Only files over the threshold get the summary-first treatment. (Configurable via
line_thresholdin project config.) - Session-start orientation — On
SessionStart, Claude receives a full project map. No more "let me explore the codebase" spirals. - Background indexing — Tree-sitter extracts symbols, Haiku generates one-line descriptions, everything lands in TOML summaries under
.claude/summaries/. - Worktree sharing — Projects accessed from different git worktrees share the same index. It resolves to the git root, so your summaries stay in one place.
- Working set eviction — After more than 40 other file reads, a file's count resets automatically. Next read shows the summary again. Keeps the working set current without manual cleanup.
┌──────────────┐ ┌──────────────┐ ┌──────────┐
│ Claude Sess A│ │ Claude Sess B│ │ Subagent │
└──────┬───────┘ └──────┬───────┘ └────┬─────┘
│ │ │
└────────┬────────┴───────┬───────┘
│ HTTP hooks │
┌───────▼────────────────▼───────┐
│ youwhatknow — localhost:7849 │
└───────┬────────────────┬───────┘
│ routes by cwd │
┌────────┴──┐ ┌──────┴───────┐
│ Project A │ │ Project B │
│ Index │ │ Index │
└───────────┘ └──────────────┘
│
tree-sitter · haiku · TOML
youwhatknow setup → hooks + daemon + initial index
# 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: cargo build --releasecd your-project
youwhatknow setupThat's it. This creates .claude/ and .claude/summaries/, merges hook config into .claude/settings.local.json, starts the daemon if it isn't running, and triggers initial indexing. Existing hooks in the settings file are preserved — it merges, not overwrites.
# Variants:
youwhatknow setup --shared # writes to .claude/settings.json (team-shared)
youwhatknow setup --no-index # skip initial indexingIf you prefer to wire things up yourself, add to ~/.claude/settings.json:
{
"hooks": {
"PreToolUse": [{
"matcher": "Read",
"hooks": [{
"type": "http",
"url": "http://localhost:7849/hook/pre-read"
}]
}],
"SessionStart": [{
"matcher": "startup",
"hooks": [{
"type": "http",
"url": "http://localhost:7849/hook/session-start"
}]
}]
}
}Then start the daemon:
youwhatknowIt indexes your projects lazily on first request. Shuts itself down after 30 minutes of inactivity. Next session brings it back.
youwhatknow # start the daemon
youwhatknow setup # set up hooks for current project
youwhatknow status # show daemon uptime, active sessions, registered projects
youwhatknow summary <path> # preview a file's summary (primes the read count if session is active)
youwhatknow reset <path> # reset read count for a file (next read shows summary again)
youwhatknow init # SessionStart hook handler (called automatically by hooks)~/.config/youwhatknow/config.toml:
port = 7849 # daemon port
session_timeout_minutes = 60 # stale session cleanup
idle_shutdown_minutes = 30 # auto-shutdown when boredAll settings have sensible defaults. You probably don't need this file.
cargo build --releaseRequires Rust 2024 edition. A Nix flake is included for reproducible builds:
nix buildRust, Tokio, Axum, tree-sitter, and a mild sense of exasperation.
"No Claude was harmed in the making of this tool. Just mildly inconvenienced."