# Search Conversations

> Search previous Claude Code conversations for a keyword or topic and return matching context. Use when the user asks "where did we talk about X", "find the chat about Y", "search past conversations", or wants to recall context from a prior session.

- **Type:** Skill
- **Install:** `agentstack add skill-lohomi15-claude-search-conversations-search-conversations`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Lohomi15](https://agentstack.voostack.com/s/lohomi15)
- **Installs:** 0
- **Category:** [Search](https://agentstack.voostack.com/c/search)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Lohomi15](https://github.com/Lohomi15)
- **Source:** https://github.com/Lohomi15/claude-search-conversations/tree/main/skills/search-conversations

## Install

```sh
agentstack add skill-lohomi15-claude-search-conversations-search-conversations
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# search-conversations

Finds mentions of a keyword or phrase across every Claude Code session stored in `~/.claude/projects/*/*.jsonl` and returns matching snippets with surrounding context.

## When to use

- User asks about a prior conversation: "where did we discuss X", "which chat was it where we talked about Y", "find the session about Z".
- User wants to recover context from a past session that isn't in memory.
- User references something you don't recognize and suspects it was discussed before.

## How to run

Pass the query as a single argument. Quote multi-word phrases.

```bash
python3 ~/.claude/skills/search-conversations/search.py "nagarhole"
python3 ~/.claude/skills/search-conversations/search.py "coorg trip" -c 2 -n 10
```

Flags:
- `-c N` — include N turns of context before/after each hit (default 1).
- `-n N` — cap number of hits (default 20).
- `--chars N` — truncate each snippet line to N chars (default 400).
- `--since YYYY-MM-DD` — only include matches on or after this date.
- `--until YYYY-MM-DD` — only include matches on or before this date.

Use date flags when the user references timing ("last week", "yesterday", "in April"). Resolve the relative date to YYYY-MM-DD before passing it in.

Output is grouped per hit: timestamp, session id (first 8 chars), project dir, a context window of `[user]`/`[assistant]` turns, and the full jsonl path.

## What to do with results

1. Summarize the matching conversations for the user — dates, what was discussed, which session(s).
2. If the user wants more detail, read the jsonl path directly with the Read tool or grep it for surrounding turns.
3. If there are no matches, say so plainly; don't fabricate recall.
4. **Offer to resume** the best match (see below). Users usually want to jump back in, not just read a snippet.

## Resuming a matched conversation

`/resume` is a built-in Claude Code slash command — it can't be invoked via Skill or Bash. Only the user can type it. So the flow is confirm → print command → user runs it.

1. After presenting matches, pick the most likely target (usually the newest hit, or the one whose snippet best matches the query). If there are multiple strong candidates, list them briefly and ask which.
2. Confirm with the user in one line: *"Want to resume this one?"*
3. On yes, print the **full** session UUID with the exact command to run:

   > Run `/resume ` to jump back in.

Guidelines:
- Always print the full UUID, not the truncated 8-char prefix shown in search output. Pull it from the `sessionId` field or the jsonl filename.
- Do NOT attempt to call `/resume` yourself via Skill or Bash — it will fail.

## Notes

- Search is case-insensitive and substring-based.
- Results are sorted newest first.
- The current active session is included — matches there are just "earlier in this chat".

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Lohomi15](https://github.com/Lohomi15)
- **Source:** [Lohomi15/claude-search-conversations](https://github.com/Lohomi15/claude-search-conversations)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-lohomi15-claude-search-conversations-search-conversations
- Seller: https://agentstack.voostack.com/s/lohomi15
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
