返回 Skill 列表
extension
分类: AI Agent 能力无需 API Key

search-conversations

搜索过去的Claude Code对话。当用户说“搜索对话”、“找到那次聊天”、“我们讨论了什么”、“我们在哪里谈到”、“查找过去的会话”、“找到关于X的对话”、“搜索历史”、“我问过什么”、“记得当我们”、“那次关于的讨论”时使用。也会在没有上下文的情况下引用先前工作或所有格的过去时态问题时触发。

person作者: jakexiaohubgithub

search-conversations

Extraction

python3 ~/.claude/skills/search-conversations/scripts/extract_conversations.py --days 3

| Option | Effect | |--------|--------| | --days N | Days from last activity (not today) | | --from-today | Days from today instead | | --all-projects | Cross-project (implies --from-today) | | --project /path | Filter to specific project | | --compact | No metadata, more conversation | | --min-exchanges N | Skip sessions with < N exchanges | | --ids abc,def | Fetch specific conversations | | --paths /path.jsonl | Direct file paths |

Output: Default shows files, tools, errors + conversation. --compact omits metadata.

Time modes: --days N counts from last activity (useful when returning to old projects). --all-projects or --from-today counts from today (calendar-based).

Workflow

  1. Identify the lens from user intent (see Routing table below)

  2. Extract recent context using the script with lens-appropriate parameters:

    python3 ~/.claude/skills/search-conversations/scripts/extract_conversations.py --days N [flags]
    

    Use the Parameters table to select --days, flags, and any supplementary data to gather.

  3. Apply lens questions to analyze the extracted conversations

  4. Deepen the search using what you learned from the initial extraction:

    • Extract additional timeframes with the script (--days 30, --all-projects)
    • Search for specific keywords, project names, or patterns that surfaced:
      qmd search "keyword from context" -c conversations -n 15 --files
      
    • Extract those specific paths: python3 ... --paths /found/conv.jsonl

    This step surfaces older context, related discussions, or cross-project patterns that complement the initial extraction.

Keep index updated: Run qmd update periodically to index new sessions.


Lenses

Routing

| User Says | Lens | |-----------|------| | "where were we", "recap" | restore-context | | "what I learned", "reflect" | extract-learnings | | "gaps", "struggling" | find-gaps | | "mentor", "review process" | review-process | | "retro", "project review" | run-retro | | "decisions", "CLAUDE.md" | extract-decisions | | "bad habits", "antipatterns" | find-antipatterns |

Parameters

| Lens | Days | Flags | Also Gather | |------|------|-------|-------------| | restore-context | 3 | — | git status, git log -10 | | extract-learnings | 14 | --all-projects --compact | — | | find-gaps | 30 | --all-projects --compact | — | | review-process | 14 | --all-projects --compact | recent git log | | run-retro | 30 | --project /path | full git history | | extract-decisions | 90 | --project /path | — | | find-antipatterns | 30 | --all-projects --compact | — |

--min-exchanges 2 or 3 filters out short sessions and reduces noise.

Core Questions

| Lens | Ask | |------|-----| | restore-context | What's unfinished? What were the next steps? | | extract-learnings | Where did understanding shift? What mistakes became lessons? | | find-gaps | What topics recur? Where is guidance needed repeatedly? | | review-process | Is there planning before coding? Is debugging systematic? | | run-retro | How did the solution evolve? What worked? What was painful? | | extract-decisions | What trade-offs were discussed? What was rejected and why? | | find-antipatterns | What mistakes repeat? What confusions persist? |

Follow-ups: find-gaps → suggest learn-anything. extract-decisions → suggest /updateclaudemd.

Supplementary Search Patterns

When recent extraction doesn't surface enough, use these qmd queries to find specific sessions:

| Lens | Query | |------|-------| | extract-learnings | qmd search "learned realized understand clicked" -c conversations -n 15 --files | | find-gaps | qmd search "confused struggling help with don't understand" -c conversations -n 15 --files | | extract-decisions | qmd search "decided chose instead of trade-off because" -c conversations -n 15 --files | | find-antipatterns | qmd search "again same mistake repeated forgot" -c conversations -n 15 --files |


Synthesis

Principles

  1. Prioritize significance — 3-5 key findings, not exhaustive lists
  2. Be specific — file paths, dates, project names
  3. Make it actionable — every finding suggests a response
  4. Show evidence — quotes or references
  5. Keep it scannable — clear structure, no walls of text

Structure

## [Analysis Type]: [Scope]

### Summary
[2-3 sentences]

### Findings
[Organized by whatever fits: categories, timeline, severity]

### Patterns
[Cross-cutting observations]

### Recommendations
[Actionable next steps]

Length

Default: 300-500 words. Expand only when data warrants it.