AI Developer Tools
Cap'n Hook
Persistent memory for coding agents that saves discovered codebase answers and auto-deletes them when files change, reducing repeat token usage by 77%.
Cap'n Hook
What is Cap'n Hook?
Cap'n Hook is a persistent memory system for coding agents (like Claude Code and Codex). It saves the files that answer a developer's question and automatically invalidates the answer when underlying files change.
Cap'n Hook vs Similar AI Tools
| Pricing Model | Free | Free | Custom Pricing | Free, Paid |
| Free Credits | ||||
| Key Features |
|
|
|
|
| Pros |
|
|
|
|
| Cons |
|
|
|
|
| Best For |
|
|
|
|
How to use Cap'n Hook?
- 1Install globally with npm or bun: npm install -g capn-hook
- 2Navigate to your project and run: capn init
- 3Agents will see a prompt to ask capn before searching; after a discovery, run: capn chart "<question>" --files <file1,file2> [--details "<context>"]
- 4In future sessions, run: capn ask "<question>" to retrieve saved answers.
Cap'n Hook Key Features
- Session-start hook integration for Claude Code and Codex
- Auto-invalidation of saved answers via file content hashing (SHA256)
- Local-first QMD semantic search index (with optional embedding or BM25)
- Minimal integration: one note injected at session start
- Supports charting with file paths and optional details
- Commands: ask, chart, unchart, bust, prune, list, context
Cap'n Hook Use Cases
- Reducing token costs on repeat codebase questions during agent sessions
- Speeding up coding agent workflows by avoiding re-exploration
- Persisting codebase knowledge across agent sessions with auto-cleanup
Cap'n Hook Pricing & Free Credits
Cap'n Hook currently operates on a Free model.
This tool is completely free to use
Cap'n Hook Pros & Cons
Pros
- 77% fewer tokens on repeat questions (measured on 5 production codebases)
- Auto-invalidates stale answers when files change
- Local-first, no server or daemon required
Cons
- Cold ask can take a few seconds on first use with embeddings
- Requires ~300MB download for embedding models (optional BM25 mode available)
- Limited to text-based codebase exploration; not for general memory
What is Cap'n Hook best for?
- Developers using AI coding agents (Claude Code, Codex)
- Teams looking to reduce token costs and speed up agent codebase navigation