search-past-chats

Search past Claude Code conversation history when user asks about previous sessions, mentions "history", "past chats", "did we discuss", "what did we talk about", "show me more from that session", or wants to recall something from earlier conversations.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "search-past-chats" with this command: npx skills add mlshv/cc-history-search/mlshv-cc-history-search-search-past-chats

Search Past Chats Skill

Search through past Claude Code sessions for this project using keyword or regex patterns, and retrieve full context from specific sessions.

When to Use This Skill

Activate when the user:

  • Asks about previous conversations or sessions
  • Wants to find something discussed before
  • References past work without specifics ("that thing we did")
  • Asks "did we talk about X before?" or "what was that about Y?"
  • Mentions searching chat history or past chats
  • Asks for more context from a session found in search results
  • Wants to see the full conversation around a specific topic

Tool 1: Search Sessions

Find sessions matching a keyword or pattern.

node "${CLAUDE_PLUGIN_ROOT}/scripts/search-history.js" "<query>" [options]

Search Options

OptionDescriptionExample
--regexUse regex pattern--regex "error.*handler"
--limit NMax results (default: 10)--limit 5
--after YYYY-MM-DDSessions after date--after 2026-01-01
--before YYYY-MM-DDSessions before date--before 2026-01-15
--include-assistantSearch Claude's responses too--include-assistant
--context NShow N messages around match--context 2

Search Examples

# Basic search
node "${CLAUDE_PLUGIN_ROOT}/scripts/search-history.js" "authentication"

# Search with date filter
node "${CLAUDE_PLUGIN_ROOT}/scripts/search-history.js" --after 2026-01-01 "mcp"

# Search including Claude's responses
node "${CLAUDE_PLUGIN_ROOT}/scripts/search-history.js" --include-assistant "error handling"

# Show context around matches
node "${CLAUDE_PLUGIN_ROOT}/scripts/search-history.js" --context 2 "database schema"

# Regex search
node "${CLAUDE_PLUGIN_ROOT}/scripts/search-history.js" --regex "api.*token"

Search Output

Returns matching sessions with:

  • Session date and title
  • Session ID (use with get-session for more context)
  • Matching excerpts (marked [A] for assistant responses)
  • Match count

Tool 2: Get Session Context

Retrieve full messages from a specific session by ID.

node "${CLAUDE_PLUGIN_ROOT}/scripts/get-session.js" <session-id> [options]

Get-Session Options

OptionDescriptionDefault
--around "text"Center on message containing text-
--context NMessages before/after with --around10
--offset NStart from message N0
--limit NMax messages to return20

Get-Session Examples

# Get first 20 messages from session
node "${CLAUDE_PLUGIN_ROOT}/scripts/get-session.js" abc123-def456

# Get context around specific content
node "${CLAUDE_PLUGIN_ROOT}/scripts/get-session.js" abc123 --around "authentication" --context 5

# Paginate through session
node "${CLAUDE_PLUGIN_ROOT}/scripts/get-session.js" abc123 --offset 20 --limit 20

Workflow

  1. Search first: Use search-history.js to find relevant sessions
  2. Note the session ID: Search results include session IDs
  3. Get more context: Use get-session.js with the ID to see full conversation

Example:

# 1. Search finds session "abc123..." discussing authentication
node "${CLAUDE_PLUGIN_ROOT}/scripts/search-history.js" "authentication"

# 2. Get full context from that session
node "${CLAUDE_PLUGIN_ROOT}/scripts/get-session.js" abc123 --around "authentication" --context 10

Best Practices

  1. Start with broad keywords, then narrow down
  2. Use --include-assistant when you need Claude's explanations too
  3. Use --context to see conversation flow around matches
  4. Use get-session with --around to jump directly to relevant content
  5. Present findings concisely - offer to show more if needed

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated
Coding

ai-dating

This skill enables dating and matchmaking workflows. Use it when a user asks to make friends, find a partner, run matchmaking, or provide dating preferences/profile updates. The skill should execute `dating-cli` commands to complete profile setup, task creation/update, match checking, contact reveal, and review.

Archived SourceRecently Updated
Coding

clawhub-rate-limited-publisher

Queue and publish local skills to ClawHub with a strict 5-per-hour cap using the local clawhub CLI and host scheduler.

Archived SourceRecently Updated