1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41---
name: file-history
description: Find which sessions edited a file and get conversation context
---
# File History Search
Find past Claude Code sessions that worked on specific files.
## Usage
Provide a file path or feature name to search for:
```
/file-history src/components/AuthForm.tsx
/file-history authentication
/file-history useAnalysis hook
```
## What Happens
I'll dispatch the `history-context` agent to:
1. Search file-history index for matching sessions
2. Read relevant conversations
3. Return structured context with full session IDs
## Direct CLI Usage
You can also use the tool directly:
```bash
# Find sessions for a file
~/.claude/commands/claude-history.py file "AuthForm.tsx"
# Search conversations
~/.claude/commands/claude-history.py search "authentication"
# Read a specific session
~/.claude/commands/claude-history.py session <id> --read
```