### Using the /recall Command for Conversation Search Source: https://context7.com/ofershap/conversation-memory/llms.txt Describes the `/recall` command used within AI agents to search past conversations. It shows examples of how to query by topic, specific questions, or ongoing tasks, and mentions that it provides guided search options when run without arguments. ```bash # Search for specific topics /recall auth bug we found last week /recall what branch did we create for the migration /recall continue the performance optimization we started # Example output when matches found: ``` -------------------------------- ### Plugin Installation Commands Source: https://context7.com/ofershap/conversation-memory/llms.txt Instructions for installing the conversation-memory plugin using `npx` for supported AI tools (Claude Code, Cursor, Windsurf) or via manual copying of the skills directory. It also shows the expected plugin structure after installation. ```bash # Install via npx (Claude Code / Cursor / Windsurf) npx skills add ofershap/conversation-memory # Manual installation - copy to Claude Code cp -r skills/ ~/.claude/skills/ # Manual installation - copy to Cursor cp -r skills/ ~/.cursor/skills/ # Plugin structure after installation: # .agents/skills/conversation-memory/SKILL.md # Core skill instructions # commands/recall.md # /recall command definition # commands/history.md # /history command definition # rules/conversation-memory.mdc # Always-on rule for auto-activation ``` -------------------------------- ### Install Conversation Memory Skill Source: https://github.com/ofershap/conversation-memory/blob/main/README.md Installs the conversation-memory skill using npx. This command-line interface (CLI) command is used to add new skills to your AI agent's capabilities, specifically for managing conversation history. ```bash npx skills add ofershap/conversation-memory ``` -------------------------------- ### Recall Past Sessions (Guided Options) Source: https://context7.com/ofershap/conversation-memory/llms.txt The `/recall` command, when used without arguments, provides guided options for recalling past conversation sessions. Users can choose to see recent sessions, search by topic, date, project, or continue a previous task. ```bash # Without arguments - guided options: /recall # Output: # What do you want to recall from a past conversation? # - a) Recent work — show my last 10 sessions across all projects # - b) Specific topic — tell me what to search for (e.g., "auth bug", "migration") # - c) Specific date — tell me roughly when (e.g., "last Tuesday", "two weeks ago") # - d) Specific project — which project's history should I search? # - e) Continue previous task — find where I left off on something ``` -------------------------------- ### Keyword Search in Claude Code History (Bash) Source: https://context7.com/ofershap/conversation-memory/llms.txt Demonstrates how to use `grep` in bash to search the global Claude Code history index (`history.jsonl`) for specific keywords, including multi-keyword searches and date-based filtering. It shows example output in JSONL format. ```bash # Search for conversations about authentication bugs grep -i "authentication bug" ~/.claude/history.jsonl | tail -20 # Search for multiple keywords grep -i "auth" ~/.claude/history.jsonl | grep -i "bug" | tail -10 # Search with date context (find recent sessions) grep -i "payment" ~/.claude/history.jsonl | tail -5 # Example output (JSONL format): # {"prompt":"Debug the authentication bug in login flow","timestamp":"2026-02-18T15:30:00Z","projectPath":"/Users/me/Code/myapp","sessionId":"abc123"} # {"prompt":"Continue fixing auth middleware","timestamp":"2026-02-18T16:45:00Z","projectPath":"/Users/me/Code/myapp","sessionId":"abc123"} ``` -------------------------------- ### History Storage Locations for AI Coding Agents Source: https://context7.com/ofershap/conversation-memory/llms.txt This section outlines the file system paths where Claude Code and Cursor store conversation history. It includes examples of how to list projects and workspaces. ```bash # Claude Code history locations ~/.claude/history.jsonl # Global index - one JSON per prompt ~/.claude/projects// # Full session transcripts ~/.claude/projects//sessions-index.json # Session metadata/summaries # Cursor history locations ~/.cursor/projects//agent-transcripts/ # Full transcripts per workspace ~/.cursor/projects//agent-transcripts//.jsonl # Individual conversations # Example: List Claude Code projects ls ~/.claude/projects/ # Output: -Users-me-Code-myapp/ -Users-me-Code-api-service/ # Example: List Cursor workspaces ls ~/.cursor/projects/ # Output: Users-me-Code-myapp/ Users-me-Code-frontend/ ``` -------------------------------- ### Display Recent Conversation History Source: https://context7.com/ofershap/conversation-memory/llms.txt The `/history` command displays a scannable table of the last 10-15 conversation sessions across all projects, including dates, topics, and session identifiers. It also provides tips for searching specific topics or using guided recall. ```bash # Show recent history /history # Example output: # | # | Date | Project | Topic | # |----|--------------------|-----------|-------------------------------------------------| # | 12 | Feb 20, 2026 16:45 | myapp | Debug payment webhook race condition... | # | 11 | Feb 20, 2026 09:30 | myapp | Add OAuth2 Google login flow... | # | 10 | Feb 19, 2026 14:22 | api | Refactor auth middleware to support RBAC... | # | 9 | Feb 18, 2026 11:00 | frontend | Fix responsive layout on mobile... | # | 8 | Feb 17, 2026 15:45 | myapp | Database migration for user preferences... | # # Tip: Use /recall to search for a specific topic # Use /recall to get guided search options ``` -------------------------------- ### Context Extraction Pattern for Past Sessions Source: https://context7.com/ofershap/conversation-memory/llms.txt This pattern emphasizes extracting and summarizing key decisions, code changes, and conclusions from past sessions rather than dumping raw transcripts. This preserves context window space and provides actionable information. It includes example search strategies based on user intent and a command for finding lost branches or PRs. ```bash # Example of proper context extraction from a past session: # # From session on Feb 18 (project: myapp): # - Found: auth bug was caused by expired JWT refresh tokens # - Fix: added token rotation in middleware/auth.ts # - Branch: fix/jwt-refresh (PR #47, merged) # - Open follow-up: rate limiting on the refresh endpoint # Search strategies by user intent: # | User says... | Search strategy | # |-----------------------------------------|----------------------------------------------| # | "yesterday we looked at..." | Filter by date in history.jsonl | # | "we had a bug in the auth..." | Keyword search for "auth" + "bug" | # | "continue what we started on feature X" | Find session by feature name, extract state | # | "what branch did we create for..." | Search for "branch" or "git checkout" | # | "remember when we discussed..." | Broad keyword search, then read matches | # Finding lost branches or PRs grep -i "checkout -b\|branch\|pr create" ~/.claude/history.jsonl | tail -10 ``` -------------------------------- ### Always-On Rule Trigger Phrases Source: https://context7.com/ofershap/conversation-memory/llms.txt This section lists trigger phrases in natural language that automatically activate the history search functionality of the plugin. It provides an example conversation demonstrating how the agent responds to such triggers. ```bash # Trigger phrases that activate automatic history search: # - "remember when we..." # - "yesterday we were working on..." # - "continue what we started..." # - "last week we found..." # - "what did we decide about..." # - "the branch we created for..." # Example conversation: # User: "Last Tuesday we found a bug in the payment flow and started fixing it. What did we find?" # # Agent (automatically searches history): # Found it — Feb 18 session in the payments project. You discovered the webhook was firing # before the database transaction committed, causing race conditions. You started a fix in # middleware/webhook.ts on branch fix/webhook-race. The PR wasn't created yet. ``` -------------------------------- ### Recall Past Conversations with Keywords Source: https://github.com/ofershap/conversation-memory/blob/main/README.md Demonstrates how to use the `/recall` command to search conversation history for specific topics or past work. This is useful for retrieving context about bugs, decisions, or ongoing tasks. ```bash /recall auth bug we found last week /recall what branch did we create for the migration /recall continue the performance optimization we started ``` -------------------------------- ### Searching Cursor Agent Transcripts (Bash) Source: https://context7.com/ofershap/conversation-memory/llms.txt Illustrates how to search Cursor conversation transcripts using `ls` and `rg` (ripgrep) in bash. It covers listing recent conversations, searching across workspaces for keywords, and performing searches with context lines. ```bash # Find recent conversations in a specific workspace ls -lt ~/.cursor/projects/Users-me-Code-myapp/agent-transcripts/ # Search across all Cursor workspaces for a keyword rg -l "authentication" ~/.cursor/projects/*/agent-transcripts/*/*.jsonl # Search with context lines rg -C 3 "OAuth" ~/.cursor/projects/Users-me-Code-myapp/agent-transcripts/*/*.jsonl # Example transcript structure (JSONL): # {"role":"user","content":"Fix the login bug"} # {"role":"assistant","content":"I'll investigate the login issue...\n[Tool call] Read auth.ts\n[Tool result] ..."} ``` -------------------------------- ### Reading Claude Code Session Transcripts (Bash) Source: https://context7.com/ofershap/conversation-memory/llms.txt Provides bash commands to read session metadata and specific transcript files for Claude Code. It shows how to view session summaries from `sessions-index.json` and how to extract specific lines from transcript files using `grep`. ```bash # Read session metadata for a project (summaries without full transcripts) cat ~/.claude/projects/-Users-me-Code-myapp/sessions-index.json # Example sessions-index.json structure: # { # "sessions": { # "abc123": { # "summary": "Debug JWT refresh token expiry", # "messageCount": 47, # "branch": "fix/jwt-refresh", # "timestamp": "2026-02-18T15:30:00Z" # } # } # } # Read specific session transcript (use grep first, then targeted read) grep -i "conclusion" ~/.claude/projects/-Users-me-Code-myapp/abc123.jsonl | tail -10 # Read auto-memory for persistent context cat ~/.claude/projects/-Users-me-Code-myapp/memory/MEMORY.md ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.