Agent skill
session-search
Search through historical Claude sessions for code, conversations, and commands. Use when user asks about previous sessions, past conversations, "did I ever", "find in history", or wants to retrieve code/info from earlier chats.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/session-search
SKILL.md
Session Search
Search through your Claude session history stored in ~/.claude/projects/.
Usage
Run the search script with a regex or keyword pattern:
python ~/.claude/skills/session-search/search.py "pattern" [max_results]
Examples
# Find sessions mentioning a specific function
python ~/.claude/skills/session-search/search.py "def parse_config"
# Find discussions about a topic
python ~/.claude/skills/session-search/search.py "kubernetes|docker"
# Find code with specific imports
python ~/.claude/skills/session-search/search.py "from fastapi import"
# Limit results
python ~/.claude/skills/session-search/search.py "error" 10
Output
Returns matches with:
- Session slug/ID and project path
- Timestamp
- Role (user/assistant)
- Matching content with surrounding context
- 1 message before/after for context
Results are sorted by recency (newest first), limited to 20 by default.
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?