AgentSkillsCN

conversation-search

搜索索引化的对话历史,查找过往对话、定位话题讨论的时间,或识别哪些项目中曾展开过相关对话。当用户提出诸如“我们什么时候讨论过X?”、“查找关于Y的对话”、“我们在哪个项目中聊过Z?”、“给我看看提到W的对话”等问题时,可使用此技能。无论是在所有项目中,还是仅限于当前项目,此技能都能派上用场。

SKILL.md
--- frontmatter
name: conversation-search
description: Search indexed conversation history to find past conversations, locate when topics were discussed, or identify which project conversations occurred in. Use when user asks questions like "when did we discuss X?", "find conversations about Y", "in which project did we talk about Z?", or "show me conversations mentioning W". Works across all projects or within current project.

Conversation History Search

Search through indexed past conversations with Claude to find relevant discussions.

How to Search

Run the search command with the user's query:

bash
bash ${CLAUDE_PLUGIN_ROOT}/skills/conversation-search/scripts/search.sh --query "search terms" --limit 10

Options:

  • --query: Search terms (required). Supports prefix matching.
  • --limit: Maximum results (default: 20)
  • --json: Output results as JSON for programmatic processing

Presenting Results

Show the user:

  • Number of matching conversations found
  • For each result: conversation ID, project path, date, and snippet
  • Suggest using /conversation-history:load-conversation <id> to load full transcripts

First-Time Setup

If search returns no results and the user seems surprised, they may need to run the initial indexing:

code
/conversation-history:index-history

This indexes all existing conversations from ~/.claude/projects/ into the database.