session-search
Search and retrieve previous agent session history for code patterns and design decisions.
Install
mkdir -p .claude/skills/session-search && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3049" && unzip -o skill.zip -d .claude/skills/session-search && rm skill.zipInstalls to .claude/skills/session-search
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
For CLI agents WITHOUT subagent support (e.g., Codex CLI). Search previous code agent sessions for specific work, decisions, or code patterns.Key capabilities
- →Executes structured searches across session logs
- →Extracts specific design decisions
- →Parses JSONL session metadata
- →Summarizes code patterns from historical sessions
How it works
Utilizes aichat to query JSONL logs and jq to extract specific content from session files.
Inputs & outputs
When to use session-search
- →Find past authentication design decisions
- →Locate code patterns used in previous sessions
- →Review project progress from last month
- →Search for specific work snippets
About this skill
If you are Claude Code: Do NOT use this skill directly. Use the
session-searchersubagent via the Task tool instead - it handles this more efficiently without polluting your context.
session-search
Search and find previous code agent sessions (Claude-Code or Codex-CLI) for specific work, decisions, or code patterns.
Workflow
- Understand the query: Identify what the user is looking for (code patterns, decisions, specific work, design direction)
- Search with aichat: Run
aichat search --json -n 10 "[query]"(use-g "project"to filter by project) - Parse results: Use
jqto extract fields from JSONL output (session_id, project, created, snippet, file_path) - Deep dive if needed: Read session files at
~/.claude/projects/*/[session-id].jsonl(max 3 files) - Summarize: Return a focused summary with key findings and references
Run aichat search --help to see all options (date filters, branch filters, etc.)
and JSONL field names.
Output Format
Return a concise summary containing:
- Key Findings: 2-3 bullet points answering the query
- Relevant Sessions: Session IDs and dates for reference
- Specific Content: Code snippets or quotes if directly relevant
Format as clean markdown, not raw JSON.
Example
Query: "Find sessions where we discussed authentication design"
aichat search --json -n 10 "authentication design"
Summary:
- Session abc123 (Dec 10): Discussed JWT vs session-based auth, decided on JWT
- Session def456 (Dec 8): Implemented refresh token rotation pattern
Constraints
- ALWAYS use
--jsonflag with aichat search (otherwise it spawns interactive UI) - NEVER return raw JSON output to the user - summarize and distill findings
- NEVER read more than 3 session files per query
- If no results found, suggest alternative search terms
- ONLY report information directly observed in files - never infer or extrapolate
Error Handling
If aichat search command fails or is not found, ask user to install:
uv tool install claude-code-tools # Python package
cargo install aichat-search # Rust search TUI
Prerequisites:
- Node.js 18+ (for action menus)
- Rust/Cargo (for aichat-search)
If user doesn't have uv or cargo:
curl -LsSf https://astral.sh/uv/install.sh | sh # uv
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # Rust
When not to use it
- →When using agents with native subagent support
- →When searching non-agent documentation
- →If the project lacks session log files
Prerequisites
Limitations
- →Limited to reading three sessions per search
- →Requires structured CLI log format
- →Does not infer project state
How it compares
It specifically aggregates historical context from session-persistent logs rather than searching the codebase.
Compared to similar skills
session-search side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| session-search (this skill) | 1 | 7mo | Review | Intermediate |
| braindump | 7 | 5mo | No flags | Beginner |
| super-search | 10 | 2mo | Review | Beginner |
| mem-search | 8 | 4mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by pchalasani
View all by pchalasani →You might also like
braindump
huytieu
Quick capture of raw thoughts with intelligent domain classification and competitive intelligence extraction
super-search
supermemoryai
Search your coding memory. Use when user asks about past work, previous sessions, how something was implemented, what they worked on before, or wants to recall information from earlier sessions.
mem-search
thedotmack
Search claude-mem's persistent cross-session memory database. Use when user asks "did we already solve this?", "how did we do X last time?", or needs work from previous sessions.
baoyu-danger-x-to-markdown
JimLiu
Converts X (Twitter) tweets and articles to markdown with YAML front matter. Uses reverse-engineered API requiring user consent. Use when user mentions "X to markdown", "tweet to markdown", "save tweet", or provides x.com/twitter.com URLs for conversion.
hindsight-cloud
vectorize-io
Store team knowledge, project conventions, and learnings from tasks. Use to remember what works and recall context before new tasks. Connects to Hindsight Cloud. (user)
huntly-knowledge-base
lcomplete
This skill should be used when the user asks about their saved content, bookmarks, starred articles, highlights, reading history, tweets, or knowledge base in Huntly sqlite database. Triggers include "我的收藏", "知识库", "我保存了什么", "my bookmarks", "my library", "what did I save".