Agent skill
search-history
Search Claude conversation history from JSONL files. Use when looking for previous discussions, past decisions, code solutions, or context from earlier conversations.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/search-history
SKILL.md
Conversation History Search
Search through Claude Code conversation history to find relevant past discussions.
When to Use
- Finding previous discussions about a topic
- Recalling past decisions or solutions
- Getting context from earlier conversations
- Looking up how something was implemented before
How to Search
Run the search script from the services directory:
cd ~/.claude/services
python conversation-search.py "search term"
Search Options
| Option | Description |
|---|---|
--list-sessions, -l |
List all sessions with metadata |
--session ID, -s |
Filter to specific session (partial match) |
--context N, -c |
Show N messages before/after (default: 3) |
--max N, -m |
Maximum results (default: 20) |
--verbose, -v |
Show context messages |
--full, -f |
Show full message content |
Examples
# List all available sessions
python conversation-search.py --list-sessions
# Basic search
python conversation-search.py "bulk upload"
# Regex search
python conversation-search.py "context.*percent|usage.*%"
# Search specific session with full output
python conversation-search.py "statusline" --session 6cabef43 --full
# Get more context around matches
python conversation-search.py "error" --context 5 --verbose --max 3
Output Modes
- Default: Preview snippet (50 chars before, 100 after match)
- Verbose (
-v): Adds surrounding message context - Full (
-f): Complete message content
Token Efficiency
The search runs externally, so searching costs 0 tokens. Only the returned results consume context.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?