/session-search
For CLI agents WITHOUT subagent support (e.g., Codex CLI). Search previous code agent sessions for specific work, decisions, or code patterns.
$ npx -y skills add pchalasani/claude-code-tools --skill session-search --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/session-search
Context preview
The summary Claude sees to decide when to auto-load this skill.
For CLI agents WITHOUT subagent support (e.g., Codex CLI). Search previous code agent sessions for specific work, decisions, or code patterns.
SKILL.md
session-search.SKILL.mdname: session-search
description: For CLI agents WITHOUT subagent support (e.g., Codex CLI). Search previous code agent sessions for specific work, decisions, or code patterns.
> **If you are Claude Code:** Do NOT use this skill directly. Use the > `session-searcher` subagent 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
1. **Understand the query**: Identify what the user is looking for (code patterns, decisions, specific work, design direction) 2. **Search with aichat**: Run `aichat search --json -n 10 "[query]"` (use `-g "project"` to filter by project) 3. **Parse results**: Use `jq` to extract fields from JSONL output (session_id, project, created, snippet, file_path) 4. **Deep dive if needed**: Read session files at `~/.claude/projects/*/[session-id].jsonl` (max 3 files) 5. **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:
1. **Key Findings**: 2-3 bullet points answering the query 2. **Relevant Sessions**: Session IDs and dates for reference 3. **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 `--json` flag 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
Read more
name: session-search description: For CLI agents WITHOUT subagent support (e.g., Codex CLI). Search previous code agent sessions for specific work, decisions, or code patterns.
> **If you are Claude Code:** Do NOT use this skill directly. Use the > `session-searcher` subagent 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
1. **Understand the query**: Identify what the user is looking for (code patterns, decisions, specific work, design direction) 2. **Search with aichat**: Run `aichat search --json -n 10 "[query]"` (use `-g "project"` to filter by project) 3. **Parse results**: Use `jq` to extract fields from JSONL output (session_id, project, created, snippet, file_path) 4. **Deep dive if needed**: Read session files at `~/.claude/projects/*/[session-id].jsonl` (max 3 files) 5. **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:
1. **Key Findings**: 2-3 bullet points answering the query 2. **Relevant Sessions**: Session IDs and dates for reference 3. **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 `--json` flag 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
Practical productivity tools for Claude Code, Codex-CLI, and similar CLI coding agents.
Repo: pchalasani/claude-code-tools
Other skills on claude-code-tools.
- /recover-context
Extract full context of the last task from the most recent parent session
Open skill - /dynamic-workflow
Create, review, run, inspect, pause, resume, and cancel durable JavaScript workflows that coordinate multiple headless Codex agents. Use for dynamic fan-out and fan-in, per-item analysis, multi-stage agent pipelines, loops or branches driven by worker results, long background
Open skill - /add-pattern
Use this skill when you learn one or more design pattern(s) in the
Open skill - /patterns
Design patterns for the Langroid multi-agent LLM framework. Covers
Open skill - /msg
Inter-agent communication via the msg CLI. Use this when you need to send messages to other agent sessions, read incoming messages, or coordinate with other agents in tmux panes.
Open skill - /tmux-cli
CLI utility to communicate with other CLI Agents or Scripts in other tmux panes; use it only when user asks you to communicate with other CLI Agents or Scripts in other tmux panes.
Open skill

