claude-historian — Claude Code plugin: session history search
claude-historian — a plugin that searches your past sessions before web research, planning, and debugging. Reuses solutions you've already found and prevents redundant work.
MIT ★ 78 updated 2026-03-05
/plugin marketplace add Vvkmnn/claude-emporium
/plugin install claude-historian@claude-emporiumWhat claude-historian does
claude-historian activates through hooks at key moments: before web searches, before entering plan mode, before launching agents, and after command failures. When relevant history is found, Claude reuses it; when not, work continues without interruption.
The plugin relies on the claude-historian-mcp MCP server and exposes seven search tools: general session search, related question discovery, error fix lookup, file change tracking, workflow pattern detection, recent session browsing, and plan history search. All four main hooks are on by default but can be toggled in ~/.claude/settings.json under the claude-historian key.
Typical savings run 200–800 tokens per avoided duplicate search.
What it helps with
- find how you fixed an error in a past session
- recall solutions to similar problems you've solved
- avoid repeating web searches on the same topic
- discover successful workflow patterns from your history
- track changes to a specific file across your sessions
Example prompts for the agent
- Find past solutions for a 404 error you've encountered before
- /search-historian React component caching strategies I've used
- Show me implementation plans I created for similar API designs
How to install claude-historian
Plugin marketplace
/plugin marketplace add Vvkmnn/claude-emporium/plugin install claude-historian@claude-emporiumStep by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own
Questions about claude-historian
How do I install claude-historian in Claude Code?
Run two commands in order: /plugin marketplace add Vvkmnn/claude-emporium, then /plugin install claude-historian@claude-emporium. Make sure the MCP server is installed: claude mcp add historian -- npx claude-historian-mcp.
What does claude-historian do?
It automatically searches your session history before web research, planning, and debugging. When it finds relevant past work, it suggests reusing it instead of starting from scratch.
What do I need for claude-historian to work?
You need the claude-historian-mcp MCP server, installed with claude mcp add historian -- npx claude-historian-mcp. Without it, the plugin won't function.
Source text
claude-historian · MIT
# Claude Historian
Automatic history search for Claude Code. Checks past sessions before you do redundant web research, planning, or debugging.
## Installation
```bash
/plugin marketplace add Vvkmnn/claude-emporium
/plugin install claude-historian@claude-emporium
```
## Requirements
MCP server: [`claude-historian-mcp`](https://www.npmjs.com/package/claude-historian-mcp)
```bash
claude mcp add historian -- npx claude-historian-mcp
```
## Hooks
| Event | Trigger | What It Does |
|-------|---------|-------------|
| `PreToolUse` | `WebSearch` · `WebFetch` | Checks history before web research |
| `PreToolUse` | `EnterPlanMode` | Searches past plans before planning |
| `PreToolUse` | `Task` | Checks tool patterns before launching agents |
| `PostToolUse` | `Bash` | Suggests error solutions after command failures |
## Commands
| Command | Description |
|---------|-------------|
| `/search-historian <query>` | Search past sessions for solutions, decisions, context |
## MCP Tools
| Tool | Purpose |
|------|---------|
| `search_conversations` | General history search |
| `find_similar_queries` | Find related past questions |
| `get_error_solutions` | Find how errors were fixed |
| `find_file_context` | Track file changes |
| `find_tool_patterns` | Discover successful workflows |
| `list_recent_sessions` | Browse recent work |
| `search_plans` | Find past implementation plans |
## Settings
Configure in `~/.claude/settings.json` under `claude-emporium`:
```json
{
"claude-emporium": {
"suggest_siblings": false,
"claude-historian": {
"search_before_web": false,
"search_before_plan": false,
"search_before_task": false,
"search_after_error": false
}
}
}
```
| Key | Default | What It Controls |
|-----|---------|-----------------|
| `search_before_web` | `true` | Check history before web research |
| `search_before_plan` | `true` | Search past plans before planning |
| `search_before_task` | `true` | Check tool patterns before launching agents |
| `search_after_error` | `true` | Suggest error solutions after command failures |
| `suggest_siblings` | `true` | Show install suggestions for sibling plugins (global) |
## How It Works
Hooks inject prompts that trigger `claude-historian-mcp` tools at high-impact moments. If relevant history exists, Claude reuses it. If not, it proceeds silently.
Typical savings: 200-800 tokens per avoided redundant search.
## License
MIT
© vvkmnn · MIT · Vvkmnn/claude-emporium